annotate runtime/doc/fold.txt @ 5231:74d2f3188cd0 v7.4a.041

updated for version 7.4a.041 Problem: When using ":new ++ff=unix" and "dos" is first in 'fileformats' then 'ff' is set to "dos" instead of "unix". (Ingo Karkat) Solution: Create set_file_options() and invoke it from do_ecmd().
author Bram Moolenaar <bram@vim.org>
date Wed, 24 Jul 2013 15:02:03 +0200
parents 6ec6b7ff2d43
children 09c88160095d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5146
6ec6b7ff2d43 Vim 7.4a BETA release.
Bram Moolenaar <bram@vim.org>
parents: 2826
diff changeset
1 *fold.txt* For Vim version 7.4a. Last change: 2010 May 13
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
7 Folding *Folding* *folding* *folds*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 You can find an introduction on folding in chapter 28 of the user manual.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 |usr_28.txt|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 1. Fold methods |fold-methods|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 2. Fold commands |fold-commands|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 3. Fold options |fold-options|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 4. Behavior of folds |fold-behavior|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 {Vi has no Folding}
2570
71b56b4e7785 Make the references to features in the help more consistent. (Sylvain Hitier)
Bram Moolenaar <bram@vim.org>
parents: 2561
diff changeset
18 {not available when compiled without the |+folding| feature}
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 1. Fold methods *fold-methods*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 The folding method can be set with the 'foldmethod' option.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 When setting 'foldmethod' to a value other than "manual", all folds are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 deleted and new ones created. Switching to the "manual" method doesn't remove
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 the existing folds. This can be used to first define the folds automatically
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 and then change them manually.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 There are six methods to select folds:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 manual manually define folds
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 indent more indent means a higher fold level
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 expr specify an expression to define folds
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syntax folds defined by syntax highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 diff folds for unchanged text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 marker folds defined by markers in the text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 MANUAL *fold-manual*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 Use commands to manually define the fold regions. This can also be used by a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 script that parses text to find folds.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 The level of a fold is only defined by its nesting. To increase the fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 level of a fold for a range of lines, define a fold inside it that has the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 same lines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 The manual folds are lost when you abandon the file. To save the folds use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 the |:mkview| command. The view can be restored later with |:loadview|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 INDENT *fold-indent*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 The folds are automatically defined by the indent of the lines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 The foldlevel is computed from the indent of the line, divided by the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 'shiftwidth' (rounded down). A sequence of lines with the same or higher fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 level form a fold, with the lines with a higher level forming a nested fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 The nesting of folds is limited with 'foldnestmax'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 Some lines are ignored and get the fold level of the line above or below it,
2826
3c7da93eb7f9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
63 whichever is lower. These are empty or white lines and lines starting
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 with a character in 'foldignore'. White space is skipped before checking for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 characters in 'foldignore'. For C use "#" to ignore preprocessor lines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 When you want to ignore lines in another way, use the 'expr' method. The
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 |indent()| function can be used in 'foldexpr' to get the indent of a line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 EXPR *fold-expr*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 The folds are automatically defined by their foldlevel, like with the "indent"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 method. The value of the 'foldexpr' option is evaluated to get the foldlevel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 of a line. Examples:
1255
924416414c61 updated for version 7.1
vimboss
parents: 1207
diff changeset
76 This will create a fold for all consecutive lines that start with a tab: >
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 :set foldexpr=getline(v:lnum)[0]==\"\\t\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 This will call a function to compute the fold level: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 :set foldexpr=MyFoldLevel(v:lnum)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 This will make a fold out of paragraphs separated by blank lines: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 :set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 this does the same: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 :set foldexpr=getline(v:lnum-1)=~'^\\s*$'&&getline(v:lnum)=~'\\S'?'>1':1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 Note that backslashes must be used to escape characters that ":set" handles
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 differently (space, backslash, double quote, etc., see |option-backslash|).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 These are the conditions with which the expression is evaluated:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 - The current buffer and window are set for the line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 - The variable "v:lnum" is set to the line number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 - The result is used for the fold level in this way:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 value meaning ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 0 the line is not in a fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 1, 2, .. the line is in a fold with this level
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 -1 the fold level is undefined, use the fold level of a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 line before or after this line, whichever is the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 lowest.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 "=" use fold level from the previous line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 "a1", "a2", .. add one, two, .. to the fold level of the previous
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 "s1", "s2", .. subtract one, two, .. from the fold level of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 previous line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 "<1", "<2", .. a fold with this level ends at this line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 ">1", ">2", .. a fold with this level starts at this line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 It is not required to mark the start (end) of a fold with ">1" ("<1"), a fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 will also start (end) when the fold level is higher (lower) than the fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 level of the previous line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 There must be no side effects from the expression. The text in the buffer,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 cursor position, the search patterns, options etc. must not be changed.
818
1f929f3ca806 updated for version 7.0c03
vimboss
parents: 810
diff changeset
112 You can change and restore them if you are careful.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 If there is some error in the expression, or the resulting value isn't
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 recognized, there is no error message and the fold level will be zero.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 For debugging the 'debug' option can be set to "msg", the error messages will
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 be visible then.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 Note: Since the expression has to be evaluated for every line, this fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 method can be very slow!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 Try to avoid the "=", "a" and "s" return values, since Vim often has to search
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 backwards for a line for which the fold level is defined. This can be slow.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 |foldlevel()| can be useful to compute a fold level relative to a previous
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 fold level. But note that foldlevel() may return -1 if the level is not known
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 yet. And it returns the level at the start of the line, while a fold might
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 end in that line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2098
diff changeset
130 It may happened that folds are not updated properly. You can use |zx| or |zX|
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2098
diff changeset
131 to force updating folds.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2098
diff changeset
132
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 SYNTAX *fold-syntax*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 A fold is defined by syntax items that have the "fold" argument. |:syn-fold|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 The fold level is defined by nesting folds. The nesting of folds is limited
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 with 'foldnestmax'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 Be careful to specify proper syntax syncing. If this is not done right, folds
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 may differ from the displayed highlighting. This is especially relevant when
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 using patterns that match more than one line. In case of doubt, try using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 brute-force syncing: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 :syn sync fromstart
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 DIFF *fold-diff*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 The folds are automatically defined for text that is not part of a change or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 close to a change.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 This method only works properly when the 'diff' option is set for the current
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 window and changes are being displayed. Otherwise the whole buffer will be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 one big fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 The 'diffopt' option can be used to specify the context. That is, the number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 of lines between the fold and a change that are not included in the fold. For
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 example, to use a context of 8 lines: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 :set diffopt=filler,context:8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 The default context is six lines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 When 'scrollbind' is also set, Vim will attempt to keep the same folds open in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 other diff windows, so that the same text is visible.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 MARKER *fold-marker*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 Markers in the text tell where folds start and end. This allows you to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 precisely specify the folds. This will allow deleting and putting a fold,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 without the risk of including the wrong lines. The 'foldtext' option is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 normally set such that the text before the marker shows up in the folded line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 This makes it possible to give a name to the fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 Markers can have a level included, or can use matching pairs. Including a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 level is easier, you don't have to add end markers and avoid problems with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 non-matching marker pairs. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 /* global variables {{{1 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 int varA, varB;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 /* functions {{{1 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 /* funcA() {{{2 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 void funcA() {}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 /* funcB() {{{2 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 void funcB() {}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 A fold starts at a "{{{" marker. The following number specifies the fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 level. What happens depends on the difference between the current fold level
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 and the level given by the marker:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 1. If a marker with the same fold level is encountered, the previous fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 ends and another fold with the same level starts.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 2. If a marker with a higher fold level is found, a nested fold is started.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 3. if a marker with a lower fold level is found, all folds up to and including
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 this level end and a fold with the specified level starts.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
33
f6033dcbaf31 updated for version 7.0020
vimboss
parents: 8
diff changeset
197 The number indicates the fold level. A zero cannot be used (a marker with
f6033dcbaf31 updated for version 7.0020
vimboss
parents: 8
diff changeset
198 level zero is ignored). You can use "}}}" with a digit to indicate the level
f6033dcbaf31 updated for version 7.0020
vimboss
parents: 8
diff changeset
199 of the fold that ends. The fold level of the following line will be one less
f6033dcbaf31 updated for version 7.0020
vimboss
parents: 8
diff changeset
200 than the indicated level. Note that Vim doesn't look back to the level of the
f6033dcbaf31 updated for version 7.0020
vimboss
parents: 8
diff changeset
201 matching marker (that would take too much time). Example: >
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 fold level here is 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 {{{3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 fold level here is 3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 }}}3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 fold level here is 2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 You can also use matching pairs of "{{{" and "}}}" markers to define folds.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 Each "{{{" increases the fold level by one, each "}}}" decreases the fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 level by one. Be careful to keep the markers matching! Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 {{{
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 fold level here is 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 {{{
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 fold level here is 2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 }}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 fold level here is 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 You can mix using markers with a number and without a number. A useful way of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 doing this is to use numbered markers for large folds, and unnumbered markers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 locally in a function. For example use level one folds for the sections of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 your file like "structure definitions", "local variables" and "functions".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 Use level 2 markers for each definition and function, Use unnumbered markers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 inside functions. When you make changes in a function to split up folds, you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 don't have to renumber the markers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 The markers can be set with the 'foldmarker' option. It is recommended to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 keep this at the default value of "{{{,}}}", so that files can be exchanged
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 between Vim users. Only change it when it is required for the file (e.g., it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 contains markers from another folding editor, or the default markers cause
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 trouble for the language of the file).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 *fold-create-marker*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 "zf" can be used to create a fold defined by markers. Vim will insert the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 markers for you. Vim will append the start and end marker, as specified with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 'foldmarker'. The markers are appended to the end of the line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 'commentstring' is used if it isn't empty.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 This does not work properly when:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 - The line already contains a marker with a level number. Vim then doesn't
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 know what to do.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 - Folds nearby use a level number in their marker which gets in the way.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 - The line is inside a comment, 'commentstring' isn't empty and nested
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 comments don't work. For example with C: adding /* {{{ */ inside a comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 will truncate the existing comment. Either put the marker before or after
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 the comment, or add the marker manually.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 Generally it's not a good idea to let Vim create markers when you already have
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 markers with a level number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 *fold-delete-marker*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 "zd" can be used to delete a fold defined by markers. Vim will delete the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 markers for you. Vim will search for the start and end markers, as specified
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 with 'foldmarker', at the start and end of the fold. When the text around the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 marker matches with 'commentstring', that text is deleted as well.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 This does not work properly when:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 - A line contains more than one marker and one of them specifies a level.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 Only the first one is removed, without checking if this will have the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 desired effect of deleting the fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 - The marker contains a level number and is used to start or end several folds
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 at the same time.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 2. Fold commands *fold-commands* *E490*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 All folding commands start with "z". Hint: the "z" looks like a folded piece
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 of paper, if you look at it from the side.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 CREATING AND DELETING FOLDS ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 *zf* *E350*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 zf{motion} or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 {Visual}zf Operator to create a fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 This only works when 'foldmethod' is "manual" or "marker".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 The new fold will be closed for the "manual" method.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 'foldenable' will be set.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 Also see |fold-create-marker|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279 *zF*
2098
3259c3923c1e Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 2033
diff changeset
280 zF Create a fold for [count] lines. Works like "zf".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 :{range}fo[ld] *:fold* *:fo*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 Create a fold for the lines in {range}. Works like "zf".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 *zd* *E351*
42
c75153d791d0 updated for version 7.0026
vimboss
parents: 33
diff changeset
286 zd Delete one fold at the cursor. When the cursor is on a folded
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 line, that fold is deleted. Nested folds are moved one level
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 up. In Visual mode all folds (partially) in the selected area
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 are deleted. Careful: This easily deletes more folds than you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 expect and there is no undo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 This only works when 'foldmethod' is "manual" or "marker".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 Also see |fold-delete-marker|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 *zD*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 zD Delete folds recursively at the cursor. In Visual mode all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 folds (partially) in the selected area and all nested folds in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 them are deleted.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 This only works when 'foldmethod' is "manual" or "marker".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 Also see |fold-delete-marker|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301 *zE* *E352*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 zE Eliminate all folds in the window.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 This only works when 'foldmethod' is "manual" or "marker".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 Also see |fold-delete-marker|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 OPENING AND CLOSING FOLDS ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 A fold smaller than 'foldminlines' will always be displayed like it was open.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 Therefore the commands below may work differently on small folds.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 *zo*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 zo Open one fold under the cursor. When a count is given, that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 many folds deep will be opened. In Visual mode one level of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 folds is opened for all lines in the selected area.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 *zO*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 zO Open all folds under the cursor recursively. Folds that don't
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 contain the cursor line are unchanged.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 In Visual mode it opens all folds that are in the selected
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 area, also those that are only partly selected.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 *zc*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 zc Close one fold under the cursor. When a count is given, that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325 many folds deep are closed. In Visual mode one level of folds
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 is closed for all lines in the selected area.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 'foldenable' will be set.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 *zC*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 zC Close all folds under the cursor recursively. Folds that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 don't contain the cursor line are unchanged.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 In Visual mode it closes all folds that are in the selected
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 area, also those that are only partly selected.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 'foldenable' will be set.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 *za*
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 42
diff changeset
337 za When on a closed fold: open it. When folds are nested, you
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 may have to use "za" several times. When a count is given,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 that many closed folds are opened.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 When on an open fold: close it and set 'foldenable'. This
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 will only close one level, since using "za" again will open
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 the fold. When a count is given that many folds will be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 closed (that's not the same as repeating "za" that many
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344 times).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 *zA*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 zA When on a closed fold: open it recursively.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348 When on an open fold: close it recursively and set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 'foldenable'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 *zv*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 zv View cursor line: Open just enough folds to make the line in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 which the cursor is located not folded.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 *zx*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356 zx Update folds: Undo manually opened and closed folds: re-apply
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 'foldlevel', then do "zv": View cursor line.
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2098
diff changeset
358 Also forces recomputing folds. This is useful when using
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2098
diff changeset
359 'foldexpr' and the buffer is changed in a way that results in
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2098
diff changeset
360 folds not to be updated properly.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 *zX*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 zX Undo manually opened and closed folds: re-apply 'foldlevel'.
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2098
diff changeset
364 Also forces recomputing folds, like |zx|.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 *zm*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 zm Fold more: Subtract one from 'foldlevel'. If 'foldlevel' was
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 already zero nothing happens.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 'foldenable' will be set.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 *zM*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 zM Close all folds: set 'foldlevel' to 0.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 'foldenable' will be set.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 *zr*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 zr Reduce folding: Add one to 'foldlevel'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378 *zR*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 zR Open all folds. This sets 'foldlevel' to highest fold level.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381 *:foldo* *:foldopen*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 :{range}foldo[pen][!]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 Open folds in {range}. When [!] is added all folds are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 opened. Useful to see all the text in {range}. Without [!]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385 one level of folds is opened.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 *:foldc* *:foldclose*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 :{range}foldc[lose][!]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389 Close folds in {range}. When [!] is added all folds are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 closed. Useful to hide all the text in {range}. Without [!]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 one level of folds is closed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393 *zn*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394 zn Fold none: reset 'foldenable'. All folds will be open.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396 *zN*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 zN Fold normal: set 'foldenable'. All folds will be as they
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398 were before.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400 *zi*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 zi Invert 'foldenable'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404 MOVING OVER FOLDS ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 *[z*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 [z Move to the start of the current open fold. If already at the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 start, move to the start of the fold that contains it. If
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 there is no containing fold, the command fails.
2098
3259c3923c1e Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 2033
diff changeset
409 When a count is used, repeats the command [count] times.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 *]z*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412 ]z Move to the end of the current open fold. If already at the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413 end, move to the end of the fold that contains it. If there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414 is no containing fold, the command fails.
2098
3259c3923c1e Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 2033
diff changeset
415 When a count is used, repeats the command [count] times.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417 *zj*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418 zj Move downwards to the start of the next fold. A closed fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419 is counted as one fold.
2098
3259c3923c1e Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 2033
diff changeset
420 When a count is used, repeats the command [count] times.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 This command can be used after an |operator|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 *zk*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 zk Move upwards to the end of the previous fold. A closed fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 is counted as one fold.
2098
3259c3923c1e Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 2033
diff changeset
426 When a count is used, repeats the command [count] times.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 This command can be used after an |operator|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 EXECUTING COMMANDS ON FOLDS ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 :[range]foldd[oopen] {cmd} *:foldd* *:folddoopen*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 Execute {cmd} on all lines that are not in a closed fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 When [range] is given, only these lines are used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 Each time {cmd} is executed the cursor is positioned on the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 line it is executed for.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 This works like the ":global" command: First all lines that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 are not in a closed fold are marked. Then the {cmd} is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 executed for all marked lines. Thus when {cmd} changes the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 folds, this has no influence on where it is executed (except
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 when lines are deleted, of course).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 :folddoopen s/end/loop_end/ge
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 < Note the use of the "e" flag to avoid getting an error message
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 where "end" doesn't match.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 :[range]folddoc[losed] {cmd} *:folddoc* *:folddoclosed*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 Execute {cmd} on all lines that are in a closed fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 Otherwise like ":folddoopen".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 3. Fold options *fold-options*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454 COLORS *fold-colors*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 The colors of a closed fold are set with the Folded group |hl-Folded|. The
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 colors of the fold column are set with the FoldColumn group |hl-FoldColumn|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 Example to set the colors: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 :highlight Folded guibg=grey guifg=blue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 :highlight FoldColumn guibg=darkgrey guifg=white
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 FOLDLEVEL *fold-foldlevel*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 'foldlevel' is a number option: The higher the more folded regions are open.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 When 'foldlevel' is 0, all folds are closed.
42
c75153d791d0 updated for version 7.0026
vimboss
parents: 33
diff changeset
468 When 'foldlevel' is positive, some folds are closed.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 When 'foldlevel' is very high, all folds are open.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 'foldlevel' is applied when it is changed. After that manually folds can be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 opened and closed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 When increased, folds above the new level are opened. No manually opened
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 folds will be closed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 When decreased, folds above the new level are closed. No manually closed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 folds will be opened.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 FOLDTEXT *fold-foldtext*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 'foldtext' is a string option that specifies an expression. This expression
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 is evaluated to obtain the text displayed for a closed fold. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 :set foldtext=v:folddashes.substitute(getline(v:foldstart),'/\\*\\\|\\*/\\\|{{{\\d\\=','','g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485 This shows the first line of the fold, with "/*", "*/" and "{{{" removed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 Note the use of backslashes to avoid some characters to be interpreted by the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487 ":set" command. It's simpler to define a function and call that: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 :set foldtext=MyFoldText()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 :function MyFoldText()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491 : let line = getline(v:foldstart)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 : let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 : return v:folddashes . sub
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 :endfunction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 Evaluating 'foldtext' is done in the |sandbox|. The current window is set to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 the window that displays the line. Errors are ignored.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 The default value is |foldtext()|. This returns a reasonable text for most
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500 types of folding. If you don't like it, you can specify your own 'foldtext'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 expression. It can use these special Vim variables:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 v:foldstart line number of first line in the fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 v:foldend line number of last line in the fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 v:folddashes a string that contains dashes to represent the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 foldlevel.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506 v:foldlevel the foldlevel of the fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508 In the result a TAB is replaced with a space and unprintable characters are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509 made into printable characters.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
511 The resulting line is truncated to fit in the window, it never wraps.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512 When there is room after the text, it is filled with the character specified
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
513 by 'fillchars'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515 Note that backslashes need to be used for characters that the ":set" command
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 handles differently: Space, backslash and double-quote. |option-backslash|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519 FOLDCOLUMN *fold-foldcolumn*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521 'foldcolumn' is a number, which sets the width for a column on the side of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522 window to indicate folds. When it is zero, there is no foldcolumn. A normal
519
d50452846776 updated for version 7.0145
vimboss
parents: 236
diff changeset
523 value is 4 or 5. The minimal useful value is 2, although 1 still provides
d50452846776 updated for version 7.0145
vimboss
parents: 236
diff changeset
524 some information. The maximum is 12.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526 An open fold is indicated with a column that has a '-' at the top and '|'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527 characters below it. This column stops where the open fold stops. When folds
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528 nest, the nested fold is one character right of the fold it's contained in.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
529
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
530 A closed fold is indicated with a '+'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
531
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
532 Where the fold column is too narrow to display all nested folds, digits are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
533 shown to indicate the nesting level.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
534
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
535 The mouse can also be used to open and close folds by clicking in the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
536 fold column:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
537 - Click on a '+' to open the closed fold at this row.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538 - Click on any other non-blank character to close the open fold at this row.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541 OTHER OPTIONS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
543 'foldenable' 'fen': Open all folds while not set.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
544 'foldexpr' 'fde': Expression used for "expr" folding.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
545 'foldignore' 'fdi': Characters used for "indent" folding.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
546 'foldmarker' 'fmr': Defined markers used for "marker" folding.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
547 'foldmethod' 'fdm': Name of the current folding method.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
548 'foldminlines' 'fml': Minimum number of screen lines for a fold to be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
549 displayed closed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
550 'foldnestmax' 'fdn': Maximum nesting for "indent" and "syntax" folding.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
551 'foldopen' 'fdo': Which kinds of commands open closed folds.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
552 'foldclose' 'fcl': When the folds not under the cursor are closed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
553
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
554 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
555 4. Behavior of folds *fold-behavior*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
556
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
557 When moving the cursor upwards or downwards and when scrolling, the cursor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
558 will move to the first line of a sequence of folded lines. When the cursor is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
559 already on a folded line, it moves to the next unfolded line or the next
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
560 closed fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
561
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
562 While the cursor is on folded lines, the cursor is always displayed in the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
563 first column. The ruler does show the actual cursor position, but since the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
564 line is folded, it cannot be displayed there.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
565
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
566 Many movement commands handle a sequence of folded lines like an empty line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
567 For example, the "w" command stops once in the first column.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
568
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
569 When in Insert mode, the cursor line is never folded. That allows you to see
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
570 what you type!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
571
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
572 When using an operator, a closed fold is included as a whole. Thus "dl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
573 deletes the whole closed fold under the cursor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
574
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
575 For Ex commands the range is adjusted to always start at the first line of a
8
7edf9b6e4c36 Various changes
vimboss
parents: 7
diff changeset
576 closed fold and end at the last line of a closed fold. Thus this command: >
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
577 :s/foo/bar/g
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
578 when used with the cursor on a closed fold, will replace "foo" with "bar" in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
579 all lines of the fold.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
580 This does not happen for |:folddoopen| and |:folddoclosed|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
581
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
582 When editing a buffer that has been edited before, the last used folding
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
583 settings are used again. For manual folding the defined folds are restored.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
584 For all folding methods the manually opened and closed folds are restored.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
585 If this buffer has been edited in this window, the values from back then are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
586 used. Otherwise the values from the window where the buffer was edited last
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
587 are used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
588
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
589 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
590 vim:tw=78:ts=8:ft=help:norl: