Search notes:

vim - folding text

Variables

v:lnum, v:folddashes, v:foldlevel, v:foldend, v:foldstart

Functions

let l:first_line_of_fold = foldclosed(l:line_no) (If fold is closed)
let l:last_line_of_fold = foldclosedend(l:line_no) (If fold is closed)
let l:fold_level = foldlevel(l:line_no)
let l:displayed_string_for_closed_folds = foldtext() (The default function for the foldtext option)
let l:text_for_closed_fold = foldtextresult(l:line_no)

Commands

:{range}foldopen[!]
:{range}foldclose[!]

Options

foldopen
foldtext
foldnestmax: the maximum nesting of folds for the indent and syntax methods. Internally, the limit is set to 20, unfortunately. However, the limit can be raised by changing the macro MAX_LEVEL in fold.c.

See also

fold.c

Index