C-fold : Automates folding and unfolding C & C++ comments and code blocks.
script karma |
Rating 9/22,
Downloaded by 2761 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Neil Vice |
|
script type |
ftplugin |
|
description |
Automatically folds all blocks (i.e. { } ) in C and C++ and defines a function that performs a command e.g. zo on all folds beginning with text that matches a given pattern.
This allows for the following mappings defined by the plugin:
z[ - Opens all doxygen-style comments
z] - Closes all doxygen-style comments
z{ - Opens all code blocks (i.e. { })
z} - Closes all code blocks |
|
install details |
Extract the archive from your home directory. This will extract the following files:
.vim/plugins/cfold.vim
.vim/after/syntax/c.vim
Also requires the folding of Doxygen-style comments. This requires vimscript #5. This can be done easily by adding the 'fold' keyword to the end of the 'doxygenComment' region in the 'doxygen.vim' syntax file:
syn region doxygenComment start= ... keepend fold
Additional languages can be supported as appropriate (e.g. Java) by copying 'c.vim' and renaming to the syntax file for the language (e.g. java.vim).
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.144.91.115
|