textobj-comment : Text objects for comments
| script karma
Downloaded by 236
Comments, bugs, improvements
script versions (upload new version)
|The textobj-comment plugin provides text objects to select comments.
"ac" selects a comment including the comment delimiters, "ic" selects the comment content without the delimiters. A third text object, "aC", selects a "big" comment, including trailing or leading whitespace.
textobj-comment uses the filetype-specific 'comments' setting to determine what a comment looks like for a given language. Make sure you have enabled filetype plugins in your configuration to make this work.
In order to find a target, textobj-comment looks for a comment under the cursor, in or at the end of the cursor line, and above the cursor line. You can see a demo of the text objects and the heuristic in the documentation.
This plugin depends on the textobj-user plugin, version 0.4.0 (vimscript #2100).
|Unzip the archive in your ~/.vim directory. (On Windows, replace "~/.vim" with "$HOME\vimfiles" everywhere.)
This plugin is also hosted on Github at https://github.com/glts/vim-textobj-comment
With the Pathogen plugin manager the installation is as simple as:
git clone git://github.com/glts/vim-textobj-comment.git textobj-comment
But this plugin also plays well with the built-in GetLatestVimScripts and other plugin managers such as Vundle, vim-addon-manager, and vim-flavor.
Don't forget to install textobj-user first if your setup doesn't take care of dependencies automatically.
Click on the package to download.
ip used for rating: 184.108.40.206