summaryrefslogtreecommitdiffstats
path: root/runtime/doc
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-07 22:18:52 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-07 22:18:52 +0200
commit1c6737b20a5cf71751b180461cea22fc76d8870c (patch)
treeb4fb75497cb2c47f09de1de5bea821af222756ce /runtime/doc
parent9c929713b7588f2e44a1533809d2ba0bbd2631be (diff)
Update runtime files.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/eval.txt18
-rw-r--r--runtime/doc/map.txt69
-rw-r--r--runtime/doc/message.txt4
-rw-r--r--runtime/doc/options.txt11
-rw-r--r--runtime/doc/pattern.txt24
-rw-r--r--runtime/doc/tags4
-rw-r--r--runtime/doc/terminal.txt8
-rw-r--r--runtime/doc/testing.txt2
-rw-r--r--runtime/doc/todo.txt56
-rw-r--r--runtime/doc/usr_03.txt19
-rw-r--r--runtime/doc/usr_40.txt10
-rw-r--r--runtime/doc/usr_41.txt48
-rw-r--r--runtime/doc/version5.txt4
-rw-r--r--runtime/doc/vim9.txt122
-rw-r--r--runtime/doc/windows.txt8
15 files changed, 230 insertions, 177 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 130e6423b9..e72a388302 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 aug 30
+*eval.txt* For Vim version 8.2. Last change: 2020 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -120,8 +120,9 @@ base, use |str2nr()|.
*TRUE* *FALSE* *Boolean*
For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
-You can also use |v:false| and |v:true|. When TRUE is returned from a
-function it is the Number one, FALSE is the number zero.
+You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|.
+When TRUE is returned from a function it is the Number one, FALSE is the
+number zero.
Note that in the command: >
:if "foo"
@@ -2360,7 +2361,7 @@ assert_equalfile({fname-one}, {fname-two} [, {msg}])
Number assert file contents are equal
assert_exception({error} [, {msg}])
Number assert {error} is in v:exception
-assert_fails({cmd} [, {error} [, {msg} [, {lnum}]]])
+assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
Number assert {cmd} fails
assert_false({actual} [, {msg}])
Number assert {actual} is false
@@ -3362,7 +3363,7 @@ bufnr([{expr} [, {create}]])
above.
If the buffer doesn't exist, -1 is returned. Or, if the
- {create} argument is present and not zero, a new, unlisted,
+ {create} argument is present and TRUE, a new, unlisted,
buffer is created and its number is returned. Example: >
let newbuf = bufnr('Scratch001', 1)
< Using an empty name uses the current buffer. To create a new
@@ -3513,7 +3514,7 @@ char2nr({expr} [, {utf8}]) *char2nr()*
Example for "utf-8": >
char2nr("á") returns 225
char2nr("á"[0]) returns 195
-< With {utf8} set to 1, always treat as utf-8 characters.
+< With {utf8} set to TRUE, always treat as utf-8 characters.
A combining character is a separate character.
|nr2char()| does the opposite.
To turn a string into a list of character numbers: >
@@ -7608,7 +7609,7 @@ perleval({expr}) *perleval()*
< {only available when compiled with the |+perl| feature}
-popup_ functions are documented here: |popup-functions|.
+popup_ functions are documented here: |popup-functions|
pow({x}, {y}) *pow()*
@@ -11040,7 +11041,8 @@ win_screenpos({nr}) *win_screenpos()*
Return the screen position of window {nr} as a list with two
numbers: [row, col]. The first window always has position
[1, 1], unless there is a tabline, then it is [2, 1].
- {nr} can be the window number or the |window-ID|.
+ {nr} can be the window number or the |window-ID|. Use zero
+ for the current window.
Return [0, 0] if the window cannot be found in the current
tabpage.
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 83fdbbb825..8900026a1f 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 8.2. Last change: 2020 Aug 30
+*map.txt* For Vim version 8.2. Last change: 2020 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -195,7 +195,7 @@ Note that this works when the <nowait> mapping fully matches and is found
before any partial matches. This works when:
- There is only one matching buffer-local mapping, since these are always
found before global mappings.
-- There is another buffer-local mapping that partly matches, but it is was
+- There is another buffer-local mapping that partly matches, but it is
defined earlier (last defined mapping is found first).
*:map-<silent>* *:map-silent*
@@ -289,15 +289,8 @@ Here is an example that inserts a list number that increases: >
CTRL-L inserts the next number, CTRL-R resets the count. CTRL-R returns an
empty string, so that nothing is inserted.
-Note that there are some tricks to make special keys work and escape CSI bytes
-in the text. The |:map| command also does this, thus you must avoid that it
-is done twice. This does not work: >
- :imap <expr> <F3> "<Char-0x611B>"
-Because the <Char- sequence is escaped for being a |:imap| argument and then
-again for using <expr>. This does work: >
- :imap <expr> <F3> "\u611B"
-Using 0x80 as a single byte before other text does not work, it will be seen
-as a special key.
+Note that using 0x80 as a single byte before other text does not work, it will
+be seen as a special key.
1.3 MAPPING AND MODES *:map-modes*
@@ -881,35 +874,47 @@ g@{motion} Call the function set by the 'operatorfunc' option.
Here is an example that counts the number of spaces with <F4>: >
- nmap <silent> <F4> :set opfunc=CountSpaces<CR>g@
- vmap <silent> <F4> :<C-U>call CountSpaces(visualmode(), 1)<CR>
+ nnoremap <expr> <F4> CountSpaces()
+ xnoremap <expr> <F4> CountSpaces()
+ " doubling <F4> works on a line
+ nnoremap <expr> <F4><F4> CountSpaces() .. '_'
- function! CountSpaces(type, ...)
- let sel_save = &selection
- let &selection = "inclusive"
- let reg_save = @@
-
- if a:0 " Invoked from Visual mode, use gv command.
- silent exe "normal! gvy"
- elseif a:type == 'line'
- silent exe "normal! '[V']y"
- else
- silent exe "normal! `[v`]y"
- endif
-
- echomsg strlen(substitute(@@, '[^ ]', '', 'g'))
+ function CountSpaces(type = '') abort
+ if a:type == ''
+ set opfunc=CountSpaces
+ return 'g@'
+ endif
- let &selection = sel_save
- let @@ = reg_save
+ let sel_save = &selection
+ let reg_save = getreginfo('"')
+ let cb_save = &clipboard
+ let visual_marks_save = [getpos("'<"), getpos("'>")]
+
+ try
+ set clipboard= selection=inclusive
+ let commands = #{line: "'[V']y", char: "`[v`]y", block: "`[\<c-v>`]y"}
+ silent exe 'noautocmd keepjumps normal! ' .. get(commands, a:type, '')
+ echom getreg('"')->count(' ')
+ finally
+ call setreg('"', reg_save)
+ call setpos("'<", visual_marks_save[0])
+ call setpos("'>", visual_marks_save[1])
+ let &clipboard = cb_save
+ let &selection = sel_save
+ endtry
endfunction
+An <expr> mapping is used to be able to fetch any prefixed count and register.
+This also avoids using a command line, which would trigger CmdlineEnter and
+CmdlineLeave autocommands.
+
Note that the 'selection' option is temporarily set to "inclusive" to be able
to yank exactly the right text by using Visual mode from the '[ to the ']
mark.
-Also note that there is a separate mapping for Visual mode. It removes the
-"'<,'>" range that ":" inserts in Visual mode and invokes the function with
-visualmode() and an extra argument.
+Also note that the 'clipboard' option is temporarily emptied to avoid
+clobbering the `"*` or `"+` registers, if its value contains the item `unnamed`
+or `unnamedplus`.
==============================================================================
2. Abbreviations *abbreviations* *Abbreviations*
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 5024b3e1e2..9ce649db45 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -1,4 +1,4 @@
-*message.txt* For Vim version 8.2. Last change: 2020 Aug 20
+*message.txt* For Vim version 8.2. Last change: 2020 Sep 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -75,7 +75,7 @@ See `:messages` above.
LIST OF MESSAGES
- *E222* *E228* *E232* *E256* *E293* *E298* *E304* *E317*
+ *E222* *E228* *E232* *E293* *E298* *E304* *E317*
*E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322*
*E323* *E341* *E473* *E570* *E685* *E292* >
Add to read buffer
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index b5ceb38db5..85a0296e0b 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 8.2. Last change: 2020 Aug 28
+*options.txt* For Vim version 8.2. Last change: 2020 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -701,6 +701,7 @@ A jump table for the options with a short description can be found at |Q_op|.
"double": Use twice the width of ASCII characters.
*E834* *E835*
The value "double" cannot be used if 'listchars' or 'fillchars'
+ contains a character that would be double width.
The values are overruled for characters specified with
|setcellwidths()|.
@@ -6563,7 +6564,7 @@ A jump table for the options with a short description can be found at |Q_op|.
For the Amiga the default is ">". For MS-Windows the default is
">%s 2>&1". The output is directly saved in a file and not echoed to
the screen.
- For Unix the default it "| tee". The stdout of the compiler is saved
+ For Unix the default is "| tee". The stdout of the compiler is saved
in a file and echoed to the screen. If the 'shell' option is "csh" or
"tcsh" after initializations, the default becomes "|& tee". If the
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
@@ -7807,8 +7808,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'termwinsize'* *'tws'*
'termwinsize' 'tws' string (default "")
local to window
- Size of the |terminal| window. Format: {rows}x{columns} or
- {rows}*{columns}.
+ Size used when opening the |terminal| window. Format:
+ {rows}x{columns} or {rows}*{columns}.
- When empty the terminal gets the size from the window.
- When set with a "x" (e.g., "24x80") the terminal size is not
adjusted to the window size. If the window is smaller only the
@@ -7819,6 +7820,8 @@ A jump table for the options with a short description can be found at |Q_op|.
- When rows is zero then use the height of the window.
- When columns is zero then use the width of the window.
- Using "0x0" or "0*0" is the same as empty.
+ - Can be overruled in the |term_start()| options with "term_rows" and
+ "term_cols".
Examples:
"30x0" uses 30 rows and the current window width.
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index f9a34d4a2d..19edb7268b 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 8.2. Last change: 2020 Aug 15
+*pattern.txt* For Vim version 8.2. Last change: 2020 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -797,11 +797,12 @@ An ordinary atom can be:
^beep( the start of the C function "beep" (probably).
*/\^*
-\^ Matches literal '^'. Can be used at any position in the pattern.
+\^ Matches literal '^'. Can be used at any position in the pattern, but
+ not inside [].
*/\_^*
\_^ Matches start-of-line. |/zero-width| Can be used at any position in
- the pattern.
+ the pattern, but not inside [].
Example matches ~
\_s*\_^foo white space and blank lines and then "foo" at
start-of-line
@@ -812,12 +813,13 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|/zero-width|
*/\$*
-\$ Matches literal '$'. Can be used at any position in the pattern.
+\$ Matches literal '$'. Can be used at any position in the pattern, but
+ not inside [].
*/\_$*
\_$ Matches end-of-line. |/zero-width| Can be used at any position in the
- pattern. Note that "a\_$b" never matches, since "b" cannot match an
- end-of-line. Use "a\nb" instead |/\n|.
+ pattern, but not inside []. Note that "a\_$b" never matches, since
+ "b" cannot match an end-of-line. Use "a\nb" instead |/\n|.
Example matches ~
foo\_$\_s* "foo" at end-of-line and following white space and
blank lines
@@ -840,8 +842,9 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|/zero-width|
*/\zs*
-\zs Matches at any position, and sets the start of the match there: The
- next char is the first char of the whole match. |/zero-width|
+\zs Matches at any position, but not inside [], and sets the start of the
+ match there: The next char is the first char of the whole match.
+ |/zero-width|
Example: >
/^\s*\zsif
< matches an "if" at the start of a line, ignoring white space.
@@ -852,8 +855,9 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
This cannot be followed by a multi. *E888*
{not available when compiled without the |+syntax| feature}
*/\ze*
-\ze Matches at any position, and sets the end of the match there: The
- previous char is the last char of the whole match. |/zero-width|
+\ze Matches at any position, but not inside [], and sets the end of the
+ match there: The previous char is the last char of the whole match.
+ |/zero-width|
Can be used multiple times, the last one encountered in a matching
branch is used.
Example: "end\ze\(if\|for\)" matches the "end" in "endif" and
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 6a93907968..d3202727a0 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -4071,7 +4071,6 @@ E252 options.txt /*E252*
E253 mbyte.txt /*E253*
E254 message.txt /*E254*
E255 sign.txt /*E255*
-E256 message.txt /*E256*
E257 if_cscop.txt /*E257*
E258 remote.txt /*E258*
E259 if_cscop.txt /*E259*
@@ -6323,6 +6322,7 @@ extend() eval.txt /*extend()*
extension-removal cmdline.txt /*extension-removal*
extensions-improvements todo.txt /*extensions-improvements*
f motion.txt /*f*
+false vim9.txt /*false*
false-variable eval.txt /*false-variable*
faq intro.txt /*faq*
farsi farsi.txt /*farsi*
@@ -8485,6 +8485,7 @@ progname-variable eval.txt /*progname-variable*
progpath-variable eval.txt /*progpath-variable*
progress.vim syntax.txt /*progress.vim*
prompt-buffer channel.txt /*prompt-buffer*
+prompt_getprompt() eval.txt /*prompt_getprompt()*
prompt_setcallback() eval.txt /*prompt_setcallback()*
prompt_setinterrupt() eval.txt /*prompt_setinterrupt()*
prompt_setprompt() eval.txt /*prompt_setprompt()*
@@ -9644,6 +9645,7 @@ toupper() eval.txt /*toupper()*
tr() eval.txt /*tr()*
trim() eval.txt /*trim()*
trojan-horse starting.txt /*trojan-horse*
+true vim9.txt /*true*
true-variable eval.txt /*true-variable*
trunc() eval.txt /*trunc()*
try-conditionals eval.txt /*try-conditionals*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index ff52078548..af6151c940 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 8.2. Last change: 2020 Jun 06
+*terminal.txt* For Vim version 8.2. Last change: 2020 Sep 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -476,9 +476,11 @@ term_dumpdiff({filename}, {filename} [, {options}])
"term_name" name to use for the buffer name, instead
of the first file name.
"term_rows" vertical size to use for the terminal,
- instead of using 'termwinsize'
+ instead of using 'termwinsize', but
+ respecting the minimal size
"term_cols" horizontal size to use for the terminal,
- instead of using 'termwinsize'
+ instead of using 'termwinsize', but
+ respecting the minimal size
"vertical" split the window vertically
"curwin" use the current window, do not split the
window; fails if the current buffer
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index 23d3e36378..96446853c7 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -1,4 +1,4 @@
-*testing.txt* For Vim version 8.2. Last change: 2020 Aug 17
+*testing.txt* For Vim version 8.2. Last change: 2020 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index f9288faef2..bd05ecf624 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.2. Last change: 2020 Aug 29
+*todo.txt* For Vim version 8.2. Last change: 2020 Sep 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41,15 +41,45 @@ browser use: https://github.com/vim/vim/issues/1234
Why does Test_invalid_sid() not work in the GUI?
Making everything work:
-- Check :const works the same as in legacy script.
+- Should :const work the same as in legacy script?
+ Or should it work like in Typescript: only the variable is fixed, not the
+ value itself.
+ Then use ":const!" to also fix/lock the value?
+ Typescript uses "as const", which is weird.
+ Alternative: const var = <const>value
+ looks quite strange quite verbose
+ But can be used in several places:
+ SomeFunc(<const>[1, 2, 3])
+ In Vim this basically means "lock this value".
+ How about:
+ SomeFunc(<const>[[1], [2], [3]]) # are sub-lists immutable?
+ SomeFunc(<const>myList) # is myList mutable afterwards?
+
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
- :put with a "=" register argument doesn't work, need to find the expression
and compile it. (#6397)
- At the Vim9 script level, keep script variables local to the block they are
- declared in? Need to remember what variables were declared and delete them
- when leaving the block.
-- Implement { } block at the script level.
-- Use the line number argument with assert_fails() in many more tests.
+ declared in, like in Javascript (using :let).
+ -> Need to remember what variables were declared and delete them when
+ leaving the block.
+ -> if a function is defined it may need to keep the block-locals
+ Then Implement { } block at the script level.
+- Recognize call to assert_fails() and execute it in the function context?
+ Won't work if the command itself fails, not an expression failure:
+ assert_fails("unknown", "E99:")
+ Use try/catch is complicated:
+ let did_catch = false
+ try
+ unknown
+ catch
+ assert_caught('E99:')
+ did_catch = true
+ endtry
+ assert_true('did_catch')
+ Add a new command,
+ assertfail
+ unknown
+ endassertfail E99:.*unknown
- In autocmd: use legacy syntax, not whatever the current script uses?
- need to check type when a declaration specifies a type: #6507
let nr: number = 'asdf'
@@ -181,10 +211,8 @@ Text properties:
- :goto does not go to the right place when text properties are present.
(#5930)
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
-- Get E685 with a sequence of commands. (#5674)
- Combining text property with 'cursorline' does not always work (Billie
Cleek, #5533)
-- Text properties spanning more than one line. #5683
- See remarks at top of src/textprop.c
'incsearch' with :s:
@@ -263,7 +291,8 @@ Terminal emulator window:
Error numbers available: E653
-Remove "MacOS X installation"? $APPDIR is no longer set.
+Patch to implement the vimtutor with a plugin: #6414
+Was originally writtten by Felipe Morales.
Remove SPACE_IN_FILENAME ? It is only used for completion.
@@ -372,9 +401,6 @@ When changing the crypt key the buffer should be considered modified.
Like when changing 'fileformat'. Save the old key in save_file_ff().
(Ninu-Ciprian Marginean)
-Patch to implement the vimtutor with a plugin: #6414
-Was originally writtten by Felipe Morales.
-
Strange sequence of BufWipeout and BufNew events while doing omni-complete.
(Paul Jolly, #5656)
Get BufDelete without preceding BufNew. (Paul Jolly, #5694)
@@ -397,6 +423,7 @@ Undo puts cursor in wrong line after "cG<Esc>" undo.
Implement completion for "breakadd". Should expand the second argument, e.g.
"func", and then function names after ":breakadd func". Including
script-local functions.
+Also for ":profile".
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
Dec 19)
@@ -1222,8 +1249,6 @@ Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
-Completion for :!cmd shows each match twice. #1435
-
GTK: When adding a timer from 'balloonexpr' it won't fire, because
g_main_context_iteration() doesn't return. Need to trigger an event when the
timer expires.
@@ -1422,9 +1447,6 @@ Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
3. Doesn't work properly according to Yukihiro Nakadaira.
Also see #1635.
-When 'keywordprg' starts with ":" the argument is still escaped as a shell
-command argument. (Romain Lafourcade, 2016 Oct 16, #1175)
-
Idea from Sven: record sequence of keys. Useful to show others what they are
doing (look over the shoulder), and also to see what happened.
Probably list of keystrokes, with some annotations for mode changes.
diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt
index 38b36dde17..c3bf2d312e 100644
--- a/runtime/doc/usr_03.txt
+++ b/runtime/doc/usr_03.txt
@@ -1,4 +1,4 @@
-*usr_03.txt* For Vim version 8.2. Last change: 2020 Feb 29
+*usr_03.txt* For Vim version 8.2. Last change: 2020 Sep 03
VIM USER MANUAL - by Bram Moolenaar
@@ -30,10 +30,11 @@ Table of contents: |usr_toc.txt|
To move the cursor forward one word, use the "w" command. Like most Vim
commands, you can use a numeric prefix to move past multiple words. For
-example, "3w" moves three words. This figure shows how it works:
+example, "3w" moves three words. This figure shows how it works (starting at
+the position marked with "x"):
This is a line with example text ~
- --->-->->----------------->
+ x-->-->->----------------->
w w w 3w
Notice that "w" moves to the start of the next word if it already is at the
@@ -41,15 +42,15 @@ start of a word.
The "b" command moves backward to the start of the previous word:
This is a line with example text ~
- <----<--<-<---------<---
+ <----<--<-<---------<--x
b b b 2b b
There is also the "e" command that moves to the next end of a word and "ge",
which moves to the previous end of a word:
This is a line with example text ~
- <- <--- -----> ---->
- ge ge e e
+ <----<----x---->------------>
+ 2ge ge e we
If you are at the last word of a line, the "w" command will take you to the
first word in the next line. Thus you can use this to move through a
@@ -82,12 +83,12 @@ an <End> key it will do the same thing.
The "^" command moves to the first non-blank character of the line. The "0"
command (zero) moves to the very first character of the line, and the <Home>
-key does the same thing. In a picture:
+key does the same thing. In a picture ("." indicates a space):
^
- <------------
+ <-----------x
.....This is a line with example text ~
- <----------------- --------------->
+ <----------------x x-------------->
0 $
(the "....." indicates blanks here)
diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt
index 3456a76c1c..21c09b43f8 100644
--- a/runtime/doc/usr_40.txt
+++ b/runtime/doc/usr_40.txt
@@ -1,4 +1,4 @@
-*usr_40.txt* For Vim version 8.2. Last change: 2020 Jul 28
+*usr_40.txt* For Vim version 8.2. Last change: 2020 Sep 02
VIM USER MANUAL - by Bram Moolenaar
@@ -453,15 +453,15 @@ matching BufWritePre autocommands and executes them, and then it
performs the ":write".
The general form of the :autocmd command is as follows: >
- :autocmd [group] {events} {file-pattern} [nested] {command}
+ :autocmd [group] {events} {file-pattern} [++nested] {command}
The [group] name is optional. It is used in managing and calling the commands
(more on this later). The {events} parameter is a list of events (comma
separated) that trigger the command.
{file-pattern} is a filename, usually with wildcards. For example, using
"*.txt" makes the autocommand be used for all files whose name end in ".txt".
-The optional [nested] flag allows for nesting of autocommands (see below), and
-finally, {command} is the command to be executed.
+The optional [++nested] flag allows for nesting of autocommands (see below),
+and finally, {command} is the command to be executed.
EVENTS
@@ -578,7 +578,7 @@ trigger any new events. If you read a file in response to a FileChangedShell
event, it will not trigger the autocommands that would set the syntax, for
example. To make the events triggered, add the "nested" argument: >
- :autocmd FileChangedShell * nested edit
+ :autocmd FileChangedShell * ++nested edit
EXECUTING AUTOCOMMANDS
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index b11f0134f6..1dbfba128b 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -327,9 +327,9 @@ Grouping is done with parentheses. No surprises here. Example: >
:echo (10 + 5) * 2
< 30 ~
-Strings can be concatenated with ".". Example: >
+Strings can be concatenated with ".." (see |expr6|). Example: >
- :echo "foo" . "bar"
+ :echo "foo" .. "bar"
< foobar ~
When the ":echo" command gets multiple arguments, it separates them with a
@@ -496,9 +496,9 @@ So far the commands in the script were executed by Vim directly. The
very powerful way to build commands and execute them.
An example is to jump to a tag, which is contained in a variable: >
- :execute "tag " . tag_name
+ :execute "tag " .. tag_name
-The "." is used to concatenate the string "tag " with the value of variable
+The ".." is used to concatenate the string "tag " with the value of variable
"tag_name". Suppose "tag_name" has the value "get_cmd", then the command that
will be executed is: >
@@ -514,7 +514,7 @@ This jumps to the first line and formats all lines with the "=" operator.
To make ":normal" work with an expression, combine ":execute" with it.
Example: >
- :execute "normal " . normal_commands
+ :execute "normal " .. normal_commands
The variable "normal_commands" must contain the Normal mode commands.
Make sure that the argument for ":normal" is a complete command. Otherwise
@@ -531,12 +531,12 @@ If you don't want to execute a string but evaluate it to get its expression
value, you can use the eval() function: >
:let optname = "path"
- :let optval = eval('&' . optname)
+ :let optval = eval('&' .. optname)
A "&" character is prepended to "path", thus the argument to eval() is
"&path". The result will then be the value of the 'path' option.
The same thing can be done with: >
- :exe 'let optval = &' . optname
+ :exe 'let optval = &' .. optname
==============================================================================
*41.6* Using functions
@@ -1288,7 +1288,7 @@ Example: >
: let n = n + len(split(getline(lnum)))
: let lnum = lnum + 1
: endwhile
- : echo "found " . n . " words"
+ : echo "found " .. n .. " words"
:endfunction
You can call this function with: >
@@ -1301,7 +1301,7 @@ It will be executed once and echo the number of words.
range, with the cursor in that line. Example: >
:function Number()
- : echo "line " . line(".") . " contains: " . getline(".")
+ : echo "line " .. line(".") .. " contains: " .. getline(".")
:endfunction
If you call this function with: >
@@ -1325,11 +1325,11 @@ so on. The variable "a:0" contains the number of extra arguments.
:function Show(start, ...)
: echohl Title
- : echo "start is " . a:start
+ : echo "start is " .. a:start
: echohl None
: let index = 1
: while index <= a:0
- : echo " Arg " . index . " is " . a:{index}
+ : echo " Arg " .. index .. " is " .. a:{index}
: let index = index + 1
: endwhile
: echo ""
@@ -1737,10 +1737,10 @@ Another useful mechanism is the ":finally" command: >
:let tmp = tempname()
:try
- : exe ".,$write " . tmp
- : exe "!filter " . tmp
+ : exe ".,$write " .. tmp
+ : exe "!filter " .. tmp
: .,$delete
- : exe "$read " . tmp
+ : exe "$read " .. tmp
:finally
: call delete(tmp)
:endtry
@@ -2091,8 +2091,8 @@ prepending it with "s:".
We will define a function that adds a new typing correction: >
30 function s:Add(from, correct)
- 31 let to = input("type the correction for " . a:from . ": ")
- 32 exe ":iabbrev " . a:from . " " . to
+ 31 let to = input("type the correction for " .. a:from .. ": ")
+ 32 exe ":iabbrev " .. a:from .. " " .. to
..
36 endfunction
@@ -2197,7 +2197,7 @@ a few lines to count the number of corrections: >
30 function s:Add(from, correct)
..
34 let s:count = s:count + 1
- 35 echo s:count . " corrections now"
+ 35 echo s:count .. " corrections now"
36 endfunction
First s:count is initialized to 4 in the script itself. When later the
@@ -2240,11 +2240,11 @@ Here is the resulting complete example: >
28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR>
29
30 function s:Add(from, correct)
- 31 let to = input("type the correction for " . a:from . ": ")
- 32 exe ":iabbrev " . a:from . " " . to
+ 31 let to = input("type the correction for " .. a:from .. ": ")
+ 32 exe ":iabbrev " .. a:from .. " " .. to
33 if a:correct | exe "normal viws\<C-R>\" \b\e" | endif
34 let s:count = s:count + 1
- 35 echo s:count . " corrections now"
+ 35 echo s:count .. " corrections now"
36 endfunction
37
38 if !exists(":Correct")
@@ -2492,7 +2492,7 @@ should be undone. Set the b:undo_ftplugin variable to the commands that will
undo the settings in your filetype plugin. Example: >
let b:undo_ftplugin = "setlocal fo< com< tw< commentstring<"
- \ . "| unlet b:match_ignorecase b:match_words b:match_skip"
+ \ .. "| unlet b:match_ignorecase b:match_words b:match_skip"
Using ":setlocal" with "<" after the option name resets the option to its
global value. That is mostly the best way to reset the option value.
@@ -2613,17 +2613,17 @@ The following example shows how it's done: >
map <F19> :call BufNetWrite('something')<CR>
let s:did_load = 1
- exe 'au FuncUndefined BufNet* source ' . expand('<sfile>')
+ exe 'au FuncUndefined BufNet* source ' .. expand('<sfile>')
finish
endif
function BufNetRead(...)
- echo 'BufNetRead(' . string(a:000) . ')'
+ echo 'BufNetRead(' .. string(a:000) .. ')'
" read functionality here
endfunction
function BufNetWrite(...)
- echo 'BufNetWrite(' . string(a:000) . ')'
+ echo 'BufNetWrite(' .. string(a:000) .. ')'
" write functionality here
endfunction
diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt
index 4bbae4aef0..803d743638 100644
--- a/runtime/doc/version5.txt
+++ b/runtime/doc/version5.txt
@@ -1,4 +1,4 @@
-*version5.txt* For Vim version 8.2. Last change: 2020 Aug 15
+*version5.txt* For Vim version 8.2. Last change: 2020 Sep 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4417,7 +4417,7 @@ Now map <xF4> to <F4>, so that the user can override this.
When compiling os_win32.c with MIN_FEAT the apply_autocmds() should not be
used. (Aaron)
-This autocommand looped forever: ":au FileChangedShell * nested e <afile>"
+This autocommand looped forever: ":au FileChangedShell * ++nested e <afile>"
Now FileChangeShell never nests. (Roemer)
When evaluating an ":elseif" that was not going to matter anyway, ignore
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 8eb60be263..a32ce183c3 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 8.2. Last change: 2020 Aug 27
+*vim9.txt* For Vim version 8.2. Last change: 2020 Sep 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -114,7 +114,7 @@ There is no "a:" dictionary or "a:000" list.
Variable arguments are defined as the last argument, with a name and have a
list type, similar to TypeScript. For example, a list of numbers: >
- def MyFunc(...itemlist: list<number>)
+ def MyFunc(...itemlist: list<number>)
for item in itemlist
...
@@ -128,8 +128,8 @@ function or variable the "g:" prefix should be used. For functions in an
autoload script the "name#" prefix is sufficient. >
def ThisFunction() # script-local
def s:ThisFunction() # script-local
- def g:ThatFunction() # global
- def ThatFunction() # global if no local ThatFunction()
+ def g:ThatFunction() # global
+ def ThatFunction() # global if no local ThatFunction()
def scriptname#function() # autoload
When using `:function` or `:def` to specify a new function inside a function,
@@ -173,7 +173,7 @@ blocks. Once the block ends the variable is no longer accessible: >
else
let inner = 0
endif
- echo inner " Error!
+ echo inner # Error!
The declaration must be done earlier: >
let inner: number
@@ -190,7 +190,7 @@ To intentionally avoid a variable being available later, a block can be used: