Tutorial by Examples

:set foldmethod={method} sets the fold method for the current window. This determines how folds are manipulated within that window. Valid options for "method" are: manual (folds are manually created and destroyed by the user) indent (folds are created for lines of equal indentation) m...
zf{motion} creates a fold that covers the text that "motion" would cover. {count}zF creates a fold that covers "count" lines. {range}fo[ld] creates a fold for the lines in the provided range. All three commands are valid only when foldmethod is set to manual or marker. In ...
zo opens a fold underneath the cursor. zO opens all folds underneath the cursor, recursively. zc closes a fold underneath the cursor. zC closes all folds underneath the cursor, recursively. za toggles a fold under the cursor (a closed fold is opened, an opened fold is closed). zM closes all f...
zv will ensure the line containing the cursor is not folded. The minimum number of folds required to expose the cursor line will be opened.
This is our buffer: void write_buffer(size_t size, char ** buffer) { char * buf = *buffer; size_t iter; for(iter = 0; iter < size; iter++) { putc(*(buf + iter)); } } The cursor is at [1][1] ([line][col]). Move the cursor to the curl bracket of the for loop...

Page 1 of 1