sponsor Vim development Vim logo Vim Book Ad

create_start_fold_marker.vim : create start fold marker with level number

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

created by
Vlad Irnov
 
script type
utility
 
description
This plugin helps insert start fold markers with level numbers: {{{1, {{{2, {{{3, and so on. It creates the following global mappings for Normal and Visual modes:

<Leader>fm         Create start fold marker with level number. It is apppended to the end of current line. The level is set to that of the previous start fold marker with level number (if any). The start fold marker string is obtained from option 'foldmarker'.

<Leader>fM         Create fold marker as child: level number is incremented by 1.

<Leader>cm         Create fold marker as comment according to buffer's filetype.  E.g., if filetype is html, <!--{{{1--> is appended. Dictionary s:commentstrings defines comment strings for a few filetypes.  For all other filetypes, comment strings are obtained from option 'commentstring'. If comment strings are not what you want, you can edit dictionary s:commentstrings.

<Leader>cM         Create fold marker as comment and as child.
 
install details
Source the script or put it in your local plugin folder.
 

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
create_start_fold_marker.vim 1.0 2009-12-19 7.0 Vlad Irnov Initial upload
ip used for rating: 3.141.7.194

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