aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/diff.txt
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-10-17 11:34:02 -0400
committerGitHub <noreply@github.com>2026-10-17 11:34:02 -0400
commit0851e7dabed9fc9c019e22088029f36e9f3ec3e3 (patch)
tree35a1abb6a3d08b49e6a45ad3de089b622e1605ae /runtime/doc/diff.txt
parentf8b704e019ed8194a5e873773670b263abd3dedf (diff)
downloadrneovim-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/diff.txt')
-rw-r--r--runtime/doc/diff.txt26
1 files changed, 12 insertions, 14 deletions
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index 3c07c20536..acfbd9eb16 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -83,8 +83,8 @@ While already in Vim you can start diff mode in three ways.
as for "nvim -d" for the current and the newly opened window.
Also see 'diffexpr'.
- *:difft* *:diffthis*
-:difft[his] Make the current window part of the diff windows. This sets
+:difft[his] *:difft* *:diffthis*
+ Make the current window part of the diff windows. This sets
the options as for "nvim -d".
:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch*
@@ -114,8 +114,8 @@ There can be up to eight buffers with 'diff' set.
Since the option values are remembered with the buffer, you can edit another
file for a moment and come back to the same file and be in diff mode again.
- *:diffo* *:diffoff*
-:diffo[ff] Switch off diff mode for the current window. Resets related
+:diffo[ff] *:diffo* *:diffoff*
+ Switch off diff mode for the current window. Resets related
options also when 'diff' was not set.
:diffo[ff]! Switch off diff mode for the current window and in all windows
@@ -182,8 +182,8 @@ hidden buffers. You can use ":hide" to close a window without unloading the
buffer. If you don't want a buffer to remain used for the diff do ":set
nodiff" before hiding it.
- *:dif* *:diff* *:diffupdate*
-:dif[fupdate][!] Update the diff highlighting and folds.
+:dif[fupdate][!] *:dif* *:diff* *:diffupdate*
+ Update the diff highlighting and folds.
Vim attempts to keep the differences updated when you make changes to the
text. This mostly takes care of inserted and deleted lines. Changes within a
@@ -262,8 +262,7 @@ It is an error if there is no change for the cursor to move to.
There are two commands to copy text from one buffer to another. The result is
that the buffers will be equal within the specified range.
- *:diffg* *:diffget*
-:[range]diffg[et] [bufspec]
+:[range]diffg[et] [bufspec] *:diffg* *:diffget*
Modify the current buffer to undo difference with another
buffer. If [bufspec] is given, that buffer is used. If
[bufspec] refers to the current buffer then nothing happens.
@@ -271,8 +270,7 @@ that the buffers will be equal within the specified range.
mode.
See below for [range].
- *:diffpu* *:diffput* *E793*
-:[range]diffpu[t] [bufspec]
+:[range]diffpu[t] [bufspec] *:diffpu* *:diffput* *E793*
Modify another buffer to undo difference with the current
buffer. Just like ":diffget" but the other buffer is modified
instead of the current one.
@@ -280,15 +278,15 @@ that the buffers will be equal within the specified range.
buffer in diff mode where 'modifiable' is set this fails.
See below for [range].
- *do*
-[count]do Same as ":diffget" without range. The "o" stands for "obtain"
+[count]do *do*
+ Same as ":diffget" without range. The "o" stands for "obtain"
("dg" can't be used, it could be the start of "dgg"!). Note:
this doesn't work in Visual mode.
If you give a [count], it is used as the [bufspec] argument
for ":diffget".
- *dp*
-[count]dp Same as ":diffput" without range. Note: this doesn't work in
+[count]dp *dp*
+ Same as ":diffput" without range. Note: this doesn't work in
Visual mode.
If you give a [count], it is used as the [bufspec] argument
for ":diffput".