sponsor Vim development Vim logo Vim Book Ad

comment.vim : Comment and uncomment selected blocks of code.

 script karma  Rating 14/8, Downloaded by 1062  Comments, bugs, improvements  Vim wiki

created by
Mike S
 
script type
utility
 
description
This script contains two simple functions to comment and uncomment visually selected blocks of C and C++ code using "#ifdef 0...#endif".   If'd out sections are commented with the author's name and a timestamp.

The default mappings are .c to comment and .C to uncomment.

e.x.
#if 0 /* author Tue Mar 25 19:08:09 EST 2003 */
...
#endif /* author Tue Mar 25 19:08:09 EST 2003 */
 
install details
Copy comment.vim to your plugin directory or source it in your .vimrc.
Set the variable g:Author if you would like the  author's name to appear in the commented out block.
 

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
comment.vim 0.1 2003-03-14 6.0 Mike S Initial upload
ip used for rating: 13.58.112.1

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