Skip to content

Jaymon/vim-commentify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Commentify

Vim Plugin to comment and un-comment lines in different source files in both normal and visual mode.

This is roughly based on the vim comments plugin.

This plugin has been in my .vim configuration for a number of years and has been pretty bulletproof for me, so I figured the time was right to pull it out into its own repo.

Why?

The comments.vim plugin was great, but it didn't support newer languages like Golang, and since Vim includes a commentstring variable for all the filetypes it supports, I figured I could write a plugin that commented out blocks of code using that variable instead of relying on lots of conditional statements, also, I really wanted to use the same mapping to comment/uncomment the code, and that's how Commentify was born.

Usage

By default, Commentify maps the ctrl-c key to commenting and uncommenting.

If you wish to override that, just set g:commentify_map_keys to 0, then you can define a different mapping for each of the functions in your .vimrc.

to map normal mode, use the commentify function:

commentify#Commentify()

to map visual mode, use the RangeCommentify function:

commentify#RangeCommentify()

Installation

Use pathogen. Clone this repo into the bundle directory.

$ cd /path/to/.vim/bundle
$ git clone [email protected]:Jaymon/vim-commentify.git commentify

License

copyrighted by me, and distributed under the same terms as Vim, see :help license.

About

Easily comment/uncomment large blocks of code in Vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published