'How to comment in Vim's config files: ".vimrc"?
How do I add a comment in Vim's configuration files, like .vimrc?
Solution 1:[1]
A double quote to the left of the text you want to comment.
Example:
" this is how a comment looks like in ~/.vimrc
To be clear: Do not include a closing double quote. (See comment from Arslan Ali below.)
Solution 2:[2]
"This is a comment in vimrc. It does not have a closing quote
Source: http://vim.wikia.com/wiki/Backing_up_and_commenting_vimrc
Solution 3:[3]
Same as above. Use double quote to start the comment and without the closing quote.
Example:
set cul "Highlight current line
Solution 4:[4]
You can add comments in Vim's configuration file by either:
" brief description of the command
or:
"" commented command
Taken from here
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Wenfang Du |
| Solution 2 | Arslan Ali |
| Solution 3 | Randy Lam |
| Solution 4 | ZaydH |
