How do I create an elisp function to call evil-search-forward
and then paste to search for the last text yanked/copied? I've tried calling commands such as evil-paste-after
or yank
(see below) but they appear to do nothing when called programmatically after evil-search-forward
. I'm using spacemacs.
(define-key evil-normal-state-map (kbd "C-r")
(defun my-search-fun ()
(interactive)
(evil-search-forward)
(evil-paste-after)
)
)