Commenting multiple line in visual mode inserts extra slashes
See original GitHub issueFirst of all, excellent project!
The visual mode adds multi cursors automatically, when I select multiple lines and commenting with cmd+/
, two sets slashes will be inserted and cannot uncomment once.
I hardly use multi-cursors before, so I’m not sure adding multi-cursor as a default behavior is suitable for most users.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Commenting multiple line in visual mode inserts extra slashes
I'm workarounding this problem by creating second selection for 1 right character, that's why commenting through vscode command produces ...
Read more >How to get Visual Studio quick comments to add a space after ...
Apparently, StyleCop doesn't care if there's a space after four slashes, only after two. It seems some people really like this rule behavior....
Read more >Comment Out Multiple Lines At Once In Vim Editor - OSTechNix
Method 4: ; Step 2: Go to the line you want to comment. Press ; Ctrl+V to enter into 'Visual block' mode.
Read more >3 Ways to Comment Out Blocks of Code in vi
Hit SHIFT + i (capital i) to enter insert mode. Uncommenting is just as simple. Hit CTRL + v to enter visual block...
Read more >disable new extend multiline comments in c++ feature
After I type a first line of /* or /// comment, when I press ENTER, Visual inserts more comments on the following line....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@asvetliakov great, that’s really helpful. Thank you for taking the time to investigate ⚡️
Unfortunately this is not fixable due to cursor pos differences. In vscode cursor pos is actual before the character, in vim it’s on character. This is not problem for right-2-left visual selections but for left-2-right one character is not being selected due to this. I’m workarounding this problem by creating second selection for 1 right character, that’s why commenting through vscode command produces multiple comments (because there are 2 cursors on line for left-2-right visual selection).
The solution is not to use builtin vscode comment key and use
xmap gc <Plug>VSCodeCommentary
bound to some key.As workaround i’ll remap
<C-/>
to callVSCodeCommentary