Function key commands

A fold is closed with the `close current fold' command which closes the deepest fold (nesting) in which the cursor currently resides. This command is given with the F6 key. The whole fold then becomes represented by a single line which is created upon issuing of the `close fold' command. This line looks like the first line of the fold with one exception: the opening square bracket ([) is replaced by a second number sign (#). Internally this line is quite different from normal lines, as it has to keep track of where the lines are that are hidden inside the fold. Therefore this line may not be changed! The only thing one is allowed to do with such a line besides opening the fold again is to cut and paste text which contains the whole line. In this way, whole blocks of text can be moved around quite easily as closed folds.

A fold is opened by putting the cursor in the fold line (the line representing the whole fold) and issuing the `open fold' command F7. In opened state all lines of a fold are are normal lines. Hence there is no restriction on the alteration of the beginning and ending fold lines when the fold is open, so care must be taken to maintain the proper syntax for the folding mechanism to work properly.

To close all folds of a file you may issue the command Shift-F6 and to open all folds the command Shift-F7 is to be used.