diff options
Diffstat (limited to 'runtime/doc/change.txt')
-rw-r--r-- | runtime/doc/change.txt | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 953f097a92..b905f53db7 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -42,8 +42,6 @@ For inserting text see |insert.txt|. of the line and [count]-1 more lines [into register x]; synonym for "d$". (not |linewise|) - When the '#' flag is in 'cpoptions' the count is - ignored. {Visual}["x]x or *v_x* *v_d* *v_<Del>* {Visual}["x]d or @@ -355,14 +353,14 @@ CTRL-A Add [count] to the number or alphabetic character at *v_CTRL-A* {Visual}CTRL-A Add [count] to the number or alphabetic character in - the highlighted text. {not in Vi} + the highlighted text. *v_g_CTRL-A* {Visual}g CTRL-A Add [count] to the number or alphabetic character in the highlighted text. If several lines are highlighted, each one will be incremented by an additional [count] (so effectively creating a - [count] incrementing sequence). {not in Vi} + [count] incrementing sequence). For Example, if you have this list of numbers: 1. ~ 1. ~ @@ -381,14 +379,14 @@ CTRL-X Subtract [count] from the number or alphabetic *v_CTRL-X* {Visual}CTRL-X Subtract [count] from the number or alphabetic - character in the highlighted text. {not in Vi} + character in the highlighted text. *v_g_CTRL-X* {Visual}g CTRL-X Subtract [count] from the number or alphabetic character in the highlighted text. If several lines are highlighted, each value will be decremented by an additional [count] (so effectively creating a [count] - decrementing sequence). {not in Vi} + decrementing sequence). The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned binary/octal/hexadecimal numbers and alphabetic characters. @@ -585,7 +583,7 @@ 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 suitable directory of: +Directory for temporary files is created in the first possible directory of: Unix: $TMPDIR, /tmp, current-dir, $HOME. Windows: $TMPDIR, $TMP, $TEMP, $USERPROFILE, current-dir. @@ -635,6 +633,9 @@ Directory for temporary files is created in the first suitable directory of: actually work differently. You can use `:&&` to keep the flags. + *&-default* + Mapped to ":&&<CR>" by default. |default-mappings| + *g&* g& Synonym for `:%s//~/&` (repeat last substitute with last search pattern on all lines with the same flags). @@ -906,7 +907,7 @@ Consider using a character like "@" or ":". There is no problem if the result of the expression contains the separation character. Examples: > - :s@\n@\="\r" . expand("$HOME") . "\r"@ + :s@\n@\="\r" .. expand("$HOME") .. "\r"@ This replaces an end-of-line with a new line containing the value of $HOME. > s/E/\="\<Char-0x20ac>"/g @@ -1018,7 +1019,7 @@ inside of strings can change! Also see 'softtabstop' option. > in [range] (default: current line |cmdline-ranges|), [into register x]. - *p* *put* *E353* + *p* *put* *E353* *E1240* ["x]p Put the text [from register x] after the cursor [count] times. @@ -1065,7 +1066,7 @@ inside of strings can change! Also see 'softtabstop' option. > the command. You need to escape the '|' and '"' characters to prevent them from terminating the command. Example: > - :put ='path' . \",/test\" + :put ='path' .. \",/test\" < If there is no expression after '=', Vim uses the previous expression. You can see it with ":dis =". @@ -1118,11 +1119,15 @@ register. With blockwise selection it also depends on the size of the block and whether the corners are on an existing character. (Implementation detail: it actually works by first putting the register after the selection and then deleting the selection.) -The previously selected text is put in the unnamed register. If you want to -put the same text into a Visual selection several times you need to use -another register. E.g., yank the text to copy, Visually select the text to -replace and use "0p . You can repeat this as many times as you like, the -unnamed register will be changed each time. +With |p| the previously selected text is put in the unnamed register (and +possibly the selection and/or clipboard). This is useful if you want to put +that text somewhere else. But you cannot repeat the same change. +With |P| the unnamed register is not changed (and neither the selection or +clipboard), you can repeat the same change. But the deleted text cannot be +used. If you do need it you can use |p| with another register. E.g., yank +the text to copy, Visually select the text to replace and use "0p . You can +repeat this as many times as you like, and the unnamed register will be +changed each time. When you use a blockwise Visual mode command and yank only a single line into a register, a paste on a visual selected area will paste that single line on @@ -1205,7 +1210,7 @@ to their previous contents. When the '>' flag is present in 'cpoptions' then a line break is inserted before the appended text. 5. Read-only registers ":, ". and "% -These are '%', '#', ':' and '.'. You can use them only with the "p", "P", +These are '%', ':' and '.'. You can use them only with the "p", "P", and ":put" commands and with CTRL-R. *quote_.* *quote.* *E29* ". Contains the last inserted text (the same as what is inserted @@ -1584,11 +1589,10 @@ You can use the 'formatoptions' option to influence how Vim formats text. can separate the option letters with commas for readability. letter meaning when present in 'formatoptions' ~ - *fo-t* -t Auto-wrap text using textwidth +t Auto-wrap text using 'textwidth' *fo-c* -c Auto-wrap comments using textwidth, inserting the current comment +c Auto-wrap comments using 'textwidth', inserting the current comment leader automatically. *fo-r* r Automatically insert the current comment leader after hitting @@ -1597,6 +1601,9 @@ r Automatically insert the current comment leader after hitting o Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode. In case comment is unwanted in a specific place use CTRL-U to quickly delete it. |i_CTRL-U| + *fo-/* +/ When 'o' is included: do not insert the comment leader for a // + comment after a statement, only when // is at the start of the line. *fo-q* q Allow formatting of comments with "gq". Note that formatting will not change blank lines or lines containing @@ -1659,8 +1666,8 @@ B When joining lines, don't insert a space between two multibyte 1 Don't break a line after a one-letter word. It's broken before it instead (if possible). *fo-]* -] Respect textwidth rigorously. With this flag set, no line can be - longer than textwidth, unless line-break-prohibition rules make this +] Respect 'textwidth' rigorously. With this flag set, no line can be + longer than 'textwidth', unless line-break-prohibition rules make this impossible. Mainly for CJK scripts and works only if 'encoding' is "utf-8". *fo-j* |