Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 7911

Comments are programmer-readable annotations in source code which are ignored by the parser.

2 votes
1 answer
2k views

Toggling comments on and off

I have the following within my .vimrc: " toggle comments noremap <C-m> :<Left><Left><Left><Left><Left>exe "<Right><Right><Right><C-Right><Right>normal! … commentType='//' "C files autocmd BufReadPost *.js let g:commentType='//' "C files I want it so if I do 'ctrl+m' on a line that is already commented, it'll uncomment it, and if the line doesn't have comments
ditto's user avatar
  • 275
13 votes
2 answers
18k views

How to toggle comments with ctrl+/? [duplicate]

I'm coming from Atom, and with that I can highlight multiple lines and hit ctrl/ and it'll toggle comments for those lines. I how easy this is. Can I do something similar using ctrl/ with vim? …
ditto's user avatar
  • 275