comparison runtime/doc/fold.txt @ 1255:924416414c61

updated for version 7.1
author vimboss
date Sat, 12 May 2007 14:03:30 +0000
parents beed57a8fcd1
children 82b5078be2dd
comparison
equal deleted inserted replaced
1254:3431ddf76355 1255:924416414c61
1 *fold.txt* For Vim version 7.1b. Last change: 2006 Mar 29 1 *fold.txt* For Vim version 7.1. Last change: 2007 May 11
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
71 EXPR *fold-expr* 71 EXPR *fold-expr*
72 72
73 The folds are automatically defined by their foldlevel, like with the "indent" 73 The folds are automatically defined by their foldlevel, like with the "indent"
74 method. The value of the 'foldexpr' option is evaluated to get the foldlevel 74 method. The value of the 'foldexpr' option is evaluated to get the foldlevel
75 of a line. Examples: 75 of a line. Examples:
76 This will create a fold for all consecutive lines that start with a Tab: > 76 This will create a fold for all consecutive lines that start with a tab: >
77 :set foldexpr=getline(v:lnum)[0]==\"\\t\" 77 :set foldexpr=getline(v:lnum)[0]==\"\\t\"
78 This will call a function to compute the fold level: > 78 This will call a function to compute the fold level: >
79 :set foldexpr=MyFoldLevel(v:lnum) 79 :set foldexpr=MyFoldLevel(v:lnum)
80 This will make a fold out of paragraphs separated by blank lines: > 80 This will make a fold out of paragraphs separated by blank lines: >
81 :set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1 81 :set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1