Fix 'not an evil-paste' error on SPC i y #1095
yank-pop and evil-paste-pop are picky little buggers, we need our own delegate.
This commit is contained in:
parent
d79817edeb
commit
d46c2582d0
2 changed files with 10 additions and 1 deletions
|
@ -662,7 +662,7 @@
|
||||||
:desc "Man pages" "w" #'+default/man-or-woman)
|
:desc "Man pages" "w" #'+default/man-or-woman)
|
||||||
|
|
||||||
(:prefix ("i" . "insert")
|
(:prefix ("i" . "insert")
|
||||||
:desc "Insert from clipboard" "y" #'yank-pop
|
:desc "Insert from clipboard" "y" #'+default/yank-pop
|
||||||
:desc "Insert from evil register" "r" #'evil-ex-registers
|
:desc "Insert from evil register" "r" #'evil-ex-registers
|
||||||
:desc "Insert snippet" "s" #'yas-insert-snippet)
|
:desc "Insert snippet" "s" #'yas-insert-snippet)
|
||||||
|
|
||||||
|
|
|
@ -110,3 +110,12 @@ If ARG (universal argument), runs `compile' from the current directory."
|
||||||
(call-interactively 'evil-open-below)
|
(call-interactively 'evil-open-below)
|
||||||
(end-of-line)
|
(end-of-line)
|
||||||
(newline-and-indent)))
|
(newline-and-indent)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +default/yank-pop ()
|
||||||
|
"Interactively select what text to insert from the kill ring."
|
||||||
|
(interactive)
|
||||||
|
(call-interactively
|
||||||
|
(cond ((fboundp 'counsel-yank-pop) #'counsel-yank-pop)
|
||||||
|
((fboundp 'helm-show-kill-ring) #'helm-show-kill-ring)
|
||||||
|
((error "No kill-ring search backend available. Enable ivy or helm!")))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue