Programmatically call evil-find-char
sylvain.benner at gmail.com
Tue Jan 20 04:11:14 CET 2015
Thank you Frank, works like a charm, `evil-escape` does not depend on
On Sat, Jan 17, 2015 at 3:24 PM, Frank Fischer <frank-fischer at shadow-soft.de
> Am 17.01.2015 um 07:04 schrieb Sylvain Benner:
> > Hi,
> > I'm trying to call interactively from the code the function
> > `evil-find-char` while in visual state like this:
> > (call-interactively 'evil-find-char)
> > A simplistic use case will be the following simple wrapper function
> > on `f` key:
> > (defun my-wrapper () (interactive) (call-interactively
> > The observed behavior is that when I press on `f` the point is put of the
> > next character with no selection, then when I press a second key then the
> > selection does not include the second character (like if I pressed `t` in
> > regular Vim).
> The problem is that Evil considers `my-wrapper` as regular Emacs
> command. When called in visual state Evil adjusts point and mark so that
> the region corresponds to the visual selection right before the command
> is executed (and because Emacs region exclusive, point is moved to the
> next character).
> You could try to register `my-wrapper` as a regular Evil motion, i.e.
> (evil-define-motion my-wrapper (count)
> (call-interactively 'evil-find-char))
> should work.
> implementations-list mailing list
> implementations-list at lists.ourproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the implementations-list