dj in vim deletes the current line as well as the next. It's a bit idiosyncratic (in that it doesn't really make sense as a motion) but I've come to rely on it.
In evil, however,
dj deletes only the current line. How can I remap it so that it has vim's behaviour?
I've tried a few methods and all don't work:
(defun delete-two-lines () (interactive) (kill-whole-line) (kill-whole-line))
(key-chord-define evil-normal-state-map "dj" 'delete-two-lines)
- trying to remap the
jmotion in evil to jump two lines (
(evil-line-move 2)). This works but affects every use of
ddis a linewise shortcut; it's not special-cased, so I can't hook into it (why is evil so elegant...)
(define-key evil-mode-normal-map (kbd "dj") 'delete-two-lines):
disn't a prefix key, and this seems like it would interfere with evil's
I'm at my wit's end. Help would be appreciated.