[Bug] duplicate-with-comment-out-original in Normal mode
nwaywood opened this issue · comments
duplicate-with-comment-out-original
doesn't seem to be working as expected.
In my keymap.cson
I have:
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
'g D': 'vim-mode-plus:duplicate-with-comment-out-original'
when I execute this from visual mode on a single line, V g D
it works as expected and results in the following:
However the equivalent in normal mode, g D i l
, produces the following:
It seems that when executed from normal mode, a newline character is not being inserted
Expected behavior
g D i l
or g D a l
should produce the same result as V g D
(the first image above)
Actual behavior
V g D
produces the first image above but g D i l
produces the second image above
I hope this makes sense, let me know if you need more info.
I am running latest stable Atom and latest vim-mode-plus
on MacOS 10.14.6
Nevermind, just after posting this I realised I just needed to add an operator-pending-mode
binding!
'atom-text-editor.vim-mode-plus.operator-pending-mode.duplicate-with-comment-out-original-pending':
'D': 'vim-mode-plus:duplicate-with-comment-out-original'
Sorry to bother you!