To: vim_dev@googlegroups.com Subject: Patch 8.2.5000 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.5000 Problem: No patch for documentation updates. Solution: Update documentation files. Files: runtime/doc/arabic.txt, runtime/doc/autocmd.txt, runtime/doc/builtin.txt, runtime/doc/change.txt, runtime/doc/channel.txt, runtime/doc/cmdline.txt, runtime/doc/diff.txt, runtime/doc/digraph.txt, runtime/doc/editing.txt, runtime/doc/eval.txt, runtime/doc/filetype.txt, runtime/doc/fold.txt, runtime/doc/ft_ada.txt, runtime/doc/ft_ps1.txt, runtime/doc/ft_raku.txt, runtime/doc/ft_rust.txt, runtime/doc/ft_sql.txt, runtime/doc/gui.txt, runtime/doc/gui_w32.txt, runtime/doc/helphelp.txt, runtime/doc/help.txt, runtime/doc/if_cscop.txt, runtime/doc/if_lua.txt, runtime/doc/if_perl.txt, runtime/doc/if_pyth.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/motion.txt, runtime/doc/netbeans.txt, runtime/doc/options.txt, runtime/doc/os_dos.txt, runtime/doc/os_vms.txt, runtime/doc/os_win32.txt, runtime/doc/pattern.txt, runtime/doc/pi_netrw.txt, runtime/doc/pi_zip.txt, runtime/doc/popup.txt, runtime/doc/print.txt, runtime/doc/quickfix.txt, runtime/doc/quickref.txt, runtime/doc/remote.txt, runtime/doc/repeat.txt, runtime/doc/rileft.txt, runtime/doc/scroll.txt, runtime/doc/sign.txt, runtime/doc/spell.txt, runtime/doc/sponsor.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_04.txt, runtime/doc/usr_05.txt, runtime/doc/usr_06.txt, runtime/doc/usr_08.txt, runtime/doc/usr_09.txt, runtime/doc/usr_12.txt, runtime/doc/usr_20.txt, runtime/doc/usr_29.txt, runtime/doc/usr_40.txt, runtime/doc/usr_41.txt, runtime/doc/usr_45.txt, runtime/doc/usr_46.txt, runtime/doc/usr_50.txt, runtime/doc/usr_51.txt, runtime/doc/usr_52.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/version9.txt, runtime/doc/vi_diff.txt, runtime/doc/vim9.txt, runtime/doc/visual.txt, runtime/doc/windows.txt, runtime/doc/tags, runtime/doc/Makefile *** ../vim-8.2.4999/runtime/doc/arabic.txt 2021-01-31 16:02:06.246490203 +0000 --- runtime/doc/arabic.txt 2021-06-22 19:23:15.021360813 +0100 *************** *** 1,4 **** ! *arabic.txt* For Vim version 8.2. Last change: 2019 May 05 VIM REFERENCE MANUAL by Nadim Shaikli --- 1,4 ---- ! *arabic.txt* For Vim version 8.2. Last change: 2021 Jun 22 VIM REFERENCE MANUAL by Nadim Shaikli *************** *** 176,181 **** --- 176,188 ---- and its support is preferred due to its level of offerings. 'arabic' when 'termbidi' is enabled only sets the keymap. + For vertical window isolation while setting 'termbidi' an LTR + vertical separator like "l" or "𝖨" may be used. It may also be + hidden by changing its color to the foreground color: > + :set fillchars=vert:l + :hi VertSplit ctermbg=White + < Note that this is a workaround, not a proper solution. + If, on the other hand, you'd like to be verbose and explicit and are opting not to use the 'arabic' short-cut command, here's what is needed (i.e. if you use ':set arabic' you can skip this section) - *** ../vim-8.2.4999/runtime/doc/autocmd.txt 2022-05-19 10:31:06.961630513 +0100 --- runtime/doc/autocmd.txt 2022-05-19 10:22:46.206265964 +0100 *************** *** 1,4 **** ! *autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *autocmd.txt* For Vim version 8.2. Last change: 2022 Apr 17 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 51,60 **** 2. Defining autocommands *autocmd-define* *:au* *:autocmd* ! :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. --- 51,60 ---- 2. Defining autocommands *autocmd-define* *:au* *:autocmd* ! :au[tocmd] [group] {event} {aupat} [++once] [++nested] {cmd} Add {cmd} to the list of commands that Vim will execute automatically on {event} for a file matching ! {aupat} |autocmd-patterns|. Here {event} cannot be "*". *E1155* Note: A quote character is seen as argument to the :autocmd and won't start a comment. *************** *** 63,69 **** they were given. See |autocmd-nested| for [++nested]. "nested" (without the ++) can also be used, for backwards ! compatibility. *autocmd-once* If [++once] is supplied the command is executed once, then removed ("one shot"). --- 63,69 ---- they were given. See |autocmd-nested| for [++nested]. "nested" (without the ++) can also be used, for backwards ! compatibility, but not in |Vim9| script. *E1078* *autocmd-once* If [++once] is supplied the command is executed once, then removed ("one shot"). *************** *** 98,103 **** --- 98,104 ---- :augroup mine | exe "au! BufRead *" | augroup END :augroup mine | exe "au BufRead * set tw=70" | augroup END + < *autocmd-expand* Note that special characters (e.g., "%", "") in the ":autocmd" arguments are not expanded when the autocommand is defined. These will be expanded when the Event is recognized, and the {cmd} is executed. The only *************** *** 183,194 **** ============================================================================== 4. Listing autocommands *autocmd-list* ! :au[tocmd] [group] {event} {pat} Show the autocommands associated with {event} and ! {pat}. ! :au[tocmd] [group] * {pat} ! Show the autocommands associated with {pat} for all events. :au[tocmd] [group] {event} --- 184,195 ---- ============================================================================== 4. Listing autocommands *autocmd-list* ! :au[tocmd] [group] {event} {aupat} Show the autocommands associated with {event} and ! {aupat}. ! :au[tocmd] [group] * {aupat} ! Show the autocommands associated with {aupat} for all events. :au[tocmd] [group] {event} *************** *** 374,379 **** --- 375,381 ---- |InsertEnter| starting Insert mode |InsertChange| when typing while in Insert or Replace mode |InsertLeave| when leaving Insert mode + |InsertLeavePre| just before leaving Insert mode |InsertCharPre| when a character was typed in Insert mode, before inserting it *************** *** 481,493 **** executing the modelines. See |BufWinEnter| for when you need to do something after processing the modelines. ! This does NOT work for ":r file". Not used ! when the file doesn't exist. Also used after ! successfully recovering a file. ! Also triggered for the filetypedetect group ! when executing ":filetype detect" and when ! writing an unnamed buffer in a way that the ! buffer gets a name. *BufReadCmd* BufReadCmd Before starting to edit a new buffer. Should read the file into the buffer. |Cmd-event| --- 483,497 ---- executing the modelines. See |BufWinEnter| for when you need to do something after processing the modelines. ! Also triggered: ! - when writing an unnamed buffer in a way that ! the buffer gets a name ! - after successfully recovering a file ! - for the filetypedetect group when executing ! ":filetype detect" ! Not triggered: ! - for the `:read file` command ! - when the file doesn't exist *BufReadCmd* BufReadCmd Before starting to edit a new buffer. Should read the file into the buffer. |Cmd-event| *************** *** 715,727 **** CursorMovedI After the cursor was moved in Insert mode. Not triggered when the popup menu is visible. Otherwise the same as CursorMoved. *EncodingChanged* EncodingChanged Fires off after the 'encoding' option has been changed. Useful to set up fonts, for example. *FileAppendCmd* FileAppendCmd Before appending to a file. Should do the appending to the file. Use the '[ and '] ! marks for the range of lines.|Cmd-event| *FileAppendPost* FileAppendPost After appending to a file. *FileAppendPre* --- 719,760 ---- CursorMovedI After the cursor was moved in Insert mode. Not triggered when the popup menu is visible. Otherwise the same as CursorMoved. + *DiffUpdated* + DiffUpdated After diffs have been updated. Depending on + what kind of diff is being used (internal or + external) this can be triggered on every + change or when doing |:diffupdate|. + *DirChangedPre* + DirChangedPre The working directory is going to be changed, + as with |DirChanged|. The pattern is like + with |DirChanged|. The new directory can be + found in v:event.directory. + *DirChanged* + DirChanged The working directory has changed in response + to the |:cd| or |:tcd| or |:lcd| commands, or + as a result of the 'autochdir' option. + The pattern can be: + "window" to trigger on `:lcd` + "tabpage" to trigger on `:tcd` + "global" to trigger on `:cd` + "auto" to trigger on 'autochdir'. + "drop" to trigger on editing a file + is set to the new directory name. *EncodingChanged* EncodingChanged Fires off after the 'encoding' option has been changed. Useful to set up fonts, for example. + *ExitPre* + ExitPre When using `:quit`, `:wq` in a way it makes + Vim exit, or using `:qall`, just after + |QuitPre|. Can be used to close any + non-essential window. Exiting may still be + cancelled if there is a modified buffer that + isn't automatically saved, use |VimLeavePre| + for really exiting. *FileAppendCmd* FileAppendCmd Before appending to a file. Should do the appending to the file. Use the '[ and '] ! marks for the range of lines. |Cmd-event| *FileAppendPost* FileAppendPost After appending to a file. *FileAppendPre* *************** *** 745,779 **** *E881* If the number of lines changes saving for undo may fail and the change will be aborted. - *DiffUpdated* - DiffUpdated After diffs have been updated. Depending on - what kind of diff is being used (internal or - external) this can be triggered on every - change or when doing |:diffupdate|. - *DirChangedPre* - DirChangedPre The working directory is going to be changed, - as with ||DirChanged|. The pattern is like - with |DirChanged|. The new directory can be - found in v:event.directory. - *DirChanged* - DirChanged The working directory has changed in response - to the |:cd| or |:tcd| or |:lcd| commands, or - as a result of the 'autochdir' option. - The pattern can be: - "window" to trigger on `:lcd` - "tabpage" to trigger on `:tcd` - "global" to trigger on `:cd` - "auto" to trigger on 'autochdir'. - "drop" to trigger on editing a file - is set to the new directory name. - *ExitPre* - ExitPre When using `:quit`, `:wq` in a way it makes - Vim exit, or using `:qall`, just after - |QuitPre|. Can be used to close any - non-essential window. Exiting may still be - cancelled if there is a modified buffer that - isn't automatically saved, use |VimLeavePre| - for really exiting. *FileChangedShell* FileChangedShell When Vim notices that the modification time of a file has changed since editing started. --- 778,783 ---- *************** *** 854,860 **** *FilterWritePost* FilterWritePost After writing a file for a filter command or making a diff with an external diff (see ! DiffUpdated for internal diff). Vim checks the pattern against the name of the current buffer as with FilterWritePre. Not triggered when 'shelltemp' is off. --- 858,864 ---- *FilterWritePost* FilterWritePost After writing a file for a filter command or making a diff with an external diff (see ! |DiffUpdated| for internal diff). Vim checks the pattern against the name of the current buffer as with FilterWritePre. Not triggered when 'shelltemp' is off. *************** *** 1034,1042 **** *QuitPre* QuitPre When using `:quit`, `:wq` or `:qall`, before deciding whether it closes the current window ! or quits Vim. Can be used to close any ! non-essential window if the current window is ! the last ordinary window. Also see |ExitPre|. *RemoteReply* RemoteReply When a reply from a Vim that functions as --- 1038,1047 ---- *QuitPre* QuitPre When using `:quit`, `:wq` or `:qall`, before deciding whether it closes the current window ! or quits Vim. For `:wq` the buffer is written ! before QuitPre is triggered. Can be used to ! close any non-essential window if the current ! window is the last ordinary window. Also see |ExitPre|. *RemoteReply* RemoteReply When a reply from a Vim that functions as *************** *** 1230,1236 **** Not triggered when |quote_| is used nor when called recursively. It is not allowed to change the buffer text, ! see |textlock|. {only when compiled with the +eval feature} *User* --- 1235,1241 ---- Not triggered when |quote_| is used nor when called recursively. It is not allowed to change the buffer text, ! see |textlock|. *E1064* {only when compiled with the +eval feature} *User* *************** *** 1240,1246 **** Note that when `:doautocmd User MyEvent` is used while there are no matching autocommands, you will get an error. If you don't want ! that, define a dummy autocommand yourself. *SigUSR1* SigUSR1 After the SIGUSR1 signal has been detected. --- 1245,1257 ---- Note that when `:doautocmd User MyEvent` is used while there are no matching autocommands, you will get an error. If you don't want ! that, either check whether an autocommand is ! defined using `exists('#User#MyEvent')` or ! define a dummy autocommand yourself. ! Example: > ! if exists('#User#MyEvent') ! doautocmd User MyEvent ! endif *SigUSR1* SigUSR1 After the SIGUSR1 signal has been detected. *************** *** 1546,1551 **** --- 1557,1569 ---- This prevents having the autocommands defined twice (e.g., after sourcing the .vimrc file again). + *FileExplorer* + There is one group that is recognized by Vim: FileExplorer. If this group + exists Vim assumes that editing a directory is possible and will trigger a + plugin that lists the files in that directory. This is used by the |netrw| + plugin. This allows you to do: > + browse edit + ============================================================================== 9. Executing autocommands *autocmd-execute* *************** *** 1590,1598 **** *:doautoa* *:doautoall* :doautoa[ll] [] [group] {event} [fname] Like ":doautocmd", but apply the autocommands to each ! loaded buffer. Note that [fname] is used to select ! the autocommands, not the buffers to which they are ! applied. Careful: Don't use this for autocommands that delete a buffer, change to another buffer or change the contents of a buffer; the result is unpredictable. --- 1608,1625 ---- *:doautoa* *:doautoall* :doautoa[ll] [] [group] {event} [fname] Like ":doautocmd", but apply the autocommands to each ! loaded buffer. The current buffer is done last. ! ! Note that [fname] is used to select the autocommands, ! not the buffers to which they are applied. Example: > ! augroup mine ! autocmd! ! autocmd FileType * echo expand('') ! augroup END ! doautoall mine FileType Loaded-Buffer ! < Sourcing this script, you'll see as many ! "Loaded-Buffer" echoed as there are loaded buffers. ! Careful: Don't use this for autocommands that delete a buffer, change to another buffer or change the contents of a buffer; the result is unpredictable. *************** *** 1649,1655 **** : autocmd BufReadPre,FileReadPre *.gz set bin : autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip : autocmd BufReadPost,FileReadPost *.gz set nobin ! : autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r") : autocmd BufWritePost,FileWritePost *.gz !mv :r : autocmd BufWritePost,FileWritePost *.gz !gzip :r --- 1676,1682 ---- : autocmd BufReadPre,FileReadPre *.gz set bin : autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip : autocmd BufReadPost,FileReadPost *.gz set nobin ! : autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " .. expand("%:r") : autocmd BufWritePost,FileWritePost *.gz !mv :r : autocmd BufWritePost,FileWritePost *.gz !gzip :r *************** *** 1748,1754 **** : else : let l = line("$") : endif ! : exe "1," . l . "g/Last modified: /s/Last modified: .*/Last modified: " . : \ strftime("%Y %b %d") :endfun --- 1775,1781 ---- : else : let l = line("$") : endif ! : exe "1," .. l .. "g/Last modified: /s/Last modified: .*/Last modified: " .. : \ strftime("%Y %b %d") :endfun *** ../vim-8.2.4999/runtime/doc/builtin.txt 2022-05-21 20:16:50.999567206 +0100 --- runtime/doc/builtin.txt 2022-05-21 19:52:39.628899314 +0100 *************** *** 1,4 **** ! *builtin.txt* For Vim version 8.2. Last change: 2021 Dec 27 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *builtin.txt* For Vim version 8.2. Last change: 2022 May 21 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 864,870 **** :let i = 0 :while i < argc() : let f = escape(fnameescape(argv(i)), '.') ! : exe 'amenu Arg.' . f . ' :e ' . f . '' : let i = i + 1 :endwhile < Without the {nr} argument, or when {nr} is -1, a |List| with --- 864,870 ---- :let i = 0 :while i < argc() : let f = escape(fnameescape(argv(i)), '.') ! : exe 'amenu Arg.' .. f .. ' :e ' .. f .. '' : let i = i + 1 :endwhile < Without the {nr} argument, or when {nr} is -1, a |List| with *************** *** 1283,1289 **** see |bufname()| above. If buffer {buf} doesn't exist or there is no such window, -1 is returned. Example: > ! echo "A window containing buffer 1 is " . (bufwinid(1)) < Only deals with the current tab page. --- 1283,1289 ---- see |bufname()| above. If buffer {buf} doesn't exist or there is no such window, -1 is returned. Example: > ! echo "A window containing buffer 1 is " .. (bufwinid(1)) < Only deals with the current tab page. *************** *** 1296,1302 **** If buffer {buf} doesn't exist or there is no such window, -1 is returned. Example: > ! echo "A window containing buffer 1 is " . (bufwinnr(1)) < The number can be used with |CTRL-W_w| and ":wincmd w" |:wincmd|. --- 1296,1302 ---- If buffer {buf} doesn't exist or there is no such window, -1 is returned. Example: > ! echo "A window containing buffer 1 is " .. (bufwinnr(1)) < The number can be used with |CTRL-W_w| and ":wincmd w" |:wincmd|. *************** *** 1346,1352 **** byteidxcomp({expr}, {nr}) *byteidxcomp()* Like byteidx(), except that a composing character is counted as a separate character. Example: > ! let s = 'e' . nr2char(0x301) echo byteidx(s, 1) echo byteidxcomp(s, 1) echo byteidxcomp(s, 2) --- 1346,1352 ---- byteidxcomp({expr}, {nr}) *byteidxcomp()* Like byteidx(), except that a composing character is counted as a separate character. Example: > ! let s = 'e' .. nr2char(0x301) echo byteidx(s, 1) echo byteidxcomp(s, 1) echo byteidxcomp(s, 2) *************** *** 1401,1407 **** one less than the number of the undone change. char2nr({string} [, {utf8}]) *char2nr()* ! Return number value of the first char in {string}. Examples: > char2nr(" ") returns 32 char2nr("ABC") returns 65 --- 1401,1407 ---- one less than the number of the undone change. char2nr({string} [, {utf8}]) *char2nr()* ! Return Number value of the first char in {string}. Examples: > char2nr(" ") returns 32 char2nr("ABC") returns 65 *************** *** 1540,1546 **** col(".") column of cursor col("$") length of cursor line plus one col("'t") column of mark t ! col("'" . markname) column of mark markname < The first column is 1. 0 is returned for an error. For an uppercase mark the column may actually be in another buffer. --- 1540,1546 ---- col(".") column of cursor col("$") length of cursor line plus one col("'t") column of mark t ! col("'" .. markname) column of mark markname < The first column is 1. 0 is returned for an error. For an uppercase mark the column may actually be in another buffer. *************** *** 1549,1555 **** line. This can be used to obtain the column in Insert mode: > :imap :let save_ve = &ve \:set ve=all ! \:echo col(".") . "\n" \let &ve = save_ve < Can also be used as a |method|: > --- 1549,1555 ---- line. This can be used to obtain the column in Insert mode: > :imap :let save_ve = &ve \:set ve=all ! \:echo col(".") .. "\n" \let &ve = save_ve < Can also be used as a |method|: > *************** *** 1710,1723 **** or another valid interrupt key, confirm() returns 0. An example: > ! :let choice = confirm("What do you want?", "&Apples\n&Oranges\n&Bananas", 2) ! :if choice == 0 ! : echo "make up your mind!" ! :elseif choice == 3 ! : echo "tasteful" ! :else ! : echo "I prefer bananas myself." ! :endif < In a GUI dialog, buttons are used. The layout of the buttons depends on the 'v' flag in 'guioptions'. If it is included, the buttons are always put vertically. Otherwise, confirm() --- 1710,1724 ---- or another valid interrupt key, confirm() returns 0. An example: > ! let choice = confirm("What do you want?", ! \ "&Apples\n&Oranges\n&Bananas", 2) ! if choice == 0 ! echo "make up your mind!" ! elseif choice == 3 ! echo "tasteful" ! else ! echo "I prefer bananas myself." ! endif < In a GUI dialog, buttons are used. The layout of the buttons depends on the 'v' flag in 'guioptions'. If it is included, the buttons are always put vertically. Otherwise, confirm() *************** *** 1900,1906 **** delete({fname} [, {flags}]) *delete()* Without {flags} or with {flags} empty: Deletes the file by the ! name {fname}. This also works when {fname} is a symbolic link. When {flags} is "d": Deletes the directory by the name {fname}. This fails when directory {fname} is not empty. --- 1901,1910 ---- delete({fname} [, {flags}]) *delete()* Without {flags} or with {flags} empty: Deletes the file by the ! name {fname}. ! ! This also works when {fname} is a symbolic link. The symbolic ! link itself is deleted, not what it points to. When {flags} is "d": Deletes the directory by the name {fname}. This fails when directory {fname} is not empty. *************** *** 1910,1917 **** Note: on MS-Windows it is not possible to delete a directory that is being used. - 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. --- 1914,1919 ---- *************** *** 2033,2044 **** display an error message. ! digraph_set({chars}, {digraph}) *digraph_set()* *E1205* Add digraph {chars} to the list. {chars} must be a string with two characters. {digraph} is a string with one UTF-8 ! encoded character. Be careful, composing characters are NOT ! ignored. This function is similar to |:digraphs| command, but ! useful to add digraphs start with a white space. The function result is v:true if |digraph| is registered. If this fails an error message is given and v:false is returned. --- 2035,2047 ---- display an error message. ! digraph_set({chars}, {digraph}) *digraph_set()* Add digraph {chars} to the list. {chars} must be a string with two characters. {digraph} is a string with one UTF-8 ! encoded character. *E1215* ! Be careful, composing characters are NOT ignored. This ! function is similar to |:digraphs| command, but useful to add ! digraphs start with a white space. The function result is v:true if |digraph| is registered. If this fails an error message is given and v:false is returned. *************** *** 2061,2067 **** Similar to |digraph_set()| but this function can add multiple digraphs at once. {digraphlist} is a list composed of lists, where each list contains two strings with {chars} and ! {digraph} as in |digraph_set()|. Example: > call digraph_setlist([['aa', 'あ'], ['ii', 'い']]) < --- 2064,2070 ---- Similar to |digraph_set()| but this function can add multiple digraphs at once. {digraphlist} is a list composed of lists, where each list contains two strings with {chars} and ! {digraph} as in |digraph_set()|. *E1216* Example: > call digraph_setlist([['aa', 'あ'], ['ii', 'い']]) < *************** *** 2192,2198 **** It is not possible to use `:redir` anywhere in {command}. To get a list of lines use |split()| on the result: > ! split(execute('args'), "\n") < To execute a command in another window than the current one use `win_execute()`. --- 2195,2201 ---- It is not possible to use `:redir` anywhere in {command}. To get a list of lines use |split()| on the result: > ! execute('args')->split("\n") < To execute a command in another window than the current one use `win_execute()`. *************** *** 2227,2232 **** --- 2230,2254 ---- For checking if a file exists use |filereadable()|. The {expr} argument is a string, which contains one of these: + varname internal variable (see + dict.key |internal-variables|). Also works + list[i] for |curly-braces-names|, |Dictionary| + import.Func entries, |List| items, imported + items, etc. + Does not work for local variables in a + compiled `:def` function. + Also works for a function in |Vim9| + script, since it can be used as a + function reference. + Beware that evaluating an index may + cause an error message for an invalid + expression. E.g.: > + :let l = [1, 2, 3] + :echo exists("l[5]") + < 0 > + :echo exists("l[xx]") + < E121: Undefined variable: xx + 0 &option-name Vim option (only checks if it exists, not if it really works) +option-name Vim option that works. *************** *** 2241,2261 **** ?funcname built-in function that could be implemented; to be used to check if "funcname" is valid - varname internal variable (see - |internal-variables|). Also works - for |curly-braces-names|, |Dictionary| - entries, |List| items, etc. - Does not work for local variables in a - compiled `:def` function. - Beware that evaluating an index may - cause an error message for an invalid - expression. E.g.: > - :let l = [1, 2, 3] - :echo exists("l[5]") - < 0 > - :echo exists("l[xx]") - < E121: Undefined variable: xx - 0 :cmdname Ex command: built-in command, user command or command modifier |:command|. Returns: --- 2263,2268 ---- *************** *** 2285,2291 **** exists("&shortname") exists("$HOSTNAME") exists("*strftime") ! exists("*s:MyFunc") exists("bufcount") exists(":Make") exists("#CursorHold") --- 2292,2299 ---- exists("&shortname") exists("$HOSTNAME") exists("*strftime") ! exists("*s:MyFunc") " only for legacy script ! exists("*MyFunc") exists("bufcount") exists(":Make") exists("#CursorHold") *************** *** 2297,2304 **** < There must be no space between the symbol (&/$/*/#) and the name. There must be no extra characters after the name, although in ! a few cases this is ignored. That may become more strict in ! the future, thus don't count on it! Working example: > exists(":make") < NOT working example: > --- 2305,2312 ---- < There must be no space between the symbol (&/$/*/#) and the name. There must be no extra characters after the name, although in ! a few cases this is ignored. That may become stricter in the ! future, thus don't count on it! Working example: > exists(":make") < NOT working example: > *************** *** 2378,2383 **** --- 2386,2393 ---- a function "123_" where "123" is the current script ID || +