Download Vim Comment Plugin Nerd_commenter
[Email protected] ~]# MKDIR-PV ~/.vim/plugin/[[email protected] ~]# Curl Https://raw.githubusercontent.com/scrooloose /nerdcommenter/master/plugin/nerd_commenter.vim > ~/.vim/plugin/nerd_commenter.vim
Minimum configuration of the Nerd_commenter
[[Email protected] ~]# mv ~/.VIMRC ~/.vimrc.back[[email protected] ~]# vim ~/.vimrclet mapleader = "," Let nerdspacedelims= 1 "Allow a space between the comment and the statement let Nerdcompactsexycoms=1" multi-line comments look better when let g:nerddefaultalign = ' left ' "align line comments aligns
Instructions for use:
, CC single line comment, CM to the selected range multiline comment, cs in "Sexy" way comment, cu uncomment, CA toggle//With/**/annotation method
Single-line Comment:
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/98/F8/wKioL1lCRbnB-plnAADKY7V8jM0118.png "title=" 01. PNG "alt=" Wkiol1lcrbnb-plnaadky7v8jm0118.png "/>
Multi-line comments
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/98/F8/wKioL1lCRaHh4BVyAAECKAEJe_g080.png "style=" float : none; "title=" 02.png "alt=" Wkiol1lcrahh4bvyaaeckaeje_g080.png "/>
Sexy comments
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/98/F8/wKioL1lCRaKw1a62AAFNp6ULtqM786.png "style=" float : none; "title=" 03.png "alt=" Wkiol1lcrakw1a62aafnp6ultqm786.png "/>
dramatization
This article is from the "Li Chunli" blog, make sure to keep this source http://990487026.blog.51cto.com/10133282/1937219
Vim Comment Plugin Nerd_commenter