aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/recover.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/recover.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/recover.txt')
-rw-r--r--runtime/doc/recover.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt
index ce90d52779..3e2bc0f593 100644
--- a/runtime/doc/recover.txt
+++ b/runtime/doc/recover.txt
@@ -12,9 +12,9 @@ next morning, and then disaster strikes: Your computer crashes.
DON'T PANIC!
You can recover most of your changes from the files that Vim uses to store
-the contents of the file. Mostly you can recover your work with one command:
+the contents of the file. Mostly you can recover your work with one command: >
vim -r filename
-
+<
Type |gO| to see the table of contents.
==============================================================================
@@ -51,6 +51,7 @@ Advantages:
- You will not pollute the directories with ".swp" files.
- When the 'directory' is on another partition, reduce the risk of damaging
the file system where the file is (in a crash).
+
Disadvantages:
- You can get name collisions from files with the same name but in different
directories (although Vim tries to avoid that by comparing the path name).
@@ -60,7 +61,7 @@ Disadvantages:
warning message.
If you want to put swap files in a fixed place, put a command resembling the
-following ones in your vimrc:
+following ones in your vimrc: >
:set dir=~/tmp (for Unix)
:set dir=c:\\tmp (for Win32)
This is also very handy when editing files on floppy. Of course you will have
@@ -114,8 +115,8 @@ after this.
If you want to make sure that your changes are in the swap file use this
command:
- *:pre* *:preserve* *E313* *E314*
-:pre[serve] Write all text for the current buffer into its swap
+:pre[serve] *:pre* *:preserve* *E313* *E314*
+ Write all text for the current buffer into its swap
file. The original file is no longer needed for
recovery.
@@ -154,8 +155,8 @@ This is easy when you start Vim to edit a file and you get the "ATTENTION:
Found a swap file ..." message. In this case the single command ":recover"
will do the work. You can also give the name of the file or the swap file to
the recover command:
- *:rec* *:recover* *E305* *E306* *E307*
-:rec[over] [file] Try to recover [file] from the swap file. If [file]
+:rec[over] [file] *:rec* *:recover* *E305* *E306* *E307*
+ Try to recover [file] from the swap file. If [file]
is not given use the file name for the current
buffer. The current contents of the buffer are lost.
This command fails if the buffer was modified.