diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-10-17 11:34:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-17 11:34:02 -0400 |
| commit | 0851e7dabed9fc9c019e22088029f36e9f3ec3e3 (patch) | |
| tree | 35a1abb6a3d08b49e6a45ad3de089b622e1605ae /runtime/doc/fold.txt | |
| parent | f8b704e019ed8194a5e873773670b263abd3dedf (diff) | |
| download | rneovim-master.tar.gz rneovim-master.tar.bz2 rneovim-master.zip | |
docs(help): specify h4 "function signature" format #42434master
Work towards enabling ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
in all `:help` files.
Problem:
The final boss of vimdoc pseudo-structure: Vim's quasi-headings on
function signatures and excmd docs is visually distinctive but too
inconsistent for a nice parse rule.
Solution:
- Define the quasi-heading format as an "h4" variant, specified at
`:help help-tag-heading`.
- For simplicity and predictability, it is defined as any line that
ends with a help tag(s) preceded by 2 or more spaces (or 1 tab).
- Update existing docs.
- This one-time update has a lot of changes, but is very unlikely to
conflict with ported Vim-patches because (1) Vim rarely adds new
*excmds* that we want, and (2) *function* docs are auto-generated.
ref https://github.com/neovim/tree-sitter-vimdoc/issues/110
Diffstat (limited to 'runtime/doc/fold.txt')
| -rw-r--r-- | runtime/doc/fold.txt | 104 |
1 files changed, 51 insertions, 53 deletions
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 5eb22f9f10..c611414095 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -332,22 +332,22 @@ of paper, if you look at it from the side. CREATING AND DELETING FOLDS ~ - *zf* *E350* -zf{motion} or -{Visual}zf Operator to create a fold. +zf{motion} *zf* *E350* +{Visual}zf + Operator to create a fold. This only works when 'foldmethod' is "manual" or "marker". The new fold will be closed for the "manual" method. 'foldenable' will be set. Also see |fold-create-marker|. - *zF* -zF Create a fold for [count] lines. Works like "zf". +zF *zF* + Create a fold for [count] lines. Works like "zf". :{range}fo[ld] *:fold* *:fo* Create a fold for the lines in {range}. Works like "zf". - *zd* *E351* -zd Delete one fold at the cursor. When the cursor is on a folded +zd *zd* *E351* + Delete one fold at the cursor. When the cursor is on a folded line, that fold is deleted. Nested folds are moved one level up. In Visual mode one level of all folds (partially) in the selected area are deleted. @@ -356,15 +356,15 @@ zd Delete one fold at the cursor. When the cursor is on a folded This only works when 'foldmethod' is "manual" or "marker". Also see |fold-delete-marker|. - *zD* -zD Delete folds recursively at the cursor. In Visual mode all +zD *zD* + Delete folds recursively at the cursor. In Visual mode all folds (partially) in the selected area and all nested folds in them are deleted. This only works when 'foldmethod' is "manual" or "marker". Also see |fold-delete-marker|. - *zE* *E352* -zE Eliminate all folds in the window. +zE *zE* *E352* + Eliminate all folds in the window. This only works when 'foldmethod' is "manual" or "marker". Also see |fold-delete-marker|. @@ -374,32 +374,32 @@ OPENING AND CLOSING FOLDS ~ A fold smaller than 'foldminlines' will always be displayed like it was open. Therefore the commands below may work differently on small folds. - *zo* -zo Open one fold under the cursor. When a count is given, that +zo *zo* + Open one fold under the cursor. When a count is given, that many folds deep will be opened. In Visual mode one level of folds is opened for all lines in the selected area. - *zO* -zO Open all folds under the cursor recursively. Folds that don't +zO *zO* + Open all folds under the cursor recursively. Folds that don't contain the cursor line are unchanged. In Visual mode it opens all folds that are in the selected area, also those that are only partly selected. - *zc* -zc Close one fold under the cursor. When a count is given, that +zc *zc* + Close one fold under the cursor. When a count is given, that many folds deep are closed. In Visual mode one level of folds is closed for all lines in the selected area. 'foldenable' will be set. - *zC* -zC Close all folds under the cursor recursively. Folds that +zC *zC* + Close all folds under the cursor recursively. Folds that don't contain the cursor line are unchanged. In Visual mode it closes all folds that are in the selected area, also those that are only partly selected. 'foldenable' will be set. - *za* -za Summary: Toggle the fold under the cursor. +za *za* + Summary: Toggle the fold under the cursor. When on a closed fold: open it. When folds are nested, you may have to use "za" several times. When a count is given, that many closed folds are opened. @@ -409,62 +409,60 @@ za Summary: Toggle the fold under the cursor. closed (that's not the same as repeating "za" that many times). - *zA* -zA When on a closed fold: open it recursively. +zA *zA* + When on a closed fold: open it recursively. When on an open fold: close it recursively and set 'foldenable'. - *zv* -zv View cursor line: Open just enough folds to make the line in +zv *zv* + View cursor line: Open just enough folds to make the line in which the cursor is located not folded. - *zx* -zx Update folds: Undo manually opened and closed folds: re-apply +zx *zx* + Update folds: Undo manually opened and closed folds: re-apply 'foldlevel', then do "zv": View cursor line. Also forces recomputing folds. This is useful when using 'foldexpr' and the buffer is changed in a way that results in folds not to be updated properly. - *zX* -zX Undo manually opened and closed folds: re-apply 'foldlevel'. +zX *zX* + Undo manually opened and closed folds: re-apply 'foldlevel'. Also forces recomputing folds, like |zx|. - *zm* -zm Fold more: Subtract |v:count1| from 'foldlevel'. If +zm *zm* + Fold more: Subtract |v:count1| from 'foldlevel'. If 'foldlevel' was already zero nothing happens. 'foldenable' will be set. - *zM* -zM Close all folds: set 'foldlevel' to 0. +zM *zM* + Close all folds: set 'foldlevel' to 0. 'foldenable' will be set. - *zr* -zr Reduce folding: Add |v:count1| to 'foldlevel'. +zr *zr* + Reduce folding: Add |v:count1| to 'foldlevel'. - *zR* -zR Open all folds. This sets 'foldlevel' to highest fold level. +zR *zR* + Open all folds. This sets 'foldlevel' to highest fold level. - *:foldo* *:foldopen* -:{range}foldo[pen][!] +:{range}foldo[pen][!] *:foldo* *:foldopen* Open folds in {range}. When [!] is added all folds are opened. Useful to see all the text in {range}. Without [!] one level of folds is opened. - *:foldc* *:foldclose* -:{range}foldc[lose][!] +:{range}foldc[lose][!] *:foldc* *:foldclose* Close folds in {range}. When [!] is added all folds are closed. Useful to hide all the text in {range}. Without [!] one level of folds is closed. - *zn* -zn Fold none: reset 'foldenable'. All folds will be open. +zn *zn* + Fold none: reset 'foldenable'. All folds will be open. - *zN* -zN Fold normal: set 'foldenable'. All folds will be as they +zN *zN* + Fold normal: set 'foldenable'. All folds will be as they were before. - *zi* -zi Invert 'foldenable'. +zi *zi* + Invert 'foldenable'. MOVING OVER FOLDS ~ @@ -474,20 +472,20 @@ MOVING OVER FOLDS ~ there is no containing fold, the command fails. When a count is used, repeats the command [count] times. - *]z* -]z Move to the end of the current open fold. If already at the +]z *]z* + Move to the end of the current open fold. If already at the end, move to the end of the fold that contains it. If there is no containing fold, the command fails. When a count is used, repeats the command [count] times. - *zj* -zj Move downwards to the start of the next fold. A closed fold +zj *zj* + Move downwards to the start of the next fold. A closed fold is counted as one fold. When a count is used, repeats the command [count] times. This command can be used after an |operator|. - *zk* -zk Move upwards to the end of the previous fold. A closed fold +zk *zk* + Move upwards to the end of the previous fold. A closed fold is counted as one fold. When a count is used, repeats the command [count] times. This command can be used after an |operator|. |