aboutsummaryrefslogtreecommitdiff
path: root/evil-maps.el
diff options
context:
space:
mode:
authorAxel Forsman <axelsfor@gmail.com>2023-07-14 22:06:07 +0200
committerAxel Forsman <axelsfor@gmail.com>2023-07-17 19:02:11 +0200
commitf84d3453b312bd8ec0a1c092d075bbc3d91e157b (patch)
tree332c2d802dbda3eef60de8c29e0480e0de1b562e /evil-maps.el
parent4b45f2619258374ebb34b07212806e77bc2997c3 (diff)
Read Ex commands from buffer
When lexing a string with string-match and its START argument, there is no way to anchor matches to the START position. Instead, one must either allocate substrings - as done prior to commit 56b43b6f7e014e905f85df1c542c67f46ea99566 - or use looking-at etc., instead. This commit opts for the latter. The Ex completion-at-point functions are also rewritten in order to avoid having to add ex-index text properties to the command string, since evil--ex-syntactic-context could be extended to provide that information just as easily.
Diffstat (limited to 'evil-maps.el')
-rw-r--r--evil-maps.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/evil-maps.el b/evil-maps.el
index 81b2790..678ebfd 100644
--- a/evil-maps.el
+++ b/evil-maps.el
@@ -609,17 +609,16 @@ included in `evil-insert-state-bindings' by default."
;; ex command line
(define-key evil-ex-completion-map "\d" #'evil-ex-delete-backward-char)
-(define-key evil-ex-completion-map "\t" #'evil-ex-completion)
-(define-key evil-ex-completion-map [tab] #'evil-ex-completion)
-(define-key evil-ex-completion-map [remap completion-at-point] #'evil-ex-completion)
-(define-key evil-ex-completion-map "\C-a" 'evil-ex-completion)
+(define-key evil-ex-completion-map "\t" 'completion-at-point)
+(define-key evil-ex-completion-map [tab] 'completion-at-point)
+(define-key evil-ex-completion-map "\C-a" 'completion-at-point)
(define-key evil-ex-completion-map "\C-b" 'move-beginning-of-line)
(define-key evil-ex-completion-map "\C-c" 'abort-recursive-edit)
-(define-key evil-ex-completion-map "\C-d" 'evil-ex-completion)
+(define-key evil-ex-completion-map "\C-d" 'completion-at-point)
(define-key evil-ex-completion-map "\C-f" 'evil-ex-command-window)
(define-key evil-ex-completion-map "\C-g" 'abort-recursive-edit)
(define-key evil-ex-completion-map "\C-k" 'evil-insert-digraph)
-(define-key evil-ex-completion-map "\C-l" 'evil-ex-completion)
+(define-key evil-ex-completion-map "\C-l" 'completion-at-point)
(define-key evil-ex-completion-map "\C-p" #'previous-complete-history-element)
(define-key evil-ex-completion-map "\C-r" 'evil-paste-from-register)
(define-key evil-ex-completion-map "\C-n" #'next-complete-history-element)