I am trying to define a function that moves to the begin/end of current text-object.
First - I define an operator:
(evil-define-operator evil-forward-text-object (beg end type) "move to end of text object" (if (eq type 'block) (evil-apply-on-block #'evil-forward-text-object beg end nil) (goto-char end)))
In this case I need to press
M-w i ) to move forward a bracket.
There will be an
a, it is troublesome to type
and there is no difference between
Next - I try to set the keymap:
(define-key evil-motion-state-map (kbd "M-w") evil-inner-text-objects-map)
This works in some cases, such as
M-w p or
(forward a kebab-style Lisp symbol).
But in most cases it does not work - for example,
M-w ) and
How can I define a command such as I described?