Make numbered vim markers global
In evil, registers 2-9 are buffer-local. In vim, they're global. This fixes that.
This commit is contained in:
parent
bd7f1f6d17
commit
9b84d800f3
1 changed files with 6 additions and 0 deletions
|
@ -126,6 +126,12 @@ line with a linewise comment.")
|
||||||
(advice-add #'counsel-git-grep-action :around #'+evil*set-jump)
|
(advice-add #'counsel-git-grep-action :around #'+evil*set-jump)
|
||||||
(advice-add #'helm-ag--find-file-action :around #'+evil*set-jump)
|
(advice-add #'helm-ag--find-file-action :around #'+evil*set-jump)
|
||||||
|
|
||||||
|
;; In evil, registers 2-9 are buffer-local. In vim, they're global, so...
|
||||||
|
(defun +evil*make-numbered-markers-global (orig-fn char)
|
||||||
|
(or (and (>= char ?2) (<= char ?9))
|
||||||
|
(funcall orig-fn char)))
|
||||||
|
(advice-add #'evil-global-marker-p :around #'+evil*make-numbered-markers-global)
|
||||||
|
|
||||||
;; Make o/O continue comments
|
;; Make o/O continue comments
|
||||||
(defun +evil*insert-newline-above-and-respect-comments (orig-fn count)
|
(defun +evil*insert-newline-above-and-respect-comments (orig-fn count)
|
||||||
(cl-letf* ((old-insert-newline-above (symbol-function 'evil-insert-newline-above))
|
(cl-letf* ((old-insert-newline-above (symbol-function 'evil-insert-newline-above))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue