t9md / atom-vim-mode-plus

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

Feature request: inline comment support #1138

Open sersorrel opened 4 years ago

sersorrel commented 4 years ago
debug info ```json { "atom": "1.45.0", "platform": "linux", "release": "4.15.0-91-generic", "vmpVersion": "1.36.4", "vmpConfig": { "charactersToAddSpaceOnSurround": [ "(", "{", "[", "<" ], "stayOnVerticalMotion": false, "useSmartcaseForSearch": true } } ```

Checklist

You have to check all before open issue.

I set up a mapping similar to vim-commentary:

"atom-text-editor.vim-mode-plus:not(.insert-mode)":
  "g c": "vim-mode-plus:toggle-line-comments"

however, this doesn't work well (obviously) for if you have part of a line selected and you want to insert a block comment without commenting out the rest of the line.

tcomment supports inline comments, where only part of the line is commented out – could vim-mode-plus also support this?

i.e. having some visual-mode selection of less than a full line and pressing gc would use a block comment to comment just the selection out, rather than a line comment.