I want to use yt<anyChar>
for yanking and for jumping, so that cursor moves to the first char before <anyChar>
. For backward moving this is working by default (after yT<anyChar>
cursor moves to the first char after <anyChar>
and I even can use ;
and ,
for additional jumps).
In my Emacs+Evil config I've done it by simply advising evil-yank function:
(defun evil-yank-after (beg end type register yank-handler)
(if (= (point) beg)
(goto-char (1- end))
(goto-char beg)))
(advice-add #'evil-yank :after #'evil-yank-after)
In vim I guess approach is totally different?