sponsor Vim development Vim logo Vim Book Ad

F6_Comment (old) : Auto commenting that accepts Visual range

 script karma  Rating 0/0, Downloaded by 604  Comments, bugs, improvements  Vim wiki

created by
David Maclay
 
script type
utility
 
description
******************************************************************
NB.  I accidentally uploaded this script twice, this instance needs to be deleted,
         and the copy listed under Vim 7.0 should be kept.
         I just don't know how to do this ... sorry.
******************************************************************


Description:
I don't know for sure that something like this does not already exist in Vim, but if it does, I can't find it.

I recall Cream having this kind of functionallity mapped to <F6>,
so to maintain consistency I've kept the convention.

This uses the current value of &cms / &commentstring to comment and uncomment code.
It works for ranges selected in Visual mode, or for the current line in all modes.
NB. Comment strings may not include '@' or '+'
(I don't know of any languages that use these characters).

Help:
Use <F6> to comment, and <S-F6> to uncomment
 
install details
 

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
F6_Comment.vim 1.0 2007-10-03 6.0 David Maclay Initial upload
ip used for rating: 18.217.220.114

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