开发者

How to comment in Vim's config files: ".vimrc"?

开发者 https://www.devze.com 2022-12-16 01:30 出处:网络
How do I add a comment in Vim\'s configuration files, lik开发者_运维问答e .vimrc?A double quote to the left of the text you want to comment.

How do I add a comment in Vim's configuration files, lik开发者_运维问答e .vimrc?


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.)


"This is a comment in vimrc. It does not have a closing quote 

Source: http://vim.wikia.com/wiki/Backing_up_and_commenting_vimrc


Same as above. Use double quote to start the comment and without the closing quote.

Also, you can have command followed by comment in file .vimrc just like below:

set nu  "display line number 


You can add comments in Vim's configuration file by either:

" brief description of the command    

or:

"" commented command

Taken from here

0

精彩评论

暂无评论...
验证码 换一张
取 消