1

Doom Emacs' s key does not behave like Vim's implementation. In Vim, s deletes the character under the cursor and puts you into insert mode whereas Evil Mode performs a search, similar to f and t.

  1. Is this something that can be changed?
  2. If not, what was the reasoning behind s not working like it does in Vim? It seems like most bindings work as expected, except for this one.
2
  • This is not the behavior of Evil mode. I'm guessing doom has changed its binding. While under evil-normal-state, what is the output of C-h k for s? – TerryTsao Dec 2 '20 at 4:49
  • Thanks for this. I wasn't aware that I could look up the mapping so easily. It's mapped to using evil-snipe. – zakrywilson Dec 4 '20 at 23:55
1

Having this is your init file will make s function as it does in Vim:

(define-key evil-normal-state-map (kbd "s") 'evil-substitute)

But this will replace the current functionality of s, so you will have to map its current value (C-h k s) to something else.

0

Running C-h k for s revealed that evil-snipe was mapped to s and S.

I found a Doom-specific solution, provided by the creator to add to config.el which allows for all evil-snipe functionality to remain the same:

(after! evil-snipe
  (evil-snipe-mode -1))

Source: https://github.com/hlissner/doom-emacs/issues/1642#issuecomment-518711170

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.