atom-vim-mode-plus
atom-vim-mode-plus copied to clipboard
Joining line doesn't remove comment characters
It'd be sweet if joining a line (J
) would conveniently remove comment characters.
For example, currently if I have
// this is
// a comment
and I press J
then I get
// this is // a comment
but it would be nice if it took out the comment chars so it resulted in
// this is a comment
Automatically removing leading comments can be unwanted behavior in a different situation.
How about trying g q
(vim-mode-plus:reflow
).
To join two lines when your cursor is at a
char.
// a
// b
You can use whichever of the following.
-
g q j
: Operator then target(motion =j
) flow. -
V j g q
: Select two lines visually then apply operatorg q
.
Thanks for those options, but it won't work if the lines are longer than the right margin. There's cases when I simply just want J
and gq
doesn't work. For now I workaround with JdE
.
Vim has the expected behavior. This would be nice in Atom, but I understand if it isn't high priority, and I can live with it.
Over all thanks for this plugin!! It's the best there is (of all emulators in all editors that I've tried). Plus scripting new commands and maps in JavaScript is much better than viml!