sponsor Vim development Vim logo Vim Book Ad

usefold : indent based fold marker creation

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

created by
Leo Bärring
 
script type
utility
 
description
Usefold provides functionality to ease putting fold markers based
on indentation when using the marker foldmethod. No maps are
provided by default but has to be set up by the user.

Usefold_FoldDown / FoldUp / FromInside functions are provided
and creates a fold between the current line and the first line
below/above that has the same level of indentation. In the last
case, FoldDown is called on the first line above the current
that is indented less than the current line.
The functions can also be given a parameter, to specify another
line than the current.

Usefold_foldtext is also provided and is (according to me, the author)
a better foldtext, that among other things preserve indentation.
 
install details
Regular vimball installation, or get the pathogen compatible
files/file structure from https://github.com/tlvb/Usefold

No mappings provided by default, you decide yourself if and when you want what functions to be called.
 

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
usefold.vmb 0.0.3 2013-02-04 7.3 Leo Bärring Initial upload
ip used for rating: 44.220.184.63

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