-
-
Save mcg/94ca3472bc48761931b0de3e62f105f2 to your computer and use it in GitHub Desktop.
disable region limiting in evil-ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(evil-define-command evil-ex (&optional initial-input) | |
:keep-visual t | |
:repeat abort | |
(interactive | |
(list | |
(let ((s (concat | |
(cond | |
(current-prefix-arg | |
(let ((arg (prefix-numeric-value current-prefix-arg))) | |
(cond ((< arg 0) (setq arg (1+ arg))) | |
((> arg 0) (setq arg (1- arg)))) | |
(if (= arg 0) '(".") | |
(format ".,.%+d" arg))))) | |
evil-ex-initial-input))) | |
(and (> (length s) 0) s)))) | |
(let ((evil-ex-current-buffer (current-buffer)) | |
(evil-ex-previous-command (unless initial-input | |
(car-safe evil-ex-history))) | |
evil-ex-argument-handler | |
evil-ex-info-string | |
result) | |
(minibuffer-with-setup-hook | |
#'evil-ex-setup | |
(setq result | |
(read-from-minibuffer | |
":" | |
(or initial-input | |
(and evil-ex-previous-command | |
(propertize evil-ex-previous-command 'face 'shadow))) | |
evil-ex-completion-map | |
nil | |
'evil-ex-history | |
evil-ex-previous-command | |
t))) | |
(evil-ex-execute result))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment