aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2017-10-29 13:02:30 +0100
committerEivind Fonn <evfonn@gmail.com>2019-11-20 11:32:54 +0100
commit3b2c463cf013be3b4fe3f71e597db1635cae306e (patch)
treed6283c1fbea3eefd9964cd0f0c8cd6e02eede5b5
parente0e9797a2baa1608e815beec6485aa8db1703dfb (diff)
Handle dash in ex commands
Closes #919
-rw-r--r--evil-ex.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/evil-ex.el b/evil-ex.el
index 0c0be67..ea469c0 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -56,7 +56,7 @@
number)
(command #'evil-ex-parse-command)
(binding
- "[~&*@<>=:]+\\|[[:alpha:]-]+\\|!")
+ "[~&*@<>=:]+\\|[[:alpha:]_]+\\|!")
(emacs-binding
"[[:alpha:]-][[:alnum:][:punct:]-]+")
(bang
@@ -852,13 +852,13 @@ START is the start symbol, which defaults to `expression'."
(when result
(setq command (car-safe result)
string (cdr-safe result))
- ;; check whether the parsed command is followed by a slash or
- ;; number and the part before it is not a known ex binding
+ ;; check whether the parsed command is followed by a slash, dash
+ ;; or number and the part before it is not a known ex binding
(when (and (> (length string) 0)
- (string-match-p "^[/[:digit:]]" string)
+ (string-match-p "^[-/[:digit:]]" string)
(not (evil-ex-binding command t)))
- ;; if this is the case, assume the slash or number and all
- ;; following symbol characters form an (Emacs-)command
+ ;; if this is the case, assume the slash, dash or number and
+ ;; all following symbol characters form an (Emacs-)command
(setq result (evil-parser (concat command string)
'emacs-binding
evil-ex-grammar)