aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/change.txt
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
commit931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch)
treed8c1843a95da5ea0bb4acc09f7e37843d9995c86 /runtime/doc/change.txt
parent142d9041391780ac15b89886a54015fdc5c73995 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-userreg.tar.gz
rneovim-userreg.tar.bz2
rneovim-userreg.zip
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'runtime/doc/change.txt')
-rw-r--r--runtime/doc/change.txt67
1 files changed, 42 insertions, 25 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 990ba3d8fd..e1bb7c5fc7 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -196,6 +196,7 @@ gR Enter Virtual Replace mode: Each character you type
*v_r*
{Visual}r{char} Replace all selected characters by {char}.
+ CTRL-C will be inserted literally.
*v_C*
{Visual}["x]C Delete the highlighted lines [into register x] and
@@ -276,7 +277,9 @@ gr{char} Replace the virtual characters under the cursor with
{char}. This replaces in screen space, not file
space. See |gR| and |Virtual-Replace-mode| for more
details. As with |r| a count may be given.
- {char} can be entered like with |r|.
+ {char} can be entered like with |r|, but characters
+ that have a special meaning in Insert mode, such as
+ most CTRL-keys, cannot be used.
*digraph-arg*
The argument for Normal mode commands like |r| and |t| is a single character.
@@ -425,6 +428,11 @@ Note similarly, when 'nrformats' includes "bin", binary numbers with a leading
'0x' or '0X' can be interpreted as hexadecimal rather than binary since '0b'
are valid hexadecimal digits.
+When the number under the cursor is too big to fit into 64 bits, it will be
+rounded off to the nearest number that can be represented, and the
+addition/subtraction is skipped. E.g. CTRL-X on 18446744073709551616 results
+in 18446744073709551615. Same for larger numbers, such as 18446744073709551618.
+
The CTRL-A command is very useful in a macro. Example: Use the following
steps to make a numbered list.
@@ -574,18 +582,29 @@ with ".". Vim does not recognize a comment (starting with '"') after the
{Visual}= Filter the highlighted lines like with ={motion}.
- *tempfile* *setuid*
-Vim uses temporary files for filtering, generating diffs and also for
-tempname(). For Unix, the file will be in a private directory (only
-accessible by the current user) to avoid security problems (e.g., a symlink
-attack or other people reading your file). When Vim exits the directory and
-all files in it are deleted. When Vim has the setuid bit set this may cause
-problems, the temp file is owned by the setuid user but the filter command
-probably runs as the original user.
-Directory for temporary files is created in the first possible directory of:
+ *tempdir* *tempfile* *setuid*
+Nvim uses temporary files for filtering and generating diffs. Plugins also
+commonly use |tempname()| for their own purposes. On the first request for
+a temporary file, Nvim creates a common directory (the "Nvim tempdir"), to
+serve as storage for all temporary files (including `stdpath("run")` files
+|$XDG_RUNTIME_DIR|) in the current session.
+
+The Nvim tempdir is created in the first available system tempdir:
Unix: $TMPDIR, /tmp, current-dir, $HOME.
Windows: $TMPDIR, $TMP, $TEMP, $USERPROFILE, current-dir.
+On unix the tempdir is created with permissions 0700 (only accessible by the
+current user) to avoid security problems (e.g. symlink attacks). On exit,
+Nvim deletes the tempdir and its contents.
+ *E5431*
+If you see an error or |log| message like: >
+ E5431: tempdir disappeared (2 times)
+this means an external process on your system deleted the Nvim tempdir.
+Typically this is caused by "antivirus" or a misconfigured cleanup service.
+
+If Nvim has the setuid bit set this may cause problems: the temp file
+is owned by the setuid user but the filter command probably runs as the
+original user.
4.2 Substitute *:substitute*
@@ -600,9 +619,9 @@ Directory for temporary files is created in the first possible directory of:
current line only. When [count] is given, replace in
[count] lines, starting with the last line in [range].
When [range] is omitted start in the current line.
- *E939*
- [count] must be a positive number. Also see
- |cmdline-ranges|.
+ *E939* *E1510*
+ [count] must be a positive number (max 2147483647)
+ Also see |cmdline-ranges|.
See |:s_flags| for [flags].
The delimiter doesn't need to be /, see
@@ -976,7 +995,7 @@ inside of strings can change! Also see 'softtabstop' option. >
< to display registers '1' and 'a'. Spaces are allowed
in {arg}.
- *:di* *:display*
+ *:di* *:dis* *:display*
:di[splay] [arg] Same as :registers.
*y* *yank*
@@ -1472,7 +1491,7 @@ white space). Three types of comments can be used:
lines. An example is this list with dashes.
- Three-piece comments that have a start string, an end string, and optional
lines in between. The strings for the start, middle and end are different.
- An example is the C style comment:
+ An example is the C style comment: >
/*
* this is a C comment
*/
@@ -1547,20 +1566,20 @@ When you hit Return in a C-comment, Vim will insert the middle comment leader
for the new line: " * ". To close this comment you just have to type "/"
before typing anything else on the new line. This will replace the
middle-comment leader with the end-comment leader and apply any specified
-alignment, leaving just " */". There is no need to hit Backspace first.
+alignment, leaving just `" */"`. There is no need to hit Backspace first.
When there is a match with a middle part, but there also is a matching end
part which is longer, the end part is used. This makes a C style comment work
without requiring the middle part to end with a space.
Here is an example of alignment flags at work to make a comment stand out
-(kind of looks like a 1 too). Consider comment string: >
+(kind of looks like a 1 too). Consider comment string: >vim
:set comments=sr:/***,m:**,ex-2:******/
-<
+>
/*** ~
**<--right aligned from "r" flag ~
** ~
-offset 2 spaces for the "-2" flag--->** ~
+ offset 2 spaces for the "-2" flag-->** ~
******/ ~
In this case, the first comment was typed, then return was pressed 4 times,
then "/" was pressed to end the comment.
@@ -1712,8 +1731,6 @@ Note that when 'textwidth' is 0, Vim does no automatic formatting anyway (but
does insert comment leaders according to the 'comments' option). An exception
is when the 'a' flag is present. |auto-format|
-Note that when 'paste' is on, Vim does no formatting at all.
-
Note that 'textwidth' can be non-zero even if Vim never performs auto-wrapping;
'textwidth' is still useful for formatting with "gq".
@@ -1725,10 +1742,10 @@ happens with formatting and auto-wrapping. Opening a line after a line
starting with "/*" or "*" and containing "*/", will cause no comment leader to
be inserted, and the indent of the new line is taken from the line containing
the start of the comment.
-E.g.:
- /* ~
- * Your typical comment. ~
- */ ~
+E.g.: >
+ /*
+ * Your typical comment.
+ */
The indent on this line is the same as the start of the above
comment.