To: vim_dev@googlegroups.com Subject: Patch 8.2.2440 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2440 Problem: Documentation based on patches is outdated. Solution: Add changes to documentation in a patch. Files: runtime/doc/arabic.txt, runtime/doc/autocmd.txt, runtime/doc/change.txt, runtime/doc/channel.txt, runtime/doc/cmdline.txt, runtime/doc/debugger.txt, runtime/doc/develop.txt, runtime/doc/digraph.txt, runtime/doc/editing.txt, runtime/doc/eval.txt, runtime/doc/filetype.txt, runtime/doc/ft_sql.txt, runtime/doc/gui.txt, runtime/doc/gui_w32.txt, runtime/doc/gui_x11.txt, runtime/doc/hangulin.txt, runtime/doc/helphelp.txt, runtime/doc/help.txt, runtime/doc/if_lua.txt, runtime/doc/if_mzsch.txt, runtime/doc/if_tcl.txt, runtime/doc/indent.txt, runtime/doc/index.txt, runtime/doc/insert.txt, runtime/doc/intro.txt, runtime/doc/map.txt, runtime/doc/mbyte.txt, runtime/doc/message.txt, runtime/doc/mlang.txt, runtime/doc/motion.txt, runtime/doc/netbeans.txt, runtime/doc/options.txt, runtime/doc/os_dos.txt, runtime/doc/os_haiku.txt, runtime/doc/os_unix.txt, runtime/doc/os_vms.txt, runtime/doc/os_win32.txt, runtime/doc/pattern.txt, runtime/doc/pi_getscript.txt, runtime/doc/pi_logipat.txt, runtime/doc/pi_netrw.txt, runtime/doc/pi_tar.txt, runtime/doc/pi_vimball.txt, runtime/doc/pi_zip.txt, runtime/doc/popup.txt, runtime/doc/print.txt, runtime/doc/quickfix.txt, runtime/doc/quickref.txt, runtime/doc/recover.txt, runtime/doc/remote.txt, runtime/doc/repeat.txt, runtime/doc/rileft.txt, runtime/doc/sign.txt, runtime/doc/spell.txt, runtime/doc/starting.txt, runtime/doc/syntax.txt, runtime/doc/tabpage.txt, runtime/doc/tagsrch.txt, runtime/doc/terminal.txt, runtime/doc/term.txt, runtime/doc/testing.txt, runtime/doc/textprop.txt, runtime/doc/tips.txt, runtime/doc/todo.txt, runtime/doc/uganda.txt, runtime/doc/undo.txt, runtime/doc/usr_02.txt, runtime/doc/usr_03.txt, runtime/doc/usr_04.txt, runtime/doc/usr_05.txt, runtime/doc/usr_07.txt, runtime/doc/usr_08.txt, runtime/doc/usr_10.txt, runtime/doc/usr_11.txt, runtime/doc/usr_20.txt, runtime/doc/usr_22.txt, runtime/doc/usr_23.txt, runtime/doc/usr_24.txt, runtime/doc/usr_27.txt, runtime/doc/usr_30.txt, runtime/doc/usr_31.txt, runtime/doc/usr_40.txt, runtime/doc/usr_41.txt, runtime/doc/usr_42.txt, runtime/doc/usr_44.txt, runtime/doc/usr_45.txt, runtime/doc/usr_46.txt, runtime/doc/usr_90.txt, runtime/doc/usr_toc.txt, runtime/doc/various.txt, runtime/doc/version5.txt, runtime/doc/version6.txt, runtime/doc/version7.txt, runtime/doc/version8.txt, runtime/doc/vi_diff.txt, runtime/doc/vim9.txt, runtime/doc/visual.txt, runtime/doc/windows.txt *** ../vim-8.2.2439/runtime/doc/arabic.txt 2019-12-12 12:49:05.000000000 +0100 --- runtime/doc/arabic.txt 2020-07-17 17:54:46.899972012 +0200 *************** *** 77,83 **** (without Form-B, Arabic will _NOT_ be usable). It is highly recommended that users search for so-called 'ISO-10646-1' fonts. Do an Internet search or check www.arabeyes.org for further ! info on where to attain the necessary Arabic fonts. Font Installation --- 77,83 ---- (without Form-B, Arabic will _NOT_ be usable). It is highly recommended that users search for so-called 'ISO-10646-1' fonts. Do an Internet search or check www.arabeyes.org for further ! info on where to obtain the necessary Arabic fonts. Font Installation *************** *** 123,129 **** > :set encoding=utf-8 < ! to your .vimrc file (entering the command manually into you Vim window is highly discouraged). In short, include ':set encoding=utf-8' to your .vimrc file. --- 123,129 ---- > :set encoding=utf-8 < ! to your .vimrc file (entering the command manually into your Vim window is highly discouraged). In short, include ':set encoding=utf-8' to your .vimrc file. *** ../vim-8.2.2439/runtime/doc/autocmd.txt 2020-12-11 19:30:26.785393308 +0100 --- runtime/doc/autocmd.txt 2021-01-28 13:00:44.334697096 +0100 *************** *** 1,4 **** ! *autocmd.txt* For Vim version 8.2. Last change: 2019 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 54,60 **** :au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd} Add {cmd} to the list of commands that Vim will execute automatically on {event} for a file matching ! {pat} |autocmd-patterns|. Note: A quote character is seen as argument to the :autocmd and won't start a comment. Vim always adds the {cmd} after existing autocommands, --- 54,61 ---- :au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd} Add {cmd} to the list of commands that Vim will execute automatically on {event} for a file matching ! {pat} |autocmd-patterns|. ! Here {event} cannot be "*". *E1155* Note: A quote character is seen as argument to the :autocmd and won't start a comment. Vim always adds the {cmd} after existing autocommands, *************** *** 70,76 **** The special pattern or defines a buffer-local autocommand. See |autocmd-buflocal|. ! If the `:autocmd` is in Vim9 script then {cmd} will be executed as in Vim9 script. Thus this depends on where the autocmd is defined, not where it is triggered. --- 71,78 ---- The special pattern or defines a buffer-local autocommand. See |autocmd-buflocal|. ! If the `:autocmd` is in Vim9 script (a script that starts with `:vim9script` ! and in a `:def` function) then {cmd} will be executed as in Vim9 script. Thus this depends on where the autocmd is defined, not where it is triggered. *************** *** 282,288 **** |BufWinLeave| before a buffer is removed from a window |BufUnload| before unloading a buffer ! |BufHidden| just after a buffer has become hidden |BufNew| just after creating a new buffer |SwapExists| detected an existing swap file --- 284,290 ---- |BufWinLeave| before a buffer is removed from a window |BufUnload| before unloading a buffer ! |BufHidden| just before a buffer becomes hidden |BufNew| just after creating a new buffer |SwapExists| detected an existing swap file *************** *** 641,647 **** *CursorHold* CursorHold When the user doesn't press a key for the time ! specified with 'updatetime'. Not re-triggered until the user has pressed a key (i.e. doesn't fire every 'updatetime' ms if you leave Vim to make some coffee. :) See |CursorHold-example| --- 643,649 ---- *CursorHold* CursorHold When the user doesn't press a key for the time ! specified with 'updatetime'. Not triggered until the user has pressed a key (i.e. doesn't fire every 'updatetime' ms if you leave Vim to make some coffee. :) See |CursorHold-example| *************** *** 850,855 **** --- 852,859 ---- when it's used. The pattern is matched against the function name. Both and are set to the name of the function. + Not triggered when compiling a |Vim9| + function. NOTE: When writing Vim scripts a better alternative is to use an autoloaded function. See |autoload-functions|. *************** *** 893,899 **** string. *InsertLeavePre* InsertLeavePre Just before leaving Insert mode. Also when ! using CTRL-O |i_CTRL-O|. Be caseful not to change mode or use `:normal`, it will likely cause trouble. *InsertLeave* --- 897,903 ---- string. *InsertLeavePre* InsertLeavePre Just before leaving Insert mode. Also when ! using CTRL-O |i_CTRL-O|. Be careful not to change mode or use `:normal`, it will likely cause trouble. *InsertLeave* *************** *** 1453,1460 **** :aug[roup]! {name} Delete the autocmd group {name}. Don't use this if there is still an autocommand using this group! You will get a warning if doing ! it anyway. when the group is the current group ! you will get error E936. To enter autocommands for a specific group, use this method: 1. Select the group with ":augroup {name}". --- 1457,1464 ---- :aug[roup]! {name} Delete the autocmd group {name}. Don't use this if there is still an autocommand using this group! You will get a warning if doing ! it anyway. When the group is the current ! group you will get error E936. To enter autocommands for a specific group, use this method: 1. Select the group with ":augroup {name}". *** ../vim-8.2.2439/runtime/doc/change.txt 2020-11-01 13:57:37.547988672 +0100 --- runtime/doc/change.txt 2021-01-21 15:00:53.391871865 +0100 *************** *** 1,4 **** ! *change.txt* For Vim version 8.2. Last change: 2019 Sep 28 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *change.txt* For Vim version 8.2. Last change: 2021 Jan 21 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 153,159 **** '!' or '?' (but if 'cpoptions' includes the 'j' flag, they insert two spaces only after a '.'). The 'B' and 'M' flags in 'formatoptions' change the behavior for inserting ! spaces before and after a multi-byte character |fo-table|. The '[ mark is set at the end of the first line that was joined, '] at the end of the resulting line. --- 153,159 ---- '!' or '?' (but if 'cpoptions' includes the 'j' flag, they insert two spaces only after a '.'). The 'B' and 'M' flags in 'formatoptions' change the behavior for inserting ! spaces before and after a multibyte character |fo-table|. The '[ mark is set at the end of the first line that was joined, '] at the end of the resulting line. *************** *** 209,215 **** start insert (for {Visual} see |Visual-mode|). *v_r* ! {Visual}["x]r{char} Replace all selected characters by {char}. *v_C* {Visual}["x]C Delete the highlighted lines [into register x] and --- 209,215 ---- start insert (for {Visual} see |Visual-mode|). *v_r* ! {Visual}r{char} Replace all selected characters by {char}. *v_C* {Visual}["x]C Delete the highlighted lines [into register x] and *************** *** 636,641 **** --- 636,643 ---- |cmdline-ranges|. See |:s_flags| for [flags]. + The delimiter doesn't need to be /, see + |pattern-delimiter|. :[range]s[ubstitute] [flags] [count] :[range]&[&][flags] [count] *:&* *************** *** 775,781 **** For compatibility with Vi these two exceptions are allowed: "\/{string}/" and "\?{string}?" do the same as "//{string}/r". "\&{string}&" does the same as "//{string}/". ! *E146* Instead of the '/' which surrounds the pattern and replacement string, you can use any other single-byte character, but not an alphanumeric character, '\', '"' or '|'. This is useful if you want to include a '/' in the search --- 777,783 ---- For compatibility with Vi these two exceptions are allowed: "\/{string}/" and "\?{string}?" do the same as "//{string}/r". "\&{string}&" does the same as "//{string}/". ! *pattern-delimiter* *E146* Instead of the '/' which surrounds the pattern and replacement string, you can use any other single-byte character, but not an alphanumeric character, '\', '"' or '|'. This is useful if you want to include a '/' in the search *************** *** 994,1002 **** 5. Copying and moving text *copy-move* *quote* ! "{a-zA-Z0-9.%#:-"} Use register {a-zA-Z0-9.%#:-"} for next delete, yank ! or put (use uppercase character to append with ! delete and yank) ({.%#:} only work with put). *:reg* *:registers* :reg[isters] Display the type and contents of all numbered and --- 996,1004 ---- 5. Copying and moving text *copy-move* *quote* ! "{register} Use {register} for next delete, yank or put. Use ! an uppercase character to append with delete and yank. ! Registers ".", "%", "#" and ":" only work with put. *:reg* *:registers* :reg[isters] Display the type and contents of all numbered and *************** *** 1456,1462 **** func! format#Format() " only reformat on explicit gq command if mode() != 'n' ! " fall back to Vims internal reformatting return 1 endif let lines = getline(v:lnum, v:lnum + v:count - 1) --- 1458,1464 ---- func! format#Format() " only reformat on explicit gq command if mode() != 'n' ! " fall back to Vim's internal reformatting return 1 endif let lines = getline(v:lnum, v:lnum + v:count - 1) *************** *** 1629,1652 **** readability. letter meaning when present in 'formatoptions' ~ ! t Auto-wrap text using textwidth c Auto-wrap comments using textwidth, inserting the current comment leader automatically. r Automatically insert the current comment leader after hitting in Insert mode. o Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode. q Allow formatting of comments with "gq". Note that formatting will not change blank lines or lines containing only the comment leader. A new paragraph starts after such a line, or when the comment leader changes. w Trailing white space indicates a paragraph continues in the next line. A line that ends in a non-white character ends a paragraph. a Automatic formatting of paragraphs. Every time text is inserted or deleted the paragraph will be reformatted. See |auto-format|. When the 'c' flag is present this only happens for recognized comments. n When formatting text, recognize numbered lists. This actually uses the 'formatlistpat' option, thus any kind of list can be used. The indent of the text after the number is used for the next line. The --- 1631,1661 ---- readability. letter meaning when present in 'formatoptions' ~ ! *fo-t* t Auto-wrap text using textwidth + *fo-c* c Auto-wrap comments using textwidth, inserting the current comment leader automatically. + *fo-r* r Automatically insert the current comment leader after hitting in Insert mode. + *fo-o* o Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode. + *fo-q* q Allow formatting of comments with "gq". Note that formatting will not change blank lines or lines containing only the comment leader. A new paragraph starts after such a line, or when the comment leader changes. + *fo-w* w Trailing white space indicates a paragraph continues in the next line. A line that ends in a non-white character ends a paragraph. + *fo-a* a Automatic formatting of paragraphs. Every time text is inserted or deleted the paragraph will be reformatted. See |auto-format|. When the 'c' flag is present this only happens for recognized comments. + *fo-n* n When formatting text, recognize numbered lists. This actually uses the 'formatlistpat' option, thus any kind of list can be used. The indent of the text after the number is used for the next line. The *************** *** 1657,1662 **** --- 1666,1672 ---- 1. the first item wraps 2. the second item + < *fo-2* 2 When formatting text, use the indent of the second line of a paragraph for the rest of the paragraph, instead of the indent of the first line. This supports paragraphs in which the first line has a *************** *** 1666,1701 **** second line of the same paragraph third line. < This also works inside comments, ignoring the comment leader. v Vi-compatible auto-wrapping in insert mode: Only break a line at a blank that you have entered during the current insert command. (Note: this is not 100% Vi compatible. Vi has some "unexpected features" or bugs in this area. It uses the screen column instead of the line column.) b Like 'v', but only auto-wrap if you enter a blank at or before the wrap margin. If the line was longer than 'textwidth' when you started the insert, or you do not enter a blank in the insert before reaching 'textwidth', Vim does not perform auto-wrapping. l Long lines are not broken in insert mode: When a line was longer than 'textwidth' when the insert command started, Vim does not automatically format it. ! m Also break at a multi-byte character above 255. This is useful for Asian text where every character is a word on its own. ! M When joining lines, don't insert a space before or after a multi-byte character. Overrules the 'B' flag. ! B When joining lines, don't insert a space between two multi-byte characters. Overruled by the 'M' flag. 1 Don't break a line after a one-letter word. It's broken before it instead (if possible). ] 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". j Where it makes sense, remove a comment leader when joining lines. For example, joining: int i; // the index ~ // in the list ~ Becomes: int i; // the index in the list ~ p Don't break lines at single spaces that follow periods. This is intended to complement 'joinspaces' and |cpo-J|, for prose with sentences separated by two spaces. For example, with 'textwidth' set --- 1676,1721 ---- second line of the same paragraph third line. < This also works inside comments, ignoring the comment leader. + *fo-v* v Vi-compatible auto-wrapping in insert mode: Only break a line at a blank that you have entered during the current insert command. (Note: this is not 100% Vi compatible. Vi has some "unexpected features" or bugs in this area. It uses the screen column instead of the line column.) + *fo-b* b Like 'v', but only auto-wrap if you enter a blank at or before the wrap margin. If the line was longer than 'textwidth' when you started the insert, or you do not enter a blank in the insert before reaching 'textwidth', Vim does not perform auto-wrapping. + *fo-l* l Long lines are not broken in insert mode: When a line was longer than 'textwidth' when the insert command started, Vim does not automatically format it. ! *fo-m* ! m Also break at a multibyte character above 255. This is useful for Asian text where every character is a word on its own. ! *fo-M* ! M When joining lines, don't insert a space before or after a multibyte character. Overrules the 'B' flag. ! *fo-B* ! B When joining lines, don't insert a space between two multibyte characters. Overruled by the 'M' flag. + *fo-1* 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 impossible. Mainly for CJK scripts and works only if 'encoding' is "utf-8". + *fo-j* j Where it makes sense, remove a comment leader when joining lines. For example, joining: int i; // the index ~ // in the list ~ Becomes: int i; // the index in the list ~ + *fo-p* p Don't break lines at single spaces that follow periods. This is intended to complement 'joinspaces' and |cpo-J|, for prose with sentences separated by two spaces. For example, with 'textwidth' set *************** *** 1753,1759 **** Automatic formatting *auto-format* *autoformat* When the 'a' flag is present in 'formatoptions' text is formatted ! automatically when inserting text or deleting text. This works nice for editing text paragraphs. A few hints on how to use this: - You need to properly define paragraphs. The simplest is paragraphs that are --- 1773,1779 ---- Automatic formatting *auto-format* *autoformat* When the 'a' flag is present in 'formatoptions' text is formatted ! automatically when inserting text or deleting text. This works nicely for editing text paragraphs. A few hints on how to use this: - You need to properly define paragraphs. The simplest is paragraphs that are *************** *** 1807,1819 **** With [i] case is ignored. ! With [l] sort uses the current locale. See ! `language collate` to check or set the locale used ! for ordering. For example, with "en_US.UTF8", ! Ö will be ordered after O and before P, ! whereas with the Swedish locale "sv_SE.UTF8", ! it will be after Z. ! Case is typically ignored by the locale. Options [n][f][x][o][b] are mutually exclusive. --- 1827,1841 ---- With [i] case is ignored. ! With [l] sort uses the current collation locale. ! Implementation details: strcoll() is used to compare ! strings. See |:language| to check or set the collation ! locale. Example: > ! :language collate en_US.UTF-8 ! :%sort l ! < |v:collate| can also used to check the current locale. ! Sorting using the locale typically ignores case. ! This does not work properly on Mac. Options [n][f][x][o][b] are mutually exclusive. *************** *** 1848,1853 **** --- 1870,1877 ---- When /{pattern}/ is specified and there is no [r] flag the text matched with {pattern} is skipped, so that you sort on what comes after the match. + 'ignorecase' applies to the pattern, but 'smartcase' + is not used. Instead of the slash any non-letter can be used. For example, to sort on the second comma-separated field: > *** ../vim-8.2.2439/runtime/doc/channel.txt 2020-09-04 16:35:06.417571310 +0200 --- runtime/doc/channel.txt 2020-10-17 18:47:04.354000274 +0200 *************** *** 1,4 **** ! *channel.txt* For Vim version 8.2. Last change: 2019 Dec 07 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *channel.txt* For Vim version 8.2. Last change: 2020 Oct 17 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 965,970 **** --- 965,974 ---- "fail", because a fork happens before the failure can be detected. + If in Vim9 script a variable is declared with type "job" but + never assigned to, passing that variable to job_status() + returns "fail". + If an exit callback was set with the "exit_cb" option and the job is now detected to be "dead" the callback will be invoked. *************** *** 1288,1294 **** " Send the text to a shell with Enter appended. call ch_sendraw(g:shell_job, a:text .. "\n") endfunc ! " Function handling output from the shell: Added above the prompt. func GotOutput(channel, msg) call append(line("$") - 1, "- " . a:msg) --- 1292,1298 ---- " Send the text to a shell with Enter appended. call ch_sendraw(g:shell_job, a:text .. "\n") endfunc ! " Function handling output from the shell: Added above the prompt. func GotOutput(channel, msg) call append(line("$") - 1, "- " . a:msg) *** ../vim-8.2.2439/runtime/doc/cmdline.txt 2021-01-26 22:42:17.690836814 +0100 --- runtime/doc/cmdline.txt 2021-01-26 22:26:27.905473276 +0100 *************** *** 1,4 **** ! *cmdline.txt* For Vim version 8.2. Last change: 2019 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *cmdline.txt* For Vim version 8.2. Last change: 2021 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 797,803 **** < Visual Mode and Range *v_:* ! {Visual}: Starts a command-line with the Visual selected lines as a range. The code `:'<,'>` is used for this range, which makes it possible to select a similar line from the command-line --- 797,803 ---- < Visual Mode and Range *v_:* ! *:star-visual-range* {Visual}: Starts a command-line with the Visual selected lines as a range. The code `:'<,'>` is used for this range, which makes it possible to select a similar line from the command-line *************** *** 849,854 **** --- 849,864 ---- file name n. See |:oldfiles| or |v:oldfiles| to get the number. *E809* {only when compiled with the |+eval| and |+viminfo| features} + In |Vim9-script| # is used to start a comment, use %% for the alternate file + name: + % Is replaced with the current file name. + %% Is replaced with the alternate file name. *:_%%* *c_%%* + %%n (where n is a number) is replaced with *:_%%0* *:_%%n* + the file name of buffer n. "%%0" is the same as "%%". *c_%%n* + %%% Is replaced with all names in the argument *:_%%%* *c_%%%#* + list concatenated, separated by spaces. + %% 0) is replaced with old *:_%%<* *c_%%<* + file name n. Note that these, except "#* ** *:* ** ! *:* ** *:* ** ! *:* ** *:* ** ! *:* ** *:* ** ! *:* ** *:* ** ! *:* ** *E499* *E500* Note: these are typed literally, they are not special keys! is replaced with the word under the cursor (like |star|) is replaced with the WORD under the cursor (see |WORD|) is replaced with the word under the cursor, including more to form a C expression. E.g., when the cursor is on "arg" of "ptr->arg" then the result is "ptr->arg"; when the cursor is on "]" of "list[idx]" then the result is "list[idx]". This is used for |v:beval_text|. is replaced with the path name under the cursor (like what |gf| uses) When executing autocommands, is replaced with the file name of the buffer being manipulated, or the file for a read or write. *E495* When executing autocommands, is replaced with the currently effective buffer number (for ":r file" and ":so file" it is the current buffer, the file being read/sourced is not in a buffer). *E496* When executing autocommands, is replaced with the match for which this autocommand was executed. *E497* It differs from only when the file name isn't used to match with (for FileType, Syntax and SpellFileMissing events). When executing a ":source" command, is replaced with the file name of the sourced file. *E498* When executing a function, is replaced with the call stack, --- 883,919 ---- \\# \# Also see |`=|. ! *E499* *E500* Note: these are typed literally, they are not special keys! + *:* ** is replaced with the word under the cursor (like |star|) + *:* ** is replaced with the WORD under the cursor (see |WORD|) + *:* ** is replaced with the word under the cursor, including more to form a C expression. E.g., when the cursor is on "arg" of "ptr->arg" then the result is "ptr->arg"; when the cursor is on "]" of "list[idx]" then the result is "list[idx]". This is used for |v:beval_text|. + *:* ** is replaced with the path name under the cursor (like what |gf| uses) + *:* ** When executing autocommands, is replaced with the file name of the buffer being manipulated, or the file for a read or write. *E495* + *:* ** When executing autocommands, is replaced with the currently effective buffer number (for ":r file" and ":so file" it is the current buffer, the file being read/sourced is not in a buffer). *E496* + *:* ** When executing autocommands, is replaced with the match for which this autocommand was executed. *E497* It differs from only when the file name isn't used to match with (for FileType, Syntax and SpellFileMissing events). + *:* ** When executing a ":source" command, is replaced with the file name of the sourced file. *E498* When executing a function, is replaced with the call stack, *************** *** 908,925 **** --- 921,944 ---- is preferred). Note that filename-modifiers are useless when is not used inside a script. + *:* ** is replaced with the call stack, using "function {function-name}[{lnum}]" for a function line and "script {file-name}[{lnum}]" for a script line, and ".." in between items. E.g.: "function {function-name1}[{lnum}]..{function-name2}[{lnum}]" + *:* ** When executing a ":source" command, is replaced with the line number. *E842* When executing a function it's the line number relative to the start of the function. + *:* ** When executing a script, is replaced with the line number. It differs from in that is replaced with the script line number in any situation. *E961* + *:* ** + is replaced with the {clinetid} of the last received + message in |server2client()| *filename-modifiers* *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S* *************** *** 1130,1136 **** in Normal mode. There is no redraw, thus the window will remain visible. :quit Discard the command line and go back to Normal mode. ! ":close", ":exit", ":xit" and CTRL-\ CTRL-N also work. :qall Quit Vim, unless there are changes in some buffer. :qall! Quit Vim, discarding changes to any buffer. --- 1149,1156 ---- in Normal mode. There is no redraw, thus the window will remain visible. :quit Discard the command line and go back to Normal mode. ! ":close", CTRL-W c, ":exit", ":xit" and CTRL-\ CTRL-N also ! work. :qall Quit Vim, unless there are changes in some buffer. :qall! Quit Vim, discarding changes to any buffer. *** ../vim-8.2.2439/runtime/doc/debugger.txt 2019-12-12 12:49:05.000000000 +0100 --- runtime/doc/debugger.txt 2020-01-21 21:50:13.598505364 +0100 *************** *** 1,4 **** ! *debugger.txt* For Vim version 8.2. Last change: 2019 Jul 06 VIM REFERENCE MANUAL by Gordon Prieur --- 1,4 ---- ! *debugger.txt* For Vim version 8.2. Last change: 2019 Dec 21 VIM REFERENCE MANUAL by Gordon Prieur *************** *** 12,19 **** 1. Debugger Features |debugger-features| 2. Vim Compile Options |debugger-compilation| - 3. Integrated Debuggers |debugger-integration| - ============================================================================== 1. Debugger Features *debugger-features* --- 12,17 ---- *************** *** 114,123 **** ============================================================================== 2. Vim Compile Options *debugger-compilation* ! The debugger features were added explicitly for use with Sun's Visual ! WorkShop Integrated Programming Environment (ipe). However, they were done ! in as generic a manner as possible so that integration with other debuggers ! could also use some or all of the tools used with Sun's ipe. The following compile time preprocessor variables control the features: --- 112,121 ---- ============================================================================== 2. Vim Compile Options *debugger-compilation* ! The debugger features were added for use with Sun's Visual WorkShop Integrated ! Programming Environment (ipe). However, they were done in as generic a manner ! as possible so that integration with other debuggers could also use these ! features. The following compile time preprocessor variables control the features: *************** *** 127,144 **** Message Footer FEAT_FOOTER Balloon Evaluation FEAT_BEVAL ! The first integration with a full IPE/IDE was with Sun Visual WorkShop. To ! compile a gvim which interfaces with VWS set the following flag, which sets ! all the above flags: ! ! Sun Visual WorkShop FEAT_SUN_WORKSHOP ! ! ============================================================================== ! 3. Integrated Debuggers *debugger-integration* ! ! One fully integrated debugger/IPE/IDE is Sun's Visual WorkShop Integrated ! Programming Environment. For Sun NetBeans support see |netbeans|. vim:tw=78:sw=4:ts=8:noet:ft=help:norl: --- 125,134 ---- Message Footer FEAT_FOOTER Balloon Evaluation FEAT_BEVAL ! The support specifically for Sun Visual WorkShop has been removed, since the ! product no longer exists. For Sun NetBeans support see |netbeans|. + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: *** ../vim-8.2.2439/runtime/doc/develop.txt 2019-12-12 12:49:05.000000000 +0100 --- runtime/doc/develop.txt 2020-08-15 22:20:23.634763767 +0200 *************** *** 1,4 **** ! *develop.txt* For Vim version 8.2. Last change: 2019 Nov 22 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *develop.txt* For Vim version 8.2. Last change: 2020 Aug 15 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 34,41 **** VIM IS... VI COMPATIBLE *design-compatible* First of all, it should be possible to use Vim as a drop-in replacement for ! Vi. When the user wants to, he can use Vim in compatible mode and hardly ! notice any difference with the original Vi. Exceptions: - We don't reproduce obvious Vi bugs in Vim. --- 34,41 ---- VIM IS... VI COMPATIBLE *design-compatible* First of all, it should be possible to use Vim as a drop-in replacement for ! Vi. When the user wants to, Vim can be used in compatible mode and hardly ! any differences with the original Vi will be noticed. Exceptions: - We don't reproduce obvious Vi bugs in Vim. *************** *** 151,157 **** A satirical way to say this: "Unlike Emacs, Vim does not attempt to include everything but the kitchen sink, but some people say that you can clean one with it. ;-)" ! To use Vim with gdb see: http://www.agide.org and http://clewn.sf.net. - Vim is not a fancy GUI editor that tries to look nice at the cost of being less consistent over all platforms. But functional GUI features are welcomed. --- 151,158 ---- A satirical way to say this: "Unlike Emacs, Vim does not attempt to include everything but the kitchen sink, but some people say that you can clean one with it. ;-)" ! To use Vim with gdb see |terminal-debugger|. Other (older) tools can be ! found at http://www.agide.org and http://clewn.sf.net. - Vim is not a fancy GUI editor that tries to look nice at the cost of being less consistent over all platforms. But functional GUI features are welcomed. *************** *** 472,478 **** was that none of them provided sufficient capabilities to be used as the spell checking engine in Vim, for various reasons: ! - Missing support for multi-byte encodings. At least UTF-8 must be supported, so that more than one language can be used in the same file. Doing on-the-fly conversion is not always possible (would require iconv support). --- 473,479 ---- was that none of them provided sufficient capabilities to be used as the spell checking engine in Vim, for various reasons: ! - Missing support for multibyte encodings. At least UTF-8 must be supported, so that more than one language can be used in the same file. Doing on-the-fly conversion is not always possible (would require iconv support). *** ../vim-8.2.2439/runtime/doc/digraph.txt 2020-09-08 19:05:41.723819080 +0200 --- runtime/doc/digraph.txt 2020-09-08 19:04:37.096088931 +0200 *************** *** 1,4 **** ! *digraph.txt* For Vim version 8.2. Last change: 2019 May 05 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *digraph.txt* For Vim version 8.2. Last change: 2020 Jul 16 VIM REFERENCE MANUAL by Bram Moolenaar *** ../vim-8.2.2439/runtime/doc/editing.txt 2020-06-05 22:33:38.405658765 +0200 --- runtime/doc/editing.txt 2021-01-08 21:05:07.258726442 +0100 *************** *** 1,4 **** ! *editing.txt* For Vim version 8.2. Last change: 2019 Dec 07 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *editing.txt* For Vim version 8.2. Last change: 2021 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 73,82 **** ways: Column, Line, Word, Character and Byte. If the number of Characters and Bytes is the same then the Character position is omitted. If there are characters in the line that take more than one position on the screen ( or special ! character), both the "real" column and the screen ! column are shown, separated with a dash. Also see the 'ruler' option and the |wordcount()| function. --- 73,86 ---- ways: Column, Line, Word, Character and Byte. If the number of Characters and Bytes is the same then the Character position is omitted. + If there are characters in the line that take more than one position on the screen ( or special ! character), or characters using more than one byte per ! column (characters above 0x7F when 'encoding' is ! utf-8), both the byte column and the screen column are ! shown, separated by a dash. ! Also see the 'ruler' option and the |wordcount()| function. *************** *** 131,137 **** also the 'patchmode' option. The name of the backup file is normally the same as the original file with 'backupext' appended. The default "~" is a bit strange to avoid accidentally overwriting existing files. If you prefer ".bak" ! change the 'backupext' option. Extra dots are replaced with '_' on MS-DOS machines, when Vim has detected that an MS-DOS-like filesystem is being used (e.g., messydos or crossdos) or when the 'shortname' option is on. The backup file can be placed in another directory by setting 'backupdir'. --- 135,141 ---- also the 'patchmode' option. The name of the backup file is normally the same as the original file with 'backupext' appended. The default "~" is a bit strange to avoid accidentally overwriting existing files. If you prefer ".bak" ! change the 'backupext' option. Extra dots are replaced with '_' on MS-Windows machines, when Vim has detected that an MS-DOS-like filesystem is being used (e.g., messydos or crossdos) or when the 'shortname' option is on. The backup file can be placed in another directory by setting 'backupdir'. *************** *** 331,340 **** *gF* [count]gF Same as "gf", except if a number follows the file name, then the cursor is positioned on that line in ! the file. The file name and the number must be ! separated by a non-filename (see 'isfname') and ! non-numeric character. White space between the ! filename, the separator and the number are ignored. Examples: eval.c:10 ~ eval.c @ 20 ~ --- 335,347 ---- *gF* [count]gF Same as "gf", except if a number follows the file name, then the cursor is positioned on that line in ! the file. ! The file name and the number must be separated by a ! non-filename (see 'isfname') and non-numeric ! character. " line " is also recognized, like it is ! used in the output of `:verbose command UserCmd` ! White space between the filename, the separator and ! the number are ignored. Examples: eval.c:10 ~ eval.c @ 20 ~ *************** *** 472,477 **** --- 479,487 ---- :w ++enc=latin1 newfile This writes the current buffer to "newfile" in latin1 format. + The message given when writing a file will show "[converted]" when + 'fileencoding' or the value specified with ++enc differs from 'encoding'. + There may be several ++opt arguments, separated by white space. They must all appear before any |+cmd| argument. *************** *** 542,556 **** (which is the default), Vim will try to detect whether the lines in the file are separated by the specified formats. When set to "unix,dos", Vim will check for lines with a single (as used on Unix and Amiga) or by a ! pair (MS-DOS). Only when ALL lines end in , 'fileformat' is set ! to "dos", otherwise it is set to "unix". When 'fileformats' includes "mac", ! and no characters are found in the file, 'fileformat' is set to "mac". ! ! If the 'fileformat' option is set to "dos" on non-MS-DOS systems the message ! "[dos format]" is shown to remind you that something unusual is happening. On ! MS-DOS systems you get the message "[unix format]" if 'fileformat' is set to ! "unix". On all systems but the Macintosh you get the message "[mac format]" ! if 'fileformat' is set to "mac". If the 'fileformats' option is empty and DOS format is used, but while reading a file some lines did not end in , "[CR missing]" will be included in --- 552,567 ---- (which is the default), Vim will try to detect whether the lines in the file are separated by the specified formats. When set to "unix,dos", Vim will check for lines with a single (as used on Unix and Amiga) or by a ! pair (MS-Windows). Only when ALL lines end in , 'fileformat' is ! set to "dos", otherwise it is set to "unix". When 'fileformats' includes ! "mac", and no characters are found in the file, 'fileformat' is set to ! "mac". ! ! If the 'fileformat' option is set to "dos" on non-MS-Windows systems the ! message "[dos format]" is shown to remind you that something unusual is ! happening. On MS-Windows systems you get the message "[unix format]" if ! 'fileformat' is set to "unix". On all systems but the Macintosh you get the ! message "[mac format]" if 'fileformat' is set to "mac". If the 'fileformats' option is empty and DOS format is used, but while reading a file some lines did not end in , "[CR missing]" will be included in *************** *** 645,651 **** :args ## x < This will add the "x" item and sort the new list. ! :argd[elete] {pattern} .. *:argd* *:argdelete* *E480* Delete files from the argument list that match the {pattern}s. {pattern} is used like a file pattern, see |file-pattern|. "%" can be used to delete the --- 656,662 ---- :args ## x < This will add the "x" item and sort the new list. ! :argd[elete] {pattern} .. *:argd* *:argdelete* *E480* *E610* Delete files from the argument list that match the {pattern}s. {pattern} is used like a file pattern, see |file-pattern|. "%" can be used to delete the *************** *** 655,661 **** Example: > :argdel *.obj ! :[range]argd[elete] Delete the {range} files from the argument list. Example: > :10,$argdel < Deletes arguments 10 and further, keeping 1-9. > --- 666,672 ---- Example: > :argdel *.obj ! :[range]argd[elete] Delete the [range] files from the argument list. Example: > :10,$argdel < Deletes arguments 10 and further, keeping 1-9. > *************** *** 1003,1009 **** *write-permissions* When writing a new file the permissions are read-write. For unix the mask is ! 0666 with additionally umask applied. When writing a file that was read Vim will preserve the permissions, but clear the s-bit. *write-readonly* --- 1014,1020 ---- *write-permissions* When writing a new file the permissions are read-write. For unix the mask is ! 0o666 with additionally umask applied. When writing a file that was read Vim will preserve the permissions, but clear the s-bit. *write-readonly* *************** *** 1022,1028 **** lost the original file. *DOS-format-write* ! If the 'fileformat' is "dos", is used for . This is default for Win32. On other systems the message "[dos format]" is shown to remind you that an unusual was used. *Unix-format-write* --- 1033,1039 ---- lost the original file. *DOS-format-write* ! If the 'fileformat' is "dos", is used for . This is default for Win32. On other systems the message "[dos format]" is shown to remind you that an unusual was used. *Unix-format-write* *************** *** 1056,1066 **** would be impossible). You need to use "!", since the device already exists. Example for Unix: > :w! /dev/lpt0 ! and for MS-DOS or MS-Windows: > :w! lpt0 For Unix a device is detected when the name doesn't refer to a normal file or a directory. A fifo or named pipe also looks like a device to Vim. ! For MS-DOS and MS-Windows the device is detected by its name: AUX CON CLOCK$ --- 1067,1077 ---- would be impossible). You need to use "!", since the device already exists. Example for Unix: > :w! /dev/lpt0 ! and for MS-Windows: > :w! lpt0 For Unix a device is detected when the name doesn't refer to a normal file or a directory. A fifo or named pipe also looks like a device to Vim. ! For MS-Windows the device is detected by its name: AUX CON CLOCK$ *************** *** 1075,1083 **** *:q* *:quit* :q[uit] Quit the current window. Quit Vim if this is the last ! window. This fails when changes have been made and ! Vim refuses to |abandon| the current buffer, and when ! the last file in the argument list has not been edited. If there are other tab pages and quitting the last window in the current tab page the current tab page is --- 1086,1094 ---- *:q* *:quit* :q[uit] Quit the current window. Quit Vim if this is the last ! |edit-window|. This fails when changes have been made ! and Vim refuses to |abandon| the current buffer, and ! when the last file in the argument list has not been edited. If there are other tab pages and quitting the last window in the current tab page the current tab page is *************** *** 1103,1120 **** |quickfix|). *:wq* ! :wq [++opt] Write the current file and quit. Writing fails when ! the file is read-only or the buffer does not have a ! name. Quitting fails when the last file in the ! argument list has not been edited. ! ! :wq! [++opt] Write the current file and quit. Writing fails when ! the current buffer does not have a name. ! :wq [++opt] {file} Write to {file} and quit. Quitting fails when the last file in the argument list has not been edited. ! :wq! [++opt] {file} Write to {file} and quit. :[range]wq[!] [++opt] [file] Same as above, but only write the lines in [range]. --- 1114,1135 ---- |quickfix|). *:wq* ! :wq [++opt] Write the current file and close the window. If this ! was the last |edit-window| Vim quits. ! Writing fails when the file is read-only or the buffer ! does not have a name. Quitting fails when the last ! file in the argument list has not been edited. ! ! :wq! [++opt] Write the current file and close the window. If this ! was the last |edit-window| Vim quits. Writing fails ! when the current buffer does not have a name. ! :wq [++opt] {file} Write to {file} and close the window. If this was the ! last |edit-window| Vim quits. Quitting fails when the last file in the argument list has not been edited. ! :wq! [++opt] {file} Write to {file} and close the current window. Quit ! Vim if this was the last |edit-window|. :[range]wq[!] [++opt] [file] Same as above, but only write the lines in [range]. *************** *** 1131,1140 **** Same as :xit. *ZZ* ! ZZ Write current file, if modified, and quit (same as ! ":x"). (Note: If there are several windows for the ! current file, the file is written if it was modified ! and the window is closed). *ZQ* ZQ Quit without checking for changes (same as ":q!"). --- 1146,1155 ---- Same as :xit. *ZZ* ! ZZ Write current file, if modified, and close the current ! window (same as ":x"). ! If there are several windows for the current file, ! only the current window is closed. *ZQ* ZQ Quit without checking for changes (same as ":q!"). *************** *** 1294,1300 **** Does not change the meaning of an already opened file, because its full path name is remembered. Files from the |arglist| may change though! ! On MS-DOS this also changes the active drive. To change to the directory of the current file: > :cd %:h < --- 1309,1315 ---- Does not change the meaning of an already opened file, because its full path name is remembered. Files from the |arglist| may change though! ! On MS-Windows this also changes the active drive. To change to the directory of the current file: > :cd %:h < *************** *** 1391,1397 **** same effect. Don't forget to do this before reading the file. There are a few things to remember when editing binary files: ! - When editing executable files the number of characters must not change. Use only the "R" or "r" command to change text. Do not delete characters with "x" or by backspacing. - Set the 'textwidth' option to 0. Otherwise lines will unexpectedly be --- 1406,1412 ---- same effect. Don't forget to do this before reading the file. There are a few things to remember when editing binary files: ! - When editing executable files the number of bytes must not change. Use only the "R" or "r" command to change text. Do not delete characters with "x" or by backspacing. - Set the 'textwidth' option to 0. Otherwise lines will unexpectedly be *************** *** 1399,1411 **** - When there are not many s, the lines will become very long. If you want to edit a line that does not fit on the screen reset the 'wrap' option. Horizontal scrolling is used then. If a line becomes too long (more than ! about 32767 characters on the Amiga, much more on 32-bit systems, see |limits|) you cannot edit that line. The line will be split when reading the file. It is also possible that you get an "out of memory" error when reading the file. - Make sure the 'binary' option is set BEFORE loading the ! file. Otherwise both and are considered to end a line ! and when the file is written the will be replaced with . - characters are shown on the screen as ^@. You can enter them with "CTRL-V CTRL-@" or "CTRL-V 000" - To insert a character in the file split a line. When writing the --- 1414,1426 ---- - When there are not many s, the lines will become very long. If you want to edit a line that does not fit on the screen reset the 'wrap' option. Horizontal scrolling is used then. If a line becomes too long (more than ! about 32767 bytes on the Amiga, much more on 32-bit and 64-bit systems, see |limits|) you cannot edit that line. The line will be split when reading the file. It is also possible that you get an "out of memory" error when reading the file. - Make sure the 'binary' option is set BEFORE loading the ! file. Otherwise both and are considered to end a line ! and when the file is written the will be replaced with . - characters are shown on the screen as ^@. You can enter them with "CTRL-V CTRL-@" or "CTRL-V 000" - To insert a character in the file split a line. When writing the *** ../vim-8.2.2439/runtime/doc/eval.txt 2021-01-31 13:08:16.160367448 +0100 --- runtime/doc/eval.txt 2021-01-31 12:30:54.043296603 +0100 *************** *** 1,4 **** ! *eval.txt* For Vim version 8.2. Last change: 2019 Dec 06 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *eval.txt* For Vim version 8.2. Last change: 2021 Jan 31 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 49,55 **** *Number* *Integer* Number A 32 or 64 bit signed number. |expr-number| The number of bits is available in |v:numbersize|. ! Examples: -123 0x10 0177 0b1011 Float A floating point number. |floating-point-format| *Float* {only when compiled with the |+float| feature} --- 49,55 ---- *Number* *Integer* Number A 32 or 64 bit signed number. |expr-number| The number of bits is available in |v:numbersize|. ! Examples: -123 0x10 0177 0o177 0b1011 Float A floating point number. |floating-point-format| *Float* {only when compiled with the |+float| feature} *************** *** 94,104 **** Number 0 --> String "0" ~ Number -1 --> String "-1" ~ *octal* ! Conversion from a String to a Number is done by converting the first digits to ! a number. Hexadecimal "0xf9", Octal "017" or "0o17", and Binary "0b10" ! numbers are recognized (NOTE: when using |scriptversion-4| octal with a ! leading "0" is not recognized). If the String doesn't start with digits, the ! result is zero. Examples: String "456" --> Number 456 ~ String "6bar" --> Number 6 ~ --- 94,106 ---- Number 0 --> String "0" ~ Number -1 --> String "-1" ~ *octal* ! Conversion from a String to a Number only happens in legacy Vim script, not in ! Vim9 script. It is done by converting the first digits to a number. ! Hexadecimal "0xf9", Octal "017" or "0o17", and Binary "0b10" ! numbers are recognized ! NOTE: when using |scriptversion-4| octal with a leading "0" is not recognized. ! The 0o notation requires patch 8.2.0886. ! If the String doesn't start with digits, the result is zero. Examples: String "456" --> Number 456 ~ String "6bar" --> Number 6 ~ *************** *** 119,126 **** *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. Note that in the command: > :if "foo" --- 121,129 ---- *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|. 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" *************** *** 131,137 **** :" executed To test for a non-empty string, use empty(): > :if !empty("foo") ! < *non-zero-arg* Function arguments often behave slightly different from |TRUE|: If the argument is present and it evaluates to a non-zero Number, |v:true| or a --- 134,160 ---- :" executed To test for a non-empty string, use empty(): > :if !empty("foo") ! ! < *falsy* *truthy* ! An expression can be used as a condition, ignoring the type and only using ! whether the value is "sort of true" or "sort of false". Falsy is: ! the number zero ! empty string, blob, list or dictionary ! Other values are truthy. Examples: ! 0 falsy ! 1 truthy ! -1 truthy ! 0.0 falsy ! 0.1 truthy ! '' falsy ! 'x' truthy ! [] falsy ! [0] truthy ! {} falsy ! #{x: 1} truthy ! 0z falsy ! 0z00 truthy ! *non-zero-arg* Function arguments often behave slightly different from |TRUE|: If the argument is present and it evaluates to a non-zero Number, |v:true| or a *************** *** 157,163 **** 1.2 Function references ~ ! *Funcref* *E695* *E718* A Funcref variable is obtained with the |function()| function, the |funcref()| function or created with the lambda expression |expr-lambda|. It can be used in an expression in the place of a function name, before the parenthesis --- 180,186 ---- 1.2 Function references ~ ! *Funcref* *E695* *E718* A Funcref variable is obtained with the |function()| function, the |funcref()| function or created with the lambda expression |expr-lambda|. It can be used in an expression in the place of a function name, before the parenthesis *************** *** 270,282 **** List concatenation ~ ! Two lists can be concatenated with the "+" operator: > :let longlist = mylist + [5, 6] :let mylist += [7, 8] ! To prepend or append an item turn the item into a list by putting [] around ! it. To change a list in-place see |list-modification| below. Sublist ~ --- 293,305 ---- List concatenation ~ ! *list-concatenation* Two lists can be concatenated with the "+" operator: > :let longlist = mylist + [5, 6] :let mylist += [7, 8] ! To prepend or append an item, turn the item into a list by putting [] around ! it. To change a list in-place, refer to |list-modification| below. Sublist ~ *************** *** 589,594 **** --- 612,619 ---- Weeding out entries from a Dictionary can be done with |filter()|: > :call filter(dict, 'v:val =~ "x"') This removes all entries from "dict" with a value not matching 'x'. + This can also be used to remove all entries: > + call filter(dict, 0) Dictionary function ~ *************** *** 876,882 **** All expressions within one level are parsed from left to right. ! expr1 *expr1* *trinary* *falsy-operator* *E109* ----- The trinary operator: expr2 ? expr1 : expr1 --- 901,907 ---- All expressions within one level are parsed from left to right. ! expr1 *expr1* *trinary* *falsy-operator* *??* *E109* ----- The trinary operator: expr2 ? expr1 : expr1 *************** *** 1129,1135 **** For '!' |TRUE| becomes |FALSE|, |FALSE| becomes |TRUE| (one). For '-' the sign of the number is changed. ! For '+' the number is unchanged. A String will be converted to a Number first. --- 1154,1160 ---- For '!' |TRUE| becomes |FALSE|, |FALSE| becomes |TRUE| (one). For '-' the sign of the number is changed. ! For '+' the number is unchanged. Note: "++" has no effect. A String will be converted to a Number first. *************** *** 1155,1161 **** If expr8 is a Number or String this results in a String that contains the expr1'th single byte from expr8. expr8 is used as a String (a number is automatically converted to a String), expr1 as a Number. This doesn't ! recognize multi-byte encodings, see `byteidx()` for an alternative, or use `split()` to turn the string into a list of characters. Example, to get the byte under the cursor: > :let c = getline(".")[col(".") - 1] --- 1180,1186 ---- If expr8 is a Number or String this results in a String that contains the expr1'th single byte from expr8. expr8 is used as a String (a number is automatically converted to a String), expr1 as a Number. This doesn't ! recognize multibyte encodings, see `byteidx()` for an alternative, or use `split()` to turn the string into a list of characters. Example, to get the byte under the cursor: > :let c = getline(".")[col(".") - 1] *************** *** 1301,1308 **** number ------ number number constant *expr-number* - *hex-number* *octal-number* *binary-number* Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B) and Octal (starting with 0, 0o or 0O). --- 1326,1333 ---- number ------ number number constant *expr-number* + *0x* *hex-number* *0o* *octal-number* *binary-number* Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B) and Octal (starting with 0, 0o or 0O). *************** *** 1530,1536 **** :echo Bar(6) < 5 ! Note that the variables must exist in the outer scope before the lamba is defined for this to work. See also |:func-closure|. Lambda and closure support can be checked with: > --- 1555,1561 ---- :echo Bar(6) < 5 ! Note that the variables must exist in the outer scope before the lambda is defined for this to work. See also |:func-closure|. Lambda and closure support can be checked with: > *************** *** 1555,1561 **** Lambda expressions have internal names like '42'. If you get an error for a lambda expression, you can find what it is with the following command: > ! :function {'42'} See also: |numbered-function| ============================================================================== --- 1580,1586 ---- Lambda expressions have internal names like '42'. If you get an error for a lambda expression, you can find what it is with the following command: > ! :function 42 See also: |numbered-function| ============================================================================== *************** *** 1571,1576 **** --- 1596,1602 ---- Using a name that is not an internal variable or refers to a variable that has been destroyed results in an error. + *variable-scope* There are several name spaces for variables. Which one is to be used is specified by what is prepended: *************** *** 1589,1595 **** :for k in keys(s:) : unlet s:[k] :endfor ! < *buffer-variable* *b:var* *b:* A variable name that is preceded with "b:" is local to the current buffer. Thus you can have several "b:foo" variables, one for each buffer. --- 1615,1623 ---- :for k in keys(s:) : unlet s:[k] :endfor ! ! Note: in Vim9 script this is different, see |vim9-scopes|. ! *buffer-variable* *b:var* *b:* A variable name that is preceded with "b:" is local to the current buffer. Thus you can have several "b:foo" variables, one for each buffer. *************** *** 1867,1876 **** *v:event* *event-variable* v:event Dictionary containing information about the current ! |autocommand|. The dictionary is emptied when the |autocommand| ! finishes, please refer to |dict-identity| for how to get an ! independent copy of it. ! *v:exception* *exception-variable* v:exception The value of the exception most recently caught and not finished. See also |v:throwpoint| and |throw-variables|. --- 1895,1908 ---- *v:event* *event-variable* v:event Dictionary containing information about the current ! |autocommand|. See the specific event for what it puts in ! this dictionary. ! The dictionary is emptied when the |autocommand| finishes, ! please refer to |dict-identity| for how to get an independent ! copy of it. Use |deepcopy()| if you want to keep the ! information after the event triggers. Example: > ! au TextYankPost * let g:foo = deepcopy(v:event) ! < *v:exception* *exception-variable* v:exception The value of the exception most recently caught and not finished. See also |v:throwpoint| and |throw-variables|. *************** *** 2031,2036 **** --- 2063,2070 ---- *v:none* *none-variable* *None* v:none An empty String. Used to put an empty item in JSON. See |json_encode()|. + This can also be used as a function argument to use the + default value, see |none-function_argument|. When used as a number this evaluates to zero. When used as a string this evaluates to "v:none". > echo v:none *************** *** 2051,2057 **** *v:numbermax* *numbermax-variable* v:numbermax Maximum value of a number. ! *v:numbermix* *numbermix-variable* v:numbermin Minimum value of a number (negative) *v:numbersize* *numbersize-variable* --- 2085,2091 ---- *v:numbermax* *numbermax-variable* v:numbermax Maximum value of a number. ! *v:numbermin* *numbermin-variable* v:numbermin Minimum value of a number (negative) *v:numbersize* *numbersize-variable* *************** *** 3129,3135 **** error message is given. Example: > :let failed = appendbufline(13, 0, "# THE START") < ! Can also be used as a |method| after a List: > mylist->appendbufline(buf, lnum) --- 3163,3170 ---- error message is given. Example: > :let failed = appendbufline(13, 0, "# THE START") < ! Can also be used as a |method| after a List, the base is ! passed as the second argument: > mylist->appendbufline(buf, lnum) *************** *** 3161,3167 **** {winnr} can be the window number or the |window-ID|. *argv()* ! argv([{nr} [, {winid}]) The result is the {nr}th file in the argument list. See |arglist|. "argv(0)" is the first one. Example: > :let i = 0 --- 3196,3202 ---- {winnr} can be the window number or the |window-ID|. *argv()* ! argv([{nr} [, {winid}]]) The result is the {nr}th file in the argument list. See |arglist|. "argv(0)" is the first one. Example: > :let i = 0 *************** *** 3409,3415 **** above. If the buffer doesn't exist, -1 is returned. Or, if the ! {create} argument is present and not zero, 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 --- 3444,3450 ---- above. If the buffer doesn't exist, -1 is returned. Or, if the ! {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 *************** *** 3560,3566 **** Example for "utf-8": > char2nr("á") returns 225 char2nr("á"[0]) returns 195 ! < With {utf8} set to 1, 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: > --- 3595,3601 ---- Example for "utf-8": > char2nr("á") returns 225 char2nr("á"[0]) returns 195 ! < 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: > *************** *** 3762,3768 **** *complete_info()* complete_info([{what}]) ! Returns a Dictionary with information about Insert mode completion. See |ins-completion|. The items are: mode Current completion mode name string. --- 3797,3803 ---- *complete_info()* complete_info([{what}]) ! Returns a |Dictionary| with information about Insert mode completion. See |ins-completion|. The items are: mode Current completion mode name string. *************** *** 3794,3800 **** "function" User defined completion |i_CTRL-X_CTRL-U| "omni" Omni completion |i_CTRL-X_CTRL-O| "spell" Spelling suggestions |i_CTRL-X_s| ! "eval" |complete()| completion "unknown" Other internal modes If the optional {what} list argument is supplied, then only --- 3829,3835 ---- "function" User defined completion |i_CTRL-X_CTRL-U| "omni" Omni completion |i_CTRL-X_CTRL-O| "spell" Spelling suggestions |i_CTRL-X_s| ! "eval" |complete()| completion "unknown" Other internal modes If the optional {what} list argument is supplied, then only *************** *** 3838,3844 **** not need to be the first letter: > confirm("file has been modified", "&Save\nSave &All") < For the console, the first letter of each choice is used as ! the default shortcut key. The optional {default} argument is the number of the choice that is made if the user hits . Use 1 to make the first --- 3873,3879 ---- not need to be the first letter: > confirm("file has been modified", "&Save\nSave &All") < For the console, the first letter of each choice is used as ! the default shortcut key. Case is ignored. The optional {default} argument is the number of the choice that is made if the user hits . Use 1 to make the first *************** *** 4027,4032 **** --- 4062,4068 ---- changing an item in the copy does not change the contents of the original |List|. A |Dictionary| is copied in a similar way as a |List|. + When {noref} is omitted or zero a contained |List| or |Dictionary| is only copied once. All references point to this single copy. With {noref} set to 1 every occurrence of a *************** *** 4055,4062 **** A symbolic link itself is deleted, not what it points to. ! The result is a Number, which is 0 if the delete operation was ! successful and -1 when the deletion failed or partly failed. Use |remove()| to delete an item from a |List|. To delete a line from the buffer use |:delete| or --- 4091,4099 ---- A symbolic link itself is deleted, not what it points to. ! The result is a Number, which is 0/false if the delete ! operation was successful and -1/true when the deletion failed ! or partly failed. Use |remove()| to delete an item from a |List|. To delete a line from the buffer use |:delete| or *************** *** 4387,4397 **** --- 4424,4438 ---- autocmd file name autocmd buffer number (as a String!) autocmd matched name + C expression under the cursor sourced script file or function name sourced script line number or function line number script file line number, also when in a function + "123_" where "123" is the + current script ID || + call stack word under the cursor WORD under the cursor the {clientid} of the last received *************** *** 4465,4474 **** |Dictionaries|. If they are |Lists|: Append {expr2} to {expr1}. ! If {expr3} is given insert the items of {expr2} before item ! {expr3} in {expr1}. When {expr3} is zero insert before the ! first item. When {expr3} is equal to len({expr1}) then ! {expr2} is appended. Examples: > :echo sort(extend(mylist, [7, 5])) :call extend(mylist, [2, 3], 1) --- 4506,4515 ---- |Dictionaries|. If they are |Lists|: Append {expr2} to {expr1}. ! If {expr3} is given insert the items of {expr2} before the ! item with index {expr3} in {expr1}. When {expr3} is zero ! insert before the first item. When {expr3} is equal to ! len({expr1}) then {expr2} is appended. Examples: > :echo sort(extend(mylist, [7, 5])) :call extend(mylist, [2, 3], 1) *************** *** 4537,4542 **** --- 4578,4585 ---- 'L' Lowlevel input. Only works for Unix or when using the GUI. Keys are used as if they were coming from the terminal. Other flags are not used. *E980* + When a CTRL-C interrupts and 't' is included it sets + the internal "got_int" flag. 'i' Insert the string instead of appending (see above). 'x' Execute commands until typeahead is empty. This is similar to using ":normal!". You can call feedkeys() *************** *** 4548,4554 **** script continues. Note that if you manage to call feedkeys() while executing commands, thus calling it recursively, then ! all typehead will be consumed by the last call. '!' When used with 'x' will not end Insert mode. Can be used in a test when a timer is set to exit Insert mode a little later. Useful for testing CursorHoldI. --- 4591,4597 ---- script continues. Note that if you manage to call feedkeys() while executing commands, thus calling it recursively, then ! all typeahead will be consumed by the last call. '!' When used with 'x' will not end Insert mode. Can be used in a test when a timer is set to exit Insert mode a little later. Useful for testing CursorHoldI. *************** *** 4584,4590 **** directory, and we can write to it, the result is 2. Can also be used as a |method|: > ! GetName()->filewriteable() filter({expr1}, {expr2}) *filter()* --- 4627,4633 ---- directory, and we can write to it, the result is 2. Can also be used as a |method|: > ! GetName()->filewritable() filter({expr1}, {expr2}) *filter()* *************** *** 4671,4677 **** a very large number. The {list} is changed in place, make a copy first if you do not want that. ! *E964* {maxdepth} means how deep in nested lists changes are made. {list} is not modified when {maxdepth} is 0. {maxdepth} must be positive number. --- 4714,4720 ---- a very large number. The {list} is changed in place, make a copy first if you do not want that. ! *E900* {maxdepth} means how deep in nested lists changes are made. {list} is not modified when {maxdepth} is 0. {maxdepth} must be positive number. *************** *** 4775,4781 **** :echo fnamemodify("main.c", ":p:h") < results in: > /home/mool/vim/vim/src ! < Note: Environment variables don't work in {fname}, use |expand()| first then. Can also be used as a |method|: > --- 4818,4825 ---- :echo fnamemodify("main.c", ":p:h") < results in: > /home/mool/vim/vim/src ! < If {mods} is empty then {fname} is returned. ! Note: Environment variables don't work in {fname}, use |expand()| first then. Can also be used as a |method|: > *************** *** 4968,4979 **** Get item {idx} from |List| {list}. When this item is not available return {default}. Return zero when {default} is omitted. ! Can also be used as a |method|: > mylist->get(idx) get({blob}, {idx} [, {default}]) Get byte {idx} from |Blob| {blob}. When this byte is not available return {default}. Return -1 when {default} is omitted. get({dict}, {key} [, {default}]) Get item with key {key} from |Dictionary| {dict}. When this item is not available return {default}. Return zero when --- 5012,5025 ---- Get item {idx} from |List| {list}. When this item is not available return {default}. Return zero when {default} is omitted. ! Preferably used as a |method|: > mylist->get(idx) get({blob}, {idx} [, {default}]) Get byte {idx} from |Blob| {blob}. When this byte is not available return {default}. Return -1 when {default} is omitted. + Preferably used as a |method|: > + myblob->get(idx) get({dict}, {key} [, {default}]) Get item with key {key} from |Dictionary| {dict}. When this item is not available return {default}. Return zero when *************** *** 4981,4986 **** --- 5027,5034 ---- let val = get(g:, 'var_name', 'default') < This gets the value of g:var_name if it exists, and uses 'default' when it does not exist. + Preferably used as a |method|: > + mydict->get(key) get({func}, {what}) Get an item with from Funcref {func}. Possible values for {what} are: *************** *** 4988,4994 **** "func" The function "dict" The dictionary "args" The list with arguments ! *getbufinfo()* getbufinfo([{expr}]) getbufinfo([{dict}]) --- 5036,5044 ---- "func" The function "dict" The dictionary "args" The list with arguments ! Preferably used as a |method|: > ! myfunc->get(what) ! < *getbufinfo()* getbufinfo([{expr}]) getbufinfo([{dict}]) *************** *** 4997,5003 **** Without an argument information about all the buffers is returned. ! When the argument is a Dictionary only the buffers matching the specified criteria are returned. The following keys can be specified in {dict}: buflisted include only listed buffers. --- 5047,5053 ---- Without an argument information about all the buffers is returned. ! When the argument is a |Dictionary| only the buffers matching the specified criteria are returned. The following keys can be specified in {dict}: buflisted include only listed buffers. *************** *** 5011,5041 **** Each returned List item is a dictionary with the following entries: ! bufnr buffer number. changed TRUE if the buffer is modified. ! changedtick number of changes made to the buffer. hidden TRUE if the buffer is hidden. ! lastused timestamp in seconds, like |localtime()|, when the buffer was last used. {only with the |+viminfo| feature} listed TRUE if the buffer is listed. ! lnum current line number in buffer. ! linecount number of lines in the buffer (only valid when loaded) loaded TRUE if the buffer is loaded. ! name full path to the file in the buffer. ! signs list of signs placed in the buffer. Each list item is a dictionary with the following fields: id sign identifier lnum line number name sign name ! variables a reference to the dictionary with buffer-local variables. ! windows list of |window-ID|s that display this buffer ! popups list of popup |window-ID|s that display this buffer Examples: > --- 5061,5092 ---- Each returned List item is a dictionary with the following entries: ! bufnr Buffer number. changed TRUE if the buffer is modified. ! changedtick Number of changes made to the buffer. hidden TRUE if the buffer is hidden. ! lastused Timestamp in seconds, like |localtime()|, when the buffer was last used. {only with the |+viminfo| feature} listed TRUE if the buffer is listed. ! lnum Line number used for the buffer when ! opened in the current window. ! linecount Number of lines in the buffer (only valid when loaded) loaded TRUE if the buffer is loaded. ! name Full path to the file in the buffer. ! signs List of signs placed in the buffer. Each list item is a dictionary with the following fields: id sign identifier lnum line number name sign name ! variables A reference to the dictionary with buffer-local variables. ! windows List of |window-ID|s that display this buffer ! popups List of popup |window-ID|s that display this buffer Examples: > *************** *** 5087,5095 **** The result is the value of option or local buffer variable {varname} in buffer {expr}. Note that the name without "b:" must be used. ! When {varname} is empty returns a dictionary with all the buffer-local variables. ! When {varname} is equal to "&" returns a dictionary with all the buffer-local options. Otherwise, when {varname} starts with "&" returns the value of a buffer-local option. --- 5138,5146 ---- The result is the value of option or local buffer variable {varname} in buffer {expr}. Note that the name without "b:" must be used. ! When {varname} is empty returns a |Dictionary| with all the buffer-local variables. ! When {varname} is equal to "&" returns a |Dictionary| with all the buffer-local options. Otherwise, when {varname} starts with "&" returns the value of a buffer-local option. *************** *** 5171,5177 **** |xterm-bracketed-paste|. There is no prompt, you will somehow have to make clear to the ! user that a character has to be typed. There is no mapping for the character. Key codes are replaced, thus when the user presses the key you get the code for the key, not the raw character --- 5222,5231 ---- |xterm-bracketed-paste|. There is no prompt, you will somehow have to make clear to the ! user that a character has to be typed. The screen is not ! redrawn, e.g. when resizing the window. When using a popup ! window it should work better with a |popup-filter|. ! There is no mapping for the character. Key codes are replaced, thus when the user presses the key you get the code for the key, not the raw character *************** *** 5316,5322 **** highlight highlight groups history :history suboptions locale locale names (as output of locale -a) ! mapclear buffer argument mapping mapping name menu menus messages |:messages| suboptions --- 5370,5376 ---- highlight highlight groups history :history suboptions locale locale names (as output of locale -a) ! mapclear buffer argument mapping mapping name menu menus messages |:messages| suboptions *************** *** 5342,5348 **** If {type} is "cmdline", then the |cmdline-completion| result is returned. For example, to complete the possible values after a ":call" command: > ! echo getcompletion('call ', 'cmdline') < If there are no matches, an empty list is returned. An invalid value for {type} produces an error. --- 5396,5402 ---- If {type} is "cmdline", then the |cmdline-completion| result is returned. For example, to complete the possible values after a ":call" command: > ! echo getcompletion('call ', 'cmdline') < If there are no matches, an empty list is returned. An invalid value for {type} produces an error. *************** *** 5573,5579 **** < To get lines from another buffer see |getbufline()| getloclist({nr} [, {what}]) *getloclist()* ! Returns a list with all the entries in the location list for window {nr}. {nr} can be the window number or the |window-ID|. When {nr} is zero the current window is used. --- 5627,5633 ---- < To get lines from another buffer see |getbufline()| getloclist({nr} [, {what}]) *getloclist()* ! Returns a |List| with all the entries in the location list for window {nr}. {nr} can be the window number or the |window-ID|. When {nr} is zero the current window is used. *************** *** 5595,5601 **** |location-list-file-window| for more details. ! getmarklist([{expr}] *getmarklist()* Without the {expr} argument returns a |List| with information about all the global marks. |mark| --- 5649,5664 ---- |location-list-file-window| for more details. ! Returns a |Dictionary| with default values if there is no ! location list for the window {nr}. ! Returns an empty Dictionary if window {nr} does not exist. ! ! Examples (See also |getqflist-examples|): > ! :echo getloclist(3, {'all': 0}) ! :echo getloclist(5, {'filewinid': 0}) ! ! ! getmarklist([{expr}]) *getmarklist()* Without the {expr} argument returns a |List| with information about all the global marks. |mark| *************** *** 5603,5609 **** local marks defined in buffer {expr}. For the use of {expr}, see |bufname()|. ! Each item in the retuned List is a |Dict| with the following: name - name of the mark prefixed by "'" pos - a |List| with the position of the mark: [bufnum, lnum, col, off] --- 5666,5672 ---- local marks defined in buffer {expr}. For the use of {expr}, see |bufname()|. ! Each item in the returned List is a |Dict| with the following: name - name of the mark prefixed by "'" pos - a |List| with the position of the mark: [bufnum, lnum, col, off] *************** *** 5639,5645 **** :unlet m < getmousepos() *getmousepos()* ! Returns a Dictionary with the last known position of the mouse. This can be used in a mapping for a mouse click or in a filter of a popup window. The items are: screenrow screen row --- 5702,5708 ---- :unlet m < getmousepos() *getmousepos()* ! Returns a |Dictionary| with the last known position of the mouse. This can be used in a mapping for a mouse click or in a filter of a popup window. The items are: screenrow screen row *************** *** 5655,5661 **** "screenrow" and "screencol" are valid, the others are zero. When on the status line below a window or the vertical ! separater right of a window, the "line" and "column" values are zero. When the position is after the text then "column" is the --- 5718,5724 ---- "screenrow" and "screencol" are valid, the others are zero. When on the status line below a window or the vertical ! separator right of a window, the "line" and "column" values are zero. When the position is after the text then "column" is the *************** *** 5670,5676 **** *getpid()* getpid() Return a Number which is the process ID of the Vim process. On Unix and MS-Windows this is a unique number, until Vim ! exits. On MS-DOS it's always zero. *getpos()* getpos({expr}) Get the position for {expr}. For possible values of {expr} --- 5733,5739 ---- *getpid()* getpid() Return a Number which is the process ID of the Vim process. On Unix and MS-Windows this is a unique number, until Vim ! exits. *getpos()* getpos({expr}) Get the position for {expr}. For possible values of {expr} *************** *** 5842,5847 **** --- 5905,5911 ---- If {regname} is invalid or not set, an empty Dictionary will be returned. If {regname} is not specified, |v:register| is used. + The returned Dictionary can be passed to |setreg()|. Can also be used as a |method|: > GetRegname()->getreginfo() *************** *** 5861,5872 **** gettabinfo([{arg}]) *gettabinfo()* If {arg} is not specified, then information about all the tab ! pages is returned as a List. Each List item is a Dictionary. Otherwise, {arg} specifies the tab page number and information about that one is returned. If the tab page does not exist an empty List is returned. ! Each List item is a Dictionary with the following entries: tabnr tab page number. variables a reference to the dictionary with tabpage-local variables --- 5925,5936 ---- gettabinfo([{arg}]) *gettabinfo()* If {arg} is not specified, then information about all the tab ! pages is returned as a |List|. Each List item is a |Dictionary|. Otherwise, {arg} specifies the tab page number and information about that one is returned. If the tab page does not exist an empty List is returned. ! Each List item is a |Dictionary| with the following entries: tabnr tab page number. variables a reference to the dictionary with tabpage-local variables *************** *** 5894,5900 **** When {varname} is empty a dictionary with all window-local variables is returned. When {varname} is equal to "&" get the values of all ! window-local options in a Dictionary. Otherwise, when {varname} starts with "&" get the value of a window-local option. Note that {varname} must be the name without "w:". --- 5958,5964 ---- When {varname} is empty a dictionary with all window-local variables is returned. When {varname} is equal to "&" get the values of all ! window-local options in a |Dictionary|. Otherwise, when {varname} starts with "&" get the value of a window-local option. Note that {varname} must be the name without "w:". *************** *** 5999,6005 **** GetWinnr()->getwininfo() getwinpos([{timeout}]) *getwinpos()* ! The result is a list with two numbers, the result of |getwinposx()| and |getwinposy()| combined: [x-pos, y-pos] {timeout} can be used to specify how long to wait in msec for --- 6063,6069 ---- GetWinnr()->getwininfo() getwinpos([{timeout}]) *getwinpos()* ! The result is a |List| with two numbers, the result of |getwinposx()| and |getwinposy()| combined: [x-pos, y-pos] {timeout} can be used to specify how long to wait in msec for *************** *** 6054,6060 **** 'suffixes' affect the ordering of matches. 'wildignorecase' always applies. ! When {list} is present and it is |TRUE| the result is a List with all matching files. The advantage of using a List is, you also get filenames containing newlines correctly. Otherwise the result is a String and when there are several --- 6118,6124 ---- 'suffixes' affect the ordering of matches. 'wildignorecase' always applies. ! When {list} is present and it is |TRUE| the result is a |List| with all matching files. The advantage of using a List is, you also get filenames containing newlines correctly. Otherwise the result is a String and when there are several *************** *** 6117,6123 **** one of the patterns in 'wildignore' will be skipped and 'suffixes' affect the ordering of matches. ! When {list} is present and it is |TRUE| the result is a List with all matching files. The advantage of using a List is, you also get filenames containing newlines correctly. Otherwise the result is a String and when there are several matches, --- 6181,6187 ---- one of the patterns in 'wildignore' will be skipped and 'suffixes' affect the ordering of matches. ! When {list} is present and it is |TRUE| the result is a |List| with all matching files. The advantage of using a List is, you also get filenames containing newlines correctly. Otherwise the result is a String and when there are several matches, *************** *** 6147,6160 **** When {check} is present and not zero: The result is a Number, which is 1 if the feature {feature} could ever be supported, zero otherwise. This is useful to check for a typo in ! {feature}. Keep in mind that an older Vim version will not ! know about a feature added later. Also see |exists()|. Note that to skip code that has a syntax error when the feature is not available, Vim may skip the rest of the line ! and miss a following `endif`. Therfore put the `endif` on a separate line: > if has('feature') let x = this->breaks->without->the->feature --- 6211,6226 ---- When {check} is present and not zero: The result is a Number, which is 1 if the feature {feature} could ever be supported, zero otherwise. This is useful to check for a typo in ! {feature} and to detect dead code. Keep in mind that an older ! Vim version will not know about a feature added later and ! features that have been abandoned will not be known by the ! current Vim version. Also see |exists()|. Note that to skip code that has a syntax error when the feature is not available, Vim may skip the rest of the line ! and miss a following `endif`. Therefore put the `endif` on a separate line: > if has('feature') let x = this->breaks->without->the->feature *************** *** 6164,6171 **** has_key({dict}, {key}) *has_key()* ! The result is a Number, which is 1 if |Dictionary| {dict} has ! an entry with key {key}. Zero otherwise. Can also be used as a |method|: > mydict->has_key(key) --- 6230,6237 ---- has_key({dict}, {key}) *has_key()* ! The result is a Number, which is TRUE if |Dictionary| {dict} ! has an entry with key {key}. FALSE otherwise. Can also be used as a |method|: > mydict->has_key(key) *************** *** 6208,6223 **** GetWinnr()->haslocaldir() hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* ! The result is a Number, which is 1 if there is a mapping that ! contains {what} in somewhere in the rhs (what it is mapped to) ! and this mapping exists in one of the modes indicated by ! {mode}. When {abbr} is there and it is |TRUE| use abbreviations instead of mappings. Don't forget to specify Insert and/or Command-line mode. Both the global mappings and the mappings local to the current buffer are checked for a match. ! If no matching mapping is found 0 is returned. The following characters are recognized in {mode}: n Normal mode v Visual and Select mode --- 6274,6289 ---- GetWinnr()->haslocaldir() hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* ! The result is a Number, which is TRUE if there is a mapping ! that contains {what} in somewhere in the rhs (what it is ! mapped to) and this mapping exists in one of the modes ! indicated by {mode}. When {abbr} is there and it is |TRUE| use abbreviations instead of mappings. Don't forget to specify Insert and/or Command-line mode. Both the global mappings and the mappings local to the current buffer are checked for a match. ! If no matching mapping is found FALSE is returned. The following characters are recognized in {mode}: n Normal mode v Visual and Select mode *************** *** 6253,6260 **** character is sufficient. If {item} does already exist in the history, it will be shifted to become the newest entry. ! The result is a Number: 1 if the operation was successful, ! otherwise 0 is returned. Example: > :call histadd("input", strftime("%Y %b %d")) --- 6319,6326 ---- character is sufficient. If {item} does already exist in the history, it will be shifted to become the newest entry. ! The result is a Number: TRUE if the operation was successful, ! otherwise FALSE is returned. Example: > :call histadd("input", strftime("%Y %b %d")) *************** *** 6277,6284 **** an index, see |:history-indexing|. The respective entry will be removed if it exists. ! The result is a Number: 1 for a successful operation, ! otherwise 0 is returned. Examples: Clear expression register history: > --- 6343,6350 ---- an index, see |:history-indexing|. The respective entry will be removed if it exists. ! The result is TRUE for a successful operation, otherwise FALSE ! is returned. Examples: Clear expression register history: > *************** *** 6330,6336 **** GetHistory()->histnr() < hlexists({name}) *hlexists()* ! The result is a Number, which is non-zero if a highlight group called {name} exists. This is when the group has been defined in some way. Not necessarily when highlighting has been defined for it, it may also have been used for a syntax --- 6396,6402 ---- GetHistory()->histnr() < hlexists({name}) *hlexists()* ! The result is a Number, which is TRUE if a highlight group called {name} exists. This is when the group has been defined in some way. Not necessarily when highlighting has been defined for it, it may also have been used for a syntax *************** *** 6484,6493 **** displayed, one string per line. The user will be prompted to enter a number, which is returned. The user can also select an item by clicking on it with the ! mouse. For the first string 0 is returned. When clicking ! above the first item a negative number is returned. When ! clicking on the prompt one more than the length of {textlist} ! is returned. Make sure {textlist} has less than 'lines' entries, otherwise it won't work. It's a good idea to put the entry number at the start of the string. And put a prompt in the first item. --- 6550,6560 ---- displayed, one string per line. The user will be prompted to enter a number, which is returned. The user can also select an item by clicking on it with the ! mouse, if the mouse is enabled in the command line ('mouse' is ! "a" or includes "c"). For the first string 0 is returned. ! When clicking above the first item a negative number is ! returned. When clicking on the prompt one more than the ! length of {textlist} is returned. Make sure {textlist} has less than 'lines' entries, otherwise it won't work. It's a good idea to put the entry number at the start of the string. And put a prompt in the first item. *************** *** 6502,6508 **** Restore typeahead that was saved with a previous |inputsave()|. Should be called the same number of times inputsave() is called. Calling it more often is harmless though. ! Returns 1 when there is nothing to restore, 0 otherwise. inputsave() *inputsave()* Preserve typeahead (also from mappings) and clear it, so that --- 6569,6575 ---- Restore typeahead that was saved with a previous |inputsave()|. Should be called the same number of times inputsave() is called. Calling it more often is harmless though. ! Returns TRUE when there is nothing to restore, FALSE otherwise. inputsave() *inputsave()* Preserve typeahead (also from mappings) and clear it, so that *************** *** 6510,6516 **** followed by a matching inputrestore() after the prompt. Can be used several times, in which case there must be just as many inputrestore() calls. ! Returns 1 when out of memory, 0 otherwise. inputsecret({prompt} [, {text}]) *inputsecret()* This function acts much like the |input()| function with but --- 6577,6583 ---- followed by a matching inputrestore() after the prompt. Can be used several times, in which case there must be just as many inputrestore() calls. ! Returns TRUE when out of memory, FALSE otherwise. inputsecret({prompt} [, {text}]) *inputsecret()* This function acts much like the |input()| function with but *************** *** 6986,6992 **** listener_remove({id}) *listener_remove()* Remove a listener previously added with listener_add(). ! Returns zero when {id} could not be found, one when {id} was removed. Can also be used as a |method|: > --- 7053,7059 ---- listener_remove({id}) *listener_remove()* Remove a listener previously added with listener_add(). ! Returns FALSE when {id} could not be found, TRUE when {id} was removed. Can also be used as a |method|: > *************** *** 7204,7210 **** mapnew({expr1}, {expr2}) *mapnew()* Like |map()| but instead of replacing items in {expr1} a new List or Dictionary is created and returned. {expr1} remains ! unchanged. mapset({mode}, {abbr}, {dict}) *mapset()* --- 7271,7278 ---- mapnew({expr1}, {expr2}) *mapnew()* Like |map()| but instead of replacing items in {expr1} a new List or Dictionary is created and returned. {expr1} remains ! unchanged. Items can still be changed by {expr2}, if you ! don't want that use |deepcopy()| first. mapset({mode}, {abbr}, {dict}) *mapset()* *************** *** 7220,7226 **** call mapset('n', 0, save_map) < Note that if you are going to replace a map in several modes, e.g. with `:map!`, you need to save the mapping for all of ! them, since they can differe. match({expr}, {pat} [, {start} [, {count}]]) *match()* --- 7288,7294 ---- call mapset('n', 0, save_map) < Note that if you are going to replace a map in several modes, e.g. with `:map!`, you need to save the mapping for all of ! them, since they can differ. match({expr}, {pat} [, {start} [, {count}]]) *match()* *************** *** 7561,7568 **** < *max()* ! max({expr}) Return the maximum value of all items in {expr}. ! {expr} can be a List or a Dictionary. For a Dictionary, it returns the maximum of all values in the Dictionary. If {expr} is neither a List nor a Dictionary, or one of the items in {expr} cannot be used as a Number this results in --- 7629,7638 ---- < *max()* ! max({expr}) Return the maximum value of all items in {expr}. Example: > ! echo max([apples, pears, oranges]) ! ! < {expr} can be a |List| or a |Dictionary|. For a Dictionary, it returns the maximum of all values in the Dictionary. If {expr} is neither a List nor a Dictionary, or one of the items in {expr} cannot be used as a Number this results in *************** *** 7632,7639 **** < *min()* ! min({expr}) Return the minimum value of all items in {expr}. ! {expr} can be a List or a Dictionary. For a Dictionary, it returns the minimum of all values in the Dictionary. If {expr} is neither a List nor a Dictionary, or one of the items in {expr} cannot be used as a Number this results in --- 7702,7711 ---- < *min()* ! min({expr}) Return the minimum value of all items in {expr}. Example: > ! echo min([apples, pears, oranges]) ! ! < {expr} can be a |List| or a |Dictionary|. For a Dictionary, it returns the minimum of all values in the Dictionary. If {expr} is neither a List nor a Dictionary, or one of the items in {expr} cannot be used as a Number this results in *************** *** 7650,7662 **** necessary. Otherwise it must be "". If {prot} is given it is used to set the protection bits of ! the new directory. The default is 0755 (rwxr-xr-x: r/w for ! the user readable for others). Use 0700 to make it unreadable ! for others. This is only used for the last part of {name}. ! Thus if you create /tmp/foo/bar then /tmp/foo will be created ! with 0755. Example: > ! :call mkdir($HOME . "/tmp/foo/bar", "p", 0700) < This function is not available in the |sandbox|. --- 7722,7734 ---- necessary. Otherwise it must be "". If {prot} is given it is used to set the protection bits of ! the new directory. The default is 0o755 (rwxr-xr-x: r/w for ! the user, readable for others). Use 0o700 to make it ! unreadable for others. This is only used for the last part of ! {name}. Thus if you create /tmp/foo/bar then /tmp/foo will be ! created with 0o755. Example: > ! :call mkdir($HOME . "/tmp/foo/bar", "p", 0o700) < This function is not available in the |sandbox|. *************** *** 7664,7671 **** flag is passed (since patch 8.0.1708). However, without the "p" option the call will fail. ! The function result is a Number, which is 1 if the call was ! successful or 0 if the directory creation failed or partly failed. Not available on all systems. To check use: > --- 7736,7743 ---- flag is passed (since patch 8.0.1708). However, without the "p" option the call will fail. ! The function result is a Number, which is TRUE if the call was ! successful or FALSE if the directory creation failed or partly failed. Not available on all systems. To check use: > *************** *** 7815,7821 **** < {only available when compiled with the |+perl| feature} ! popup_ functions are documented here: |popup-functions|. pow({x}, {y}) *pow()* --- 7887,7893 ---- < {only available when compiled with the |+perl| feature} ! popup_ functions are documented here: |popup-functions| pow({x}, {y}) *pow()* *************** *** 8044,8051 **** prompt_getprompt({buf}) *prompt_getprompt()* ! Returns the effective prompt text for buffer {buf}. {buf} can ! be a buffer name or number. |prompt-buffer|. If the buffer doesn't exist or isn't a prompt buffer, an empty string is returned. --- 8116,8123 ---- prompt_getprompt({buf}) *prompt_getprompt()* ! Returns the effective prompt text for buffer {buf}. {buf} can ! be a buffer name or number. See |prompt-buffer|. If the buffer doesn't exist or isn't a prompt buffer, an empty string is returned. *************** *** 8401,8415 **** Returns an empty string when not recording. See |q|. reltime([{start} [, {end}]]) *reltime()* ! Return an item that represents a time value. The format of ! the item depends on the system. It can be passed to ! |reltimestr()| to convert it to a string or |reltimefloat()| ! to convert to a Float. ! Without an argument it returns the current time. With one argument is returns the time passed since the time specified in the argument. With two arguments it returns the time passed between {start} and {end}. The {start} and {end} arguments must be values returned by reltime(). --- 8473,8490 ---- Returns an empty string when not recording. See |q|. reltime([{start} [, {end}]]) *reltime()* ! Return an item that represents a time value. The item is a ! list with items that depend on the system. In Vim 9 script ! list can be used. ! The item can be passed to |reltimestr()| to convert it to a ! string or |reltimefloat()| to convert to a Float. ! ! Without an argument reltime() returns the current time. With one argument is returns the time passed since the time specified in the argument. With two arguments it returns the time passed between {start} and {end}. + The {start} and {end} arguments must be values returned by reltime(). *************** *** 8569,8575 **** Without {end}: Remove the item at {idx} from |List| {list} and return the item. With {end}: Remove items from {idx} to {end} (inclusive) and ! return a List with these items. When {idx} points to the same item as {end} a list with one item is returned. When {end} points to an item before {idx} this is an error. See |list-index| for possible values of {idx} and {end}. --- 8644,8650 ---- Without {end}: Remove the item at {idx} from |List| {list} and return the item. With {end}: Remove items from {idx} to {end} (inclusive) and ! return a |List| with these items. When {idx} points to the same item as {end} a list with one item is returned. When {end} points to an item before {idx} this is an error. See |list-index| for possible values of {idx} and {end}. *************** *** 8706,8712 **** GetRow()->screenchar(col) screenchars({row}, {col}) *screenchars()* ! The result is a List of Numbers. The first number is the same as what |screenchar()| returns. Further numbers are composing characters on top of the base character. This is mainly to be used for testing. --- 8781,8787 ---- GetRow()->screenchar(col) screenchars({row}, {col}) *screenchars()* ! The result is a |List| of Numbers. The first number is the same as what |screenchar()| returns. Further numbers are composing characters on top of the base character. This is mainly to be used for testing. *************** *** 8795,8805 **** 'ignorecase', 'smartcase' and 'magic' are used. ! When the 'z' flag is not given, searching always starts in ! column zero and then matches before the cursor are skipped. ! When the 'c' flag is present in 'cpo' the next search starts ! after the match. Without the 'c' flag the next search starts ! one column further. When the {stopline} argument is given then the search stops after searching this line. This is useful to restrict the --- 8870,8885 ---- 'ignorecase', 'smartcase' and 'magic' are used. ! When the 'z' flag is not given, forward searching always ! starts in column zero and then matches before the cursor are ! skipped. When the 'c' flag is present in 'cpo' the next ! search starts after the match. Without the 'c' flag the next ! search starts one column further. This matters for ! overlapping matches. ! When searching backwards and the 'z' flag is given then the ! search starts in column zero, thus no match in the current ! line will be found (unless wrapping around the end of the ! file). When the {stopline} argument is given then the search stops after searching this line. This is useful to restrict the *************** *** 8872,8878 **** without the "S" flag in 'shortmess'. This works even if 'shortmess' does contain the "S" flag. ! This returns a Dictionary. The dictionary is empty if the previous pattern was not set and "pattern" was not specified. key type meaning ~ --- 8952,8958 ---- without the "S" flag in 'shortmess'. This works even if 'shortmess' does contain the "S" flag. ! This returns a |Dictionary|. The dictionary is empty if the previous pattern was not set and "pattern" was not specified. key type meaning ~ *************** *** 8913,8926 **** if result.total > result.maxcount && \ result.current > result.maxcount return printf(' /%s [>%d/>%d]', @/, ! \ result.current, result.total) elseif result.total > result.maxcount return printf(' /%s [%d/>%d]', @/, ! \ result.current, result.total) endif endif return printf(' /%s [%d/%d]', @/, ! \ result.current, result.total) endfunction let &statusline .= '%{LastSearchCount()}' --- 8993,9006 ---- if result.total > result.maxcount && \ result.current > result.maxcount return printf(' /%s [>%d/>%d]', @/, ! \ result.current, result.total) elseif result.total > result.maxcount return printf(' /%s [%d/>%d]', @/, ! \ result.current, result.total) endif endif return printf(' /%s [%d/%d]', @/, ! \ result.current, result.total) endfunction let &statusline .= '%{LastSearchCount()}' *************** *** 8954,8966 **** " search again call searchcount() < ! {options} must be a Dictionary. It can contain: key type meaning ~ recompute |Boolean| if |TRUE|, recompute the count like |n| or |N| was executed. otherwise returns the last ! result by |n|, |N|, or this ! function is returned. (default: |TRUE|) pattern |String| recompute if this was given and different with |@/|. --- 9034,9048 ---- " search again call searchcount() < ! {options} must be a |Dictionary|. It can contain: key type meaning ~ recompute |Boolean| if |TRUE|, recompute the count like |n| or |N| was executed. otherwise returns the last ! computed result (when |n| or ! |N| was used when "S" is not ! in 'shortmess', or this ! function was called). (default: |TRUE|) pattern |String| recompute if this was given and different with |@/|. *************** *** 8979,8989 **** result. if search exceeded total count, "total" value becomes `maxcount + 1` ! (default: 0) pos |List| `[lnum, col, off]` value when recomputing the result. this changes "current" result ! value. see |cursor()|, |getpos() (default: cursor's position) --- 9061,9072 ---- result. if search exceeded total count, "total" value becomes `maxcount + 1` ! (default: 99) pos |List| `[lnum, col, off]` value when recomputing the result. this changes "current" result ! value. see |cursor()|, ! |getpos()| (default: cursor's position) *************** *** 9130,9135 **** --- 9213,9219 ---- Send a reply string to {clientid}. The most recent {clientid} that sent a string can be retrieved with expand(""). {only available when compiled with the |+clientserver| feature} + Returns zero for success, -1 for failure. Note: This id has to be stored before the next command can be received. I.e. before returning from the received command and *************** *** 9200,9206 **** tells Vim how wide characters are, counted in screen cells. This overrides 'ambiwidth'. Example: > setcellwidths([[0xad, 0xad, 1], ! \ [0x2194, 0x2199, 2]] < *E1109* *E1110* *E1111* *E1112* *E1113* The {list} argument is a list of lists with each three --- 9284,9290 ---- tells Vim how wide characters are, counted in screen cells. This overrides 'ambiwidth'. Example: > setcellwidths([[0xad, 0xad, 1], ! \ [0x2194, 0x2199, 2]]) < *E1109* *E1110* *E1111* *E1112* *E1113* The {list} argument is a list of lists with each three *************** *** 9267,9274 **** before inserting the resulting text. When the number is too big the cursor is put at the end of the line. A number smaller than one has undefined results. ! Returns 0 when successful, 1 when not editing the command ! line. Can also be used as a |method|: > GetPos()->setcmdpos() --- 9351,9358 ---- before inserting the resulting text. When the number is too big the cursor is put at the end of the line. A number smaller than one has undefined results. ! Returns FALSE when successful, TRUE when not editing the ! command line. Can also be used as a |method|: > GetPos()->setcmdpos() *************** *** 9359,9364 **** --- 9443,9450 ---- Otherwise, same as |setqflist()|. Also see |location-list|. + For {action} see |setqflist-action|. + If the optional {what} dictionary argument is supplied, then only the items listed in {what} are set. Refer to |setqflist()| for the list of supported keys in {what}. *************** *** 9438,9445 **** only the items listed in {what} are set. The first {list} argument is ignored. See below for the supported items in {what}. ! ! When {what} is not present, the items in {list} or used. Each item must be a dictionary. Non-dictionary items in {list} are ignored. Each dictionary item can contain the following entries: --- 9524,9531 ---- only the items listed in {what} are set. The first {list} argument is ignored. See below for the supported items in {what}. ! *setqflist-what* ! When {what} is not present, the items in {list} are used. Each item must be a dictionary. Non-dictionary items in {list} are ignored. Each dictionary item can contain the following entries: *************** *** 9548,9557 **** --- 9634,9645 ---- setreg({regname}, {value} [, {options}]) Set the register {regname} to {value}. If {regname} is "" or "@", the unnamed register '"' is used. + {value} may be any value returned by |getreg()| or |getreginfo()|, including a |List| or |Dict|. If {options} contains "a" or {regname} is upper case, then the value is appended. + {options} can also contain a register type specification: "c" or "v" |characterwise| mode "l" or "V" |linewise| mode *************** *** 9582,9588 **** register: > :let var_a = getreginfo() :call setreg('a', var_a) ! < or: :let var_a = getreg('a', 1, 1) :let var_amode = getregtype('a') .... --- 9670,9676 ---- register: > :let var_a = getreginfo() :call setreg('a', var_a) ! < or: > :let var_a = getreg('a', 1, 1) :let var_amode = getregtype('a') .... *************** *** 9658,9675 **** Returns zero for success, -1 for failure. ! Examples: ! Set current index of the tag stack to 4: > ! call settagstack(1005, {'curidx' : 4}) ! ! < Empty the tag stack of window 3: > call settagstack(3, {'items' : []}) - < Push a new item onto the tag stack: > - let pos = [bufnr('myfile.txt'), 10, 1, 0] - let newtag = [{'tagname' : 'mytag', 'from' : pos}] - call settagstack(2, {'items' : newtag}, 'a') - < Save and restore the tag stack: > let stack = gettagstack(1003) " do something else --- 9746,9755 ---- Returns zero for success, -1 for failure. ! Examples (for more examples see |tagstack-examples|): ! Empty the tag stack of window 3: > call settagstack(3, {'items' : []}) < Save and restore the tag stack: > let stack = gettagstack(1003) " do something else *************** *** 9756,9762 **** Unix) are not resolved. If the first path component in {filename} designates the current directory, this will be valid for the result as well. A trailing path separator is ! not removed either. Example: > simplify("./dir/.././/file/") == "./file/" < Note: The combination "dir/.." is only removed if "dir" is --- 9836,9844 ---- Unix) are not resolved. If the first path component in {filename} designates the current directory, this will be valid for the result as well. A trailing path separator is ! not removed either. On Unix "//path" is unchanged, but ! "///path" is simplified to "/path" (this follows the Posix ! standard). Example: > simplify("./dir/.././/file/") == "./file/" < Note: The combination "dir/.." is only removed if "dir" is *************** *** 9825,9839 **** When {func} is given and it is '1' or 'i' then case is ignored. ! When {func} is given and it is 'l' then the current locale ! is used for ordering. See `language collate` to check or set ! the locale used for ordering. For example, with "en_US.UTF8", ! Ö will be ordered after O and before P, whereas with the ! Swedish locale "sv_SE.UTF8", it will be after Z. ! Case is typically ignored by the locale. When {func} is given and it is 'n' then all items will be ! sorted numerical (Implementation detail: This uses the strtod() function to parse numbers, Strings, Lists, Dicts and Funcrefs will be considered as being 0). --- 9907,9931 ---- When {func} is given and it is '1' or 'i' then case is ignored. ! When {func} is given and it is 'l' then the current collation ! locale is used for ordering. Implementation details: strcoll() ! is used to compare strings. See |:language| check or set the ! collation locale. |v:collate| can also be used to check the ! current locale. Sorting using the locale typically ignores ! case. Example: > ! " ö is sorted similarly to o with English locale. ! :language collate en_US.UTF8 ! :echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l') ! < ['n', 'o', 'O', 'ö', 'p', 'z'] ~ ! > ! " ö is sorted after z with Swedish locale. ! :language collate sv_SE.UTF8 ! :echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l') ! < ['n', 'o', 'O', 'p', 'z', 'ö'] ~ ! This does not work properly on Mac. When {func} is given and it is 'n' then all items will be ! sorted numerical (Implementation detail: this uses the strtod() function to parse numbers, Strings, Lists, Dicts and Funcrefs will be considered as being 0). *************** *** 10084,10096 **** something is busy: m halfway a mapping, :normal command, feedkeys() or stuffed command ! o operator pending or waiting for a command argument, ! e.g. after |f| a Insert mode autocomplete active x executing an autocommand w blocked on waiting, e.g. ch_evalexpr(), ch_read() and ! ch_readraw() when reading json. ! S not triggering SafeState or SafeStateAgain c callback invoked, including timer (repeats for recursiveness up to "ccc") s screen has scrolled for messages --- 10176,10188 ---- something is busy: m halfway a mapping, :normal command, feedkeys() or stuffed command ! o operator pending, e.g. after |d| a Insert mode autocomplete active x executing an autocommand w blocked on waiting, e.g. ch_evalexpr(), ch_read() and ! ch_readraw() when reading json ! S not triggering SafeState or SafeStateAgain, e.g. after ! |f| or a count c callback invoked, including timer (repeats for recursiveness up to "ccc") s screen has scrolled for messages *************** *** 10271,10277 **** List [item, item] Dictionary {key: value, key: value} ! When a List or Dictionary has a recursive reference it is replaced by "[...]" or "{...}". Using eval() on the result will then fail. --- 10363,10369 ---- List [item, item] Dictionary {key: value, key: value} ! When a |List| or |Dictionary| has a recursive reference it is replaced by "[...]" or "{...}". Using eval() on the result will then fail. *************** *** 10488,10494 **** The result is the swap file path of the buffer {expr}. For the use of {expr}, see |bufname()| above. If buffer {expr} is the current buffer, the result is equal to ! |:swapname| (unless no swap file). If buffer {expr} has no swap file, returns an empty string. Can also be used as a |method|: > --- 10580,10586 ---- The result is the swap file path of the buffer {expr}. For the use of {expr}, see |bufname()| above. If buffer {expr} is the current buffer, the result is equal to ! |:swapname| (unless there is no swap file). If buffer {expr} has no swap file, returns an empty string. Can also be used as a |method|: > *************** *** 10569,10575 **** :echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg") synconcealed({lnum}, {col}) *synconcealed()* ! The result is a List with currently three items: 1. The first item in the list is 0 if the character at the position {lnum} and {col} is not part of a concealable region, 1 if it is. --- 10661,10667 ---- :echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg") synconcealed({lnum}, {col}) *synconcealed()* ! The result is a |List| with currently three items: 1. The first item in the list is 0 if the character at the position {lnum} and {col} is not part of a concealable region, 1 if it is. *************** *** 10614,10620 **** system({expr} [, {input}]) *system()* *E677* Get the output of the shell command {expr} as a string. See ! |systemlist()| to get the output as a List. When {input} is given and is a string this string is written to a file and passed as stdin to the command. The string is --- 10706,10712 ---- system({expr} [, {input}]) *system()* *E677* Get the output of the shell command {expr} as a string. See ! |systemlist()| to get the output as a |List|. When {input} is given and is a string this string is written to a file and passed as stdin to the command. The string is *************** *** 10745,10751 **** taglist({expr} [, {filename}]) *taglist()* ! Returns a list of tags matching the regular expression {expr}. If {filename} is passed it is used to prioritize the results in the same way that |:tselect| does. See |tag-priority|. --- 10837,10843 ---- taglist({expr} [, {filename}]) *taglist()* ! Returns a |List| of tags matching the regular expression {expr}. If {filename} is passed it is used to prioritize the results in the same way that |:tselect| does. See |tag-priority|. *************** *** 10837,10848 **** terminalprops() *terminalprops()* ! Returns a dictionary with properties of the terminal that Vim detected from the response to |t_RV| request. See |v:termresponse| for the response itself. If |v:termresponse| is empty most values here will be 'u' for unknown. ! cursor_style wether sending |t_RS| works ** ! cursor_blink_mode wether sending |t_RC| works ** underline_rgb whether |t_8u| works ** mouse mouse type supported --- 10929,10940 ---- terminalprops() *terminalprops()* ! Returns a |Dictionary| with properties of the terminal that Vim detected from the response to |t_RV| request. See |v:termresponse| for the response itself. If |v:termresponse| is empty most values here will be 'u' for unknown. ! cursor_style whether sending |t_RS| works ** ! cursor_blink_mode whether sending |t_RC| works ** underline_rgb whether |t_8u| works ** mouse mouse type supported *************** *** 10851,10859 **** If the |+termresponse| feature is missing then the result is an empty dictionary. ! If "cursor_style" is 'y' then |t_RS| will be send to request the current cursor style. ! If "cursor_blink_mode" is 'y' then |t_RC| will be send to request the cursor blink status. "cursor_style" and "cursor_blink_mode" are also set if |t_u7| is not empty, Vim will detect the working of sending |t_RS| --- 10943,10951 ---- If the |+termresponse| feature is missing then the result is an empty dictionary. ! If "cursor_style" is 'y' then |t_RS| will be sent to request the current cursor style. ! If "cursor_blink_mode" is 'y' then |t_RC| will be sent to request the cursor blink status. "cursor_style" and "cursor_blink_mode" are also set if |t_u7| is not empty, Vim will detect the working of sending |t_RS| *************** *** 10881,10887 **** returned. When {id} is omitted information about all timers is returned. ! For each timer the information is stored in a Dictionary with these items: "id" the timer ID "time" time the timer was started with --- 10973,10979 ---- returned. When {id} is omitted information about all timers is returned. ! For each timer the information is stored in a |Dictionary| with these items: "id" the timer ID "time" time the timer was started with *************** *** 10926,10931 **** --- 11018,11025 ---- function or a |Funcref|. It is called with one argument, which is the timer ID. The callback is only invoked when Vim is waiting for input. + If you want to show a message look at |popup_notification()| + to avoid interfering with what the user is doing. {options} is a dictionary. Supported entries: "repeat" Number of times to repeat calling the *************** *** 11123,11129 **** undo blocks. The first item in the "entries" list is the oldest undo item. ! Each List item is a Dictionary with these items: "seq" Undo sequence number. Same as what appears in |:undolist|. "time" Timestamp when the change happened. Use --- 11217,11223 ---- undo blocks. The first item in the "entries" list is the oldest undo item. ! Each List item is a |Dictionary| with these items: "seq" Undo sequence number. Same as what appears in |:undolist|. "time" Timestamp when the change happened. Use *************** *** 11243,11258 **** call win_execute(winid, 'set syntax=python') < Doing the same with `setwinvar()` would not trigger autocommands and not actually show syntax highlighting. *E994* Not all commands are allowed in popup windows. ! When window {id} does not exist then no error is given. Can also be used as a |method|, the base is passed as the second argument: > GetCommand()->win_execute(winid) win_findbuf({bufnr}) *win_findbuf()* ! Returns a list with |window-ID|s for windows that contain buffer {bufnr}. When there is none the list is empty. Can also be used as a |method|: > --- 11337,11354 ---- call win_execute(winid, 'set syntax=python') < Doing the same with `setwinvar()` would not trigger autocommands and not actually show syntax highlighting. + *E994* Not all commands are allowed in popup windows. ! When window {id} does not exist then no error is given and ! an empty string is returned. Can also be used as a |method|, the base is passed as the second argument: > GetCommand()->win_execute(winid) win_findbuf({bufnr}) *win_findbuf()* ! Returns a |List| with |window-ID|s for windows that contain buffer {bufnr}. When there is none the list is empty. Can also be used as a |method|: > *************** *** 11293,11299 **** win_gotoid({expr}) *win_gotoid()* Go to window with ID {expr}. This may also change the current tabpage. ! Return 1 if successful, 0 if the window cannot be found. Can also be used as a |method|: > GetWinid()->win_gotoid() --- 11389,11395 ---- win_gotoid({expr}) *win_gotoid()* Go to window with ID {expr}. This may also change the current tabpage. ! Return TRUE if successful, FALSE if the window cannot be found. Can also be used as a |method|: > GetWinid()->win_gotoid() *************** *** 11317,11323 **** 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|. Return [0, 0] if the window cannot be found in the current tabpage. --- 11413,11420 ---- 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|. Use zero ! for the current window. Return [0, 0] if the window cannot be found in the current tabpage. *************** *** 11347,11352 **** --- 11444,11450 ---- Can also be used as a |method|: > GetWinid()->win_splitmove(target) < + *winbufnr()* winbufnr({nr}) The result is a Number, which is the number of the buffer associated with window {nr}. {nr} can be the window number or *************** *** 11408,11418 **** " Two horizontally split windows :echo winlayout() ['col', [['leaf', 1000], ['leaf', 1001]]] ! " Three horizontally split windows, with two ! " vertically split windows in the middle window :echo winlayout(2) ! ['col', [['leaf', 1002], ['row', ['leaf', 1003], ! ['leaf', 1001]]], ['leaf', 1000]] < Can also be used as a |method|: > GetTabnr()->winlayout() --- 11506,11517 ---- " Two horizontally split windows :echo winlayout() ['col', [['leaf', 1000], ['leaf', 1001]]] ! " The second tab page, with three horizontally split ! " windows, with two vertically split windows in the ! " middle window :echo winlayout(2) ! ['col', [['leaf', 1002], ['row', [['leaf', 1003], ! ['leaf', 1001]]], ['leaf', 1000]]] < Can also be used as a |method|: > GetTabnr()->winlayout() *************** *** 11427,11432 **** --- 11526,11532 ---- *winnr()* winnr([{arg}]) The result is a Number, which is the number of the current window. The top window has number 1. + Returns zero for a popup window. The optional argument {arg} supports the following values: $ the number of the last window (the window *************** *** 11502,11508 **** curswant column for vertical movement topline first line in the window topfill filler lines, only in diff mode ! leftcol first column displayed skipcol columns skipped Note that no option values are saved. --- 11602,11609 ---- curswant column for vertical movement topline first line in the window topfill filler lines, only in diff mode ! leftcol first column displayed; only used when ! 'wrap' is off skipcol columns skipped Note that no option values are saved. *************** *** 11721,11727 **** mksession Compiled with support for |:mksession|. modify_fname Compiled with file name modifiers. |filename-modifiers| (always true) ! mouse Compiled with support mouse. mouse_dec Compiled with support for Dec terminal mouse. mouse_gpm Compiled with support for gpm (Linux console mouse) mouse_gpm_enabled GPM mouse is working --- 11822,11828 ---- mksession Compiled with support for |:mksession|. modify_fname Compiled with file name modifiers. |filename-modifiers| (always true) ! mouse Compiled with support for mouse. mouse_dec Compiled with support for Dec terminal mouse. mouse_gpm Compiled with support for gpm (Linux console mouse) mouse_gpm_enabled GPM mouse is working *************** *** 11733,11739 **** mouse_xterm Compiled with support for xterm mouse. mouseshape Compiled with support for 'mouseshape'. multi_byte Compiled with support for 'encoding' (always true) ! multi_byte_encoding 'encoding' is set to a multi-byte encoding. multi_byte_ime Compiled with support for IME input method. multi_lang Compiled with support for multiple languages. mzscheme Compiled with MzScheme interface |mzscheme|. --- 11834,11840 ---- mouse_xterm Compiled with support for xterm mouse. mouseshape Compiled with support for 'mouseshape'. multi_byte Compiled with support for 'encoding' (always true) ! multi_byte_encoding 'encoding' is set to a multibyte encoding. multi_byte_ime Compiled with support for IME input method. multi_lang Compiled with support for multiple languages. mzscheme Compiled with MzScheme interface |mzscheme|. *************** *** 11945,11950 **** --- 12046,12053 ---- NOTE: Use ! wisely. If used without care it can cause an existing function to be replaced unexpectedly, which is hard to debug. + NOTE: In Vim9 script script-local functions cannot be + deleted or redefined. For the {arguments} see |function-argument|. *************** *** 12066,12073 **** You can provide default values for positional named arguments. This makes them optional for function calls. When a positional argument is not specified at a call, the default expression is used to initialize it. ! This only works for functions declared with `:function`, not for lambda ! expressions |expr-lambda|. Example: > function Something(key, value = 10) --- 12169,12176 ---- You can provide default values for positional named arguments. This makes them optional for function calls. When a positional argument is not specified at a call, the default expression is used to initialize it. ! This only works for functions declared with `:function` or `:def`, not for ! lambda expressions |expr-lambda|. Example: > function Something(key, value = 10) *************** *** 12080,12086 **** call, not definition. Thus it is possible to use an expression which is invalid the moment the function is defined. The expressions are also only evaluated when arguments are not specified during a call. ! You can pass |v:none| to use the default expression. Note that this means you cannot pass v:none as an ordinary value when an argument has a default expression. --- 12183,12189 ---- call, not definition. Thus it is possible to use an expression which is invalid the moment the function is defined. The expressions are also only evaluated when arguments are not specified during a call. ! *none-function_argument* You can pass |v:none| to use the default expression. Note that this means you cannot pass v:none as an ordinary value when an argument has a default expression. *************** *** 12105,12113 **** :function NoGood(first = a:second, second = 10) :endfunction < ! When not using "...", the number of arguments in a function call must be equal ! to the number of mandatory named arguments. When using "...", the number of ! arguments may be larger. *local-variables* Inside a function local variables can be used. These will disappear when the --- 12208,12217 ---- :function NoGood(first = a:second, second = 10) :endfunction < ! When not using "...", the number of arguments in a function call must be at ! least equal to the number of mandatory named arguments. When using "...", the ! number of arguments may be larger than the total of mandatory and optional ! arguments. *local-variables* Inside a function local variables can be used. These will disappear when the *************** *** 12231,12236 **** --- 12335,12343 ---- :call filename#funcname() + These functions are always global, in Vim9 script "g:" needs to be used: > + :call g:filename#funcname() + When such a function is called, and it is not defined yet, Vim will search the "autoload" directories in 'runtimepath' for a script file called "filename.vim". For example "~/.vim/autoload/filename.vim". That file should *************** *** 12242,12248 **** The file name and the name used before the # in the function must match exactly, and the defined function must have the name exactly as it will be ! called. It is possible to use subdirectories. Every # in the function name works like a path separator. Thus when calling a function: > --- 12349,12359 ---- The file name and the name used before the # in the function must match exactly, and the defined function must have the name exactly as it will be ! called. In Vim9 script the "g:" prefix must be used: > ! function g:filename#funcname() ! ! or for a compiled function: > ! def g:filename#funcname() It is possible to use subdirectories. Every # in the function name works like a path separator. Thus when calling a function: > *************** *** 12266,12273 **** Note that when you make a mistake and call a function that is supposed to be defined in an autoload script, but the script doesn't actually define the ! function, the script will be sourced every time you try to call the function. ! And you will get an error message every time. Also note that if you have two script files, and one calls a function in the other and vice versa, before the used function is defined, it won't work. --- 12377,12385 ---- Note that when you make a mistake and call a function that is supposed to be defined in an autoload script, but the script doesn't actually define the ! function, you will get an error message for the missing function. If you fix ! the autoload script it won't be automatically loaded again. Either restart ! Vim or manually source the script. Also note that if you have two script files, and one calls a function in the other and vice versa, before the used function is defined, it won't work. *************** *** 12325,12330 **** --- 12437,12445 ---- ============================================================================== 7. Commands *expression-commands* + Note: in Vim9 script `:let` is used for variable declaration, not assignment. + An assignment leaves out the `:let` command. |vim9-declaration| + :let {var-name} = {expr1} *:let* *E18* Set internal variable {var-name} to the result of the expression {expr1}. The variable will get the type *************** *** 12464,12470 **** Like above, but append/add/subtract the value for each |List| item. ! :let [{name}, ..., ; {lastname}] = {expr1} Like |:let-unpack| above, but the |List| may have more items than there are names. A list of the remaining items is assigned to {lastname}. If there are no --- 12579,12585 ---- Like above, but append/add/subtract the value for each |List| item. ! :let [{name}, ..., ; {lastname}] = {expr1} *E452* Like |:let-unpack| above, but the |List| may have more items than there are names. A list of the remaining items is assigned to {lastname}. If there are no *************** *** 12549,12560 **** --- 12664,12677 ---- s: script-local variables l: local function variables v: Vim variables. + This does not work in Vim9 script. |vim9-declaration| :let List the values of all variables. The type of the variable is indicated before the value: String # Number * Funcref + This does not work in Vim9 script. |vim9-declaration| :unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795* Remove the internal variable {name}. Several variable *************** *** 12805,12815 **** ":endtry" is reached thereafter, the next (dynamically) surrounding ":try" is checked for a corresponding ":finally" etc. Then the script ! processing is terminated. (Whether a function ! definition has an "abort" argument does not matter.) Example: > ! :try | edit too much | finally | echo "cleanup" | endtry ! :echo "impossible" " not reached, script terminated above < Moreover, an error or interrupt (dynamically) inside ":try" and ":endtry" is converted to an exception. It --- 12922,12932 ---- ":endtry" is reached thereafter, the next (dynamically) surrounding ":try" is checked for a corresponding ":finally" etc. Then the script ! processing is terminated. Whether a function ! definition has an "abort" argument does not matter. Example: > ! try | call Unknown() | finally | echomsg "cleanup" | endtry ! echomsg "not reached" < Moreover, an error or interrupt (dynamically) inside ":try" and ":endtry" is converted to an exception. It *************** *** 12826,12833 **** error exception is not caught, always beginning with the error number. Examples: > ! :try | sleep 100 | catch /^Vim:Interrupt$/ | endtry ! :try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry < *:cat* *:catch* *E603* *E604* *E605* :cat[ch] /{pattern}/ The following commands until the next |:catch|, --- 12943,12950 ---- error exception is not caught, always beginning with the error number. Examples: > ! try | sleep 100 | catch /^Vim:Interrupt$/ | endtry ! try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry < *:cat* *:catch* *E603* *E604* *E605* :cat[ch] /{pattern}/ The following commands until the next |:catch|, *************** *** 12982,12993 **** these are hard to recognize and therefore not to be used. *:exe* *:execute* :exe[cute] {expr1} .. Executes the string that results from the evaluation of {expr1} as an Ex command. Multiple arguments are concatenated, with a space in ! between. To avoid the extra space use the "." operator to concatenate strings into one argument. {expr1} is used as the processed command, command line editing keys are not recognized. --- 13099,13113 ---- these are hard to recognize and therefore not to be used. + The command cannot be followed by "|" and another + command, since "|" is seen as part of the expression. + *:exe* *:execute* :exe[cute] {expr1} .. Executes the string that results from the evaluation of {expr1} as an Ex command. Multiple arguments are concatenated, with a space in ! between. To avoid the extra space use the ".." operator to concatenate strings into one argument. {expr1} is used as the processed command, command line editing keys are not recognized. *** ../vim-8.2.2439/runtime/doc/filetype.txt 2019-12-12 12:49:05.000000000 +0100 --- runtime/doc/filetype.txt 2021-01-21 18:25:40.089115059 +0100 *************** *** 1,4 **** ! *filetype.txt* For Vim version 8.2. Last change: 2019 Jul 16 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *filetype.txt* For Vim version 8.2. Last change: 2021 Jan 21 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 34,41 **** Detail: The ":filetype on" command will load one of these files: Amiga $VIMRUNTIME/filetype.vim Mac $VIMRUNTIME:filetype.vim ! MS-DOS $VIMRUNTIME\filetype.vim ! RiscOS Vim:Filetype Unix $VIMRUNTIME/filetype.vim VMS $VIMRUNTIME/filetype.vim This file is a Vim script that defines autocommands for the --- 34,40 ---- Detail: The ":filetype on" command will load one of these files: Amiga $VIMRUNTIME/filetype.vim Mac $VIMRUNTIME:filetype.vim ! MS-Windows $VIMRUNTIME\filetype.vim Unix $VIMRUNTIME/filetype.vim VMS $VIMRUNTIME/filetype.vim This file is a Vim script that defines autocommands for the *************** *** 148,153 **** --- 147,153 ---- *.w g:filetype_w |ft-cweb-syntax| *.i g:filetype_i |ft-progress-syntax| *.p g:filetype_p |ft-pascal-syntax| + *.pp g:filetype_pp |ft-pascal-syntax| *.sh g:bash_is_sh |ft-sh-syntax| *.tex g:tex_flavor |ft-tex-plugin| *************** *** 164,171 **** A. If you want to overrule all default file type checks. This works by writing one file for each filetype. The disadvantage is that ! means there can be many files. The advantage is that you can simply drop ! this file in the right directory to make it work. *ftdetect* 1. Create your user runtime directory. You would normally use the first item of the 'runtimepath' option. Then create the directory "ftdetect" --- 164,171 ---- A. If you want to overrule all default file type checks. This works by writing one file for each filetype. The disadvantage is that ! there can be many files. The advantage is that you can simply drop this ! file in the right directory to make it work. *ftdetect* 1. Create your user runtime directory. You would normally use the first item of the 'runtimepath' option. Then create the directory "ftdetect" *************** *** 308,320 **** produces this output: ! runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60 ~ then Vim will load all plugins in these directories and below: /etc/vim/plugin/ ~ ~/.vim/plugin/ ~ ! /usr/local/share/vim/vim60/plugin/ ~ Note that the last one is the value of $VIMRUNTIME which has been expanded. --- 308,320 ---- produces this output: ! runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim82 ~ then Vim will load all plugins in these directories and below: /etc/vim/plugin/ ~ ~/.vim/plugin/ ~ ! /usr/local/share/vim/vim82/plugin/ ~ Note that the last one is the value of $VIMRUNTIME which has been expanded. *************** *** 398,403 **** --- 398,410 ---- 3. Docs for the default filetype plugins. *ftplugin-docs* + AWK *ft-awk-plugin* + + Support for features specific to GNU Awk, like @include, can be enabled by + setting: > + let g:awk_is_gawk = 1 + + CHANGELOG *ft-changelog-plugin* Allows for easy entrance of Changelog entries in Changelog files. There are *************** *** 557,572 **** MAN *ft-man-plugin* *:Man* *man.vim* ! Displays a manual page in a nice way. Also see the user manual ! |find-manpage|. ! ! To start using the ":Man" command before any manual page was loaded, source ! this script from your startup vimrc file: > runtime ftplugin/man.vim Options: ! 'iskeyword' the '.' character is added to be able to use CTRL-] on the manual page name. Commands: --- 564,578 ---- MAN *ft-man-plugin* *:Man* *man.vim* ! This plugin displays a manual page in a nice way. See |find-manpage| in the ! user manual for more information. + To start using the |:Man| command before any manual page has been loaded, + source this script from your startup |vimrc| file: > runtime ftplugin/man.vim Options: ! 'iskeyword' The '.' character is added to support the use of CTRL-] on the manual page name. Commands: *************** *** 576,599 **** Global mapping: K Displays the manual page for the word under the cursor. ! ManPreGetPage idem, allows for using a mapping: > ! nmap ManPreGetPage Local mappings: CTRL-] Jump to the manual page for the word under the cursor. CTRL-T Jump back to the previous manual page. ! q Same as ":quit" To use a vertical split instead of horizontal: > let g:ft_man_open_mode = 'vert' To use a new tab: > let g:ft_man_open_mode = 'tab' ! To enable folding use this: > ! let g:ft_man_folding_enable = 1 ! If you do not like the default folding, use an autocommand to add your desired folding style instead. For example: > ! autocmd FileType man setlocal foldmethod=indent foldenable If you would like :Man {number} {name} to behave like man {number} {name} by not running man {name} if no page is found, then use this: > --- 582,606 ---- Global mapping: K Displays the manual page for the word under the cursor. ! ManPreGetPage ! idem, allows for using a mapping: > ! nmap ManPreGetPage Local mappings: CTRL-] Jump to the manual page for the word under the cursor. CTRL-T Jump back to the previous manual page. ! q Same as the |:quit| command. To use a vertical split instead of horizontal: > let g:ft_man_open_mode = 'vert' To use a new tab: > let g:ft_man_open_mode = 'tab' ! To enable |folding|, use this: > ! let g:ft_man_folding_enable = 1 ! If you do not like the default folding, use an |autocommand| to add your desired folding style instead. For example: > ! autocmd FileType man setlocal foldmethod=indent foldenable If you would like :Man {number} {name} to behave like man {number} {name} by not running man {name} if no page is found, then use this: > *************** *** 606,612 **** MANPAGER *manpager.vim* ! The :Man command allows you to turn Vim into a manpager (that syntax highlights manpages and follows linked manpages on hitting CTRL-]). For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...) --- 613,619 ---- MANPAGER *manpager.vim* ! The |:Man| command allows you to turn Vim into a manpager (that syntax highlights manpages and follows linked manpages on hitting CTRL-]). For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...) *** ../vim-8.2.2439/runtime/doc/ft_sql.txt 2019-12-12 12:49:05.000000000 +0100 --- runtime/doc/ft_sql.txt 2020-07-17 17:54:46.899972012 +0200 *************** *** 312,318 **** $VIM/vimfiles/indent/sqlite.vim No changes are necessary to the SQLSetType function. It will automatically ! pickup the new SQL files and load them when you issue the SQLSetType command. ============================================================================== --- 312,318 ---- $VIM/vimfiles/indent/sqlite.vim No changes are necessary to the SQLSetType function. It will automatically ! pick up the new SQL files and load them when you issue the SQLSetType command. ============================================================================== *************** *** 519,525 **** 4.3.2 Column Completion: *sql-completion-columns* The SQL completion plugin can also display a list of columns for particular ! tables. The column completion is trigger via c. NOTE: The following example uses to trigger a column list while the popup window is active. --- 519,525 ---- 4.3.2 Column Completion: *sql-completion-columns* The SQL completion plugin can also display a list of columns for particular ! tables. The column completion is triggered via c. NOTE: The following example uses to trigger a column list while the popup window is active. *************** *** 727,733 **** your |vimrc|: > let g:omni_sql_no_default_maps = 1 ! Do no edit ftplugin/sql.vim directly! If you change this file your changes will be over written on future updates. Vim has a special directory structure which allows you to make customizations without changing the files that are included with the Vim distribution. If you wish to customize the maps --- 727,733 ---- your |vimrc|: > let g:omni_sql_no_default_maps = 1 ! Do not edit ftplugin/sql.vim directly! If you change this file your changes will be over written on future updates. Vim has a special directory structure which allows you to make customizations without changing the files that are included with the Vim distribution. If you wish to customize the maps *** ../vim-8.2.2439/runtime/doc/gui.txt 2020-03-15 16:12:16.548208667 +0100 --- runtime/doc/gui.txt 2020-09-28 21:46:49.202698038 +0200 *************** *** 1,4 **** ! *gui.txt* For Vim version 8.2. Last change: 2019 Nov 16 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *gui.txt* For Vim version 8.2. Last change: 2020 Sep 28 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 547,561 **** 5.2 Creating New Menus *creating-menus* *:me* *:menu* *:noreme* *:noremenu* - *:am* *:amenu* *:an* *:anoremenu* - *:nme* *:nmenu* *:nnoreme* *:nnoremenu* - *:ome* *:omenu* *:onoreme* *:onoremenu* - *:vme* *:vmenu* *:vnoreme* *:vnoremenu* - *:xme* *:xmenu* *:xnoreme* *:xnoremenu* - *:sme* *:smenu* *:snoreme* *:snoremenu* - *:ime* *:imenu* *:inoreme* *:inoremenu* - *:cme* *:cmenu* *:cnoreme* *:cnoremenu* - *:tlm* *:tlmenu* *:tln* *:tlnoremenu* *E330* *E327* *E331* *E336* *E333* *E328* *E329* *E337* *E792* To create a new menu item, use the ":menu" commands. They are mostly like --- 547,552 ---- *************** *** 596,601 **** --- 587,593 ---- this menu can be used. The second part is shown as "Open :e". The ":e" is right aligned, and the "O" is underlined, to indicate it is the shortcut. + *:am* *:amenu* *:an* *:anoremenu* The ":amenu" command can be used to define menu entries for all modes at once, except for Terminal mode. To make the command work correctly, a character is automatically inserted for some modes: *************** *** 634,639 **** --- 626,655 ---- Note that in Cmdline mode executes the command, like in a mapping. This is Vi compatible. Use CTRL-C to quit Cmdline mode. + *:nme* *:nmenu* *:nnoreme* *:nnoremenu* *:nunme* *:nunmenu* + Menu commands starting with "n" work in Normal mode. |mapmode-n| + + *:ome* *:omenu* *:onoreme* *:onoremenu* *:ounme* *:ounmenu* + Menu commands starting with "o" work in Operator-pending mode. |mapmode-o| + + *:vme* *:vmenu* *:vnoreme* *:vnoremenu* *:vunme* *:vunmenu* + Menu commands starting with "v" work in Visual mode. |mapmode-v| + + *:xme* *:xmenu* *:xnoreme* *:xnoremenu* *:xunme* *:xunmenu* + Menu commands starting with "x" work in Visual and Select mode. |mapmode-x| + + *:sme* *:smenu* *:snoreme* *:snoremenu* *:sunme* *:sunmenu* + Menu commands starting with "s" work in Select mode. |mapmode-s| + + *:ime* *:imenu* *:inoreme* *:inoremenu* *:iunme* *:iunmenu* + Menu commands starting with "i" work in Insert mode. |mapmode-i| + + *:cme* *:cmenu* *:cnoreme* *:cnoremenu* *:cunme* *:cunmenu* + Menu commands starting with "c" work in Cmdline mode. |mapmode-c| + + *:tlm* *:tlmenu* *:tln* *:tlnoremenu* *:tlu* *:tlunmenu* + Menu commands starting with "tl" work in Terminal mode. |mapmode-t| + *:menu-* *:menu-silent* To define a menu which will not be echoed on the command line, add "" as the first argument. Example: > *************** *** 855,860 **** --- 871,878 ---- * The menu was defined with "nore" to disallow remapping. & The menu was defined with "