Skip to content

ingsme/create_start_fold_marker.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2891

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>zm         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>zM         Create fold marker as child: level number is incremented by 1.

<Leader>zp         Create fold maker as parent: level number is decremented 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 hild.

<Leader>cp         Create fold maker as comment and as parent.

About

create start fold marker with level number

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%