2

I am looking to rebind some evil mode keys used in navigation and text selection. For example, I am able to successfully map the following evil-mode keys to the following functions:

(define-key evil-normal-state-map (kbd "w") 'evil-forward-little-word-begin)
(define-key evil-normal-state-map (kbd "b") 'evil-backward-little-word-begin)

But I don't know how to bind key combinations, like using dw to delete only to the next little word. For example, I type d C-h k w to describe the w key after I have typed d, and it is mapped to evil-forward-word-begin, and not to evil-forward-little-word-begin. Apparently, my key mapping above does not work for this scenario.

Is there a way to remap this keybinding, or am I being unreasonable in my attempt to remap the evil-little-word library?

Note that this question is a tangent to this question and I am trying to remap the evil-little-word library to the regular evil-mode keybindings.

  • Sadly, StackExchange does not support Github Flavored Markdown. – PythonNut Feb 7 '16 at 23:18
3

Functions such as evil-delete (d) and evil-change (c) are operators, so you need to modify the evil-operator-state-map. If you want these modifications to show up in visual state as well, also modify evil-visual-state-map.

Have a look at Evil's bitbucket page for more details. It includes an old manual, but it will still give you enough of the core background to get started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.