t9md / atom-vim-mode-plus

vim-mode improved
https://atom.io/packages/vim-mode-plus
MIT License
1.4k stars 111 forks source link

Joining line doesn't remove comment characters #1108

Open trusktr opened 5 years ago

trusktr commented 5 years ago

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
t9md commented 5 years ago

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.

trusktr commented 5 years ago

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!