sponsor Vim development Vim logo Vim Book Ad

commentToggle : A simple line-based comment toggler.

 script karma  Rating 17/5, Downloaded by 1047  Comments, bugs, improvements  Vim wiki

created by
kamil stachowski
 
script type
utility
 
description
Toggles comment for selected lines. If the selection is commented, commentToggle uncomments it; if it’s not commented, commetToggle comments it; if it’s mixed, the above is applied on a per-line basis. Very useful. I know, there are plenty of commenters out there, but this one’s mine. And it’s much simpler. One shortcut (<Leader>;) and that’s that.
 
install details
Copy to your plugins directory (probably ~/.vim/plugins) and restart Vim or place anywhere and :source it.
Or use this address with your favourite package manager: https://github.com/kamwitsta/commentToggle
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
commentToggle.vim 0.3 2016-10-31 7.0 kamil stachowski a bit of a rewrite, now uses commentstring (duh…)
commentToggle.vim 0.2 2008-11-10 6.0 kamil stachowski improved whitespace handling (now prettier than ever ;)
added 37 new languages (total 93)
commentToggle.vim 0.1 2008-11-08 6.0 kamil stachowski Initial upload
ip used for rating: 18.221.187.121

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github