diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-24 13:18:38 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-24 13:18:38 +0000 |
commit | fa3b72348d88343390fbe212cfc230fec1602fc2 (patch) | |
tree | c0f27c44f2819613a4288bfc6ebc5c58f421d90d /runtime/doc | |
parent | d3f00f54bf955bd01767db3a0af25866bc112ec7 (diff) | |
download | vim-git-fa3b72348d88343390fbe212cfc230fec1602fc2.tar.gz |
Update runtime files
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/eval.txt | 11 | ||||
-rw-r--r-- | runtime/doc/map.txt | 58 | ||||
-rw-r--r-- | runtime/doc/options.txt | 6 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 3 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 2 | ||||
-rw-r--r-- | runtime/doc/tags | 3 | ||||
-rw-r--r-- | runtime/doc/term.txt | 2 | ||||
-rw-r--r-- | runtime/doc/terminal.txt | 4 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 22 | ||||
-rw-r--r-- | runtime/doc/various.txt | 19 | ||||
-rw-r--r-- | runtime/doc/vim9.txt | 8 |
11 files changed, 87 insertions, 51 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index db8e1002d..fa8ce9fef 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2021 Dec 15 +*eval.txt* For Vim version 8.2. Last change: 2021 Dec 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2367,7 +2367,9 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV| The response from a new xterm is: "<Esc>[> Pp ; Pv ; Pc c". Pp is the terminal type: 0 for vt100 and 1 for vt220. Pv is the patch level (since this was introduced in patch 95, it's - always 95 or bigger). Pc is always zero. + always 95 or higher). Pc is always zero. + If Pv is 141 or higher then Vim will try to request terminal + codes. This only works with xterm |xterm-codes|. {only when compiled with |+termresponse| feature} *v:termblinkresp* @@ -6190,8 +6192,9 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()* The result is a String, which is the contents of register {regname}. Example: > :let cliptext = getreg('*') -< When {regname} was not set the result is an empty string. - The {regname} argument is a string. +< When register {regname} was not set the result is an empty + string. + The {regname} argument must be a string. getreg('=') returns the last evaluated value of the expression register. (For use in maps.) diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index fc3f42584..b8806d2ca 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 8.2. Last change: 2021 Dec 15 +*map.txt* For Vim version 8.2. Last change: 2021 Dec 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -962,8 +962,7 @@ g@{motion} Call the function set by the 'operatorfunc' option. "line" {motion} was |linewise| "char" {motion} was |characterwise| "block" {motion} was |blockwise-visual| - Although "block" would rarely appear, since it can - only result from Visual mode where "g@" is not useful. + The type can be forced, see |forced-motion|. {not available when compiled without the |+eval| feature} @@ -974,35 +973,56 @@ Here is an example that counts the number of spaces with <F4>: > " doubling <F4> works on a line nnoremap <expr> <F4><F4> CountSpaces() .. '_' - function CountSpaces(virtualedit = '', irregular_block = v:false, type = '') abort + function CountSpaces(context = {}, type = '') abort if a:type == '' - let &operatorfunc = function('CountSpaces', [&virtualedit, v:false]) + let context = #{ + \ dot_command: v:false, + \ extend_block: '', + \ virtualedit: [&l:virtualedit, &g:virtualedit], + \ } + let &operatorfunc = function('CountSpaces', [context]) set virtualedit=block return 'g@' endif - let cb_save = &clipboard - let sel_save = &selection - let reg_save = getreginfo('"') - let visual_marks_save = [getpos("'<"), getpos("'>")] + let save = #{ + \ clipboard: &clipboard, + \ selection: &selection, + \ virtualedit: [&l:virtualedit, &g:virtualedit], + \ register: getreginfo('"'), + \ visual_marks: [getpos("'<"), getpos("'>")], + \ } try set clipboard= selection=inclusive virtualedit= - let commands = #{line: "'[V']", char: "`[v`]", block: "`[\<C-V>`]"}->get(a:type, 'v') - if getpos("']")[-1] != 0 || a:irregular_block - let commands ..= 'oO$' - let &operatorfunc = function('CountSpaces', [a:virtualedit, v:true]) + let commands = #{ + \ line: "'[V']", + \ char: "`[v`]", + \ block: "`[\<C-V>`]", + \ }[a:type] + let [_, _, col, off] = getpos("']") + if off != 0 + let vcol = getline("'[")->strpart(0, col + off)->strdisplaywidth() + if vcol >= [line("'["), '$']->virtcol() - 1 + let a:context.extend_block = '$' + else + let a:context.extend_block = vcol .. '|' + endif + endif + if a:context.extend_block != '' + let commands ..= 'oO' .. a:context.extend_block endif let commands ..= 'y' execute 'silent noautocmd keepjumps normal! ' .. commands echomsg getreg('"')->count(' ') finally - call setreg('"', reg_save) - call setpos("'<", visual_marks_save[0]) - call setpos("'>", visual_marks_save[1]) - let &clipboard = cb_save - let &selection = sel_save - let &virtualedit = a:virtualedit + call setreg('"', save.register) + call setpos("'<", save.visual_marks[0]) + call setpos("'>", save.visual_marks[1]) + let &clipboard = save.clipboard + let &selection = save.selection + let [&l:virtualedit, &g:virtualedit] = get(a:context.dot_command ? save : a:context, 'virtualedit') + let a:context.dot_command = v:true endtry endfunction diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b4e776165..845351d08 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2021 Dec 11 +*options.txt* For Vim version 8.2. Last change: 2021 Dec 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -385,7 +385,7 @@ lambda it will be converted to the name, e.g. "<lambda>123". Examples: set opfunc={a\ ->\ MyOpFunc(a)} " set using a funcref variable let Fn = function('MyTagFunc') - let &tagfunc = string(Fn) + let &tagfunc = Fn " set using a lambda expression let &tagfunc = {t -> MyTagFunc(t)} " set using a variable with lambda expression @@ -9210,7 +9210,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'xtermcodes' boolean (default on) global When detecting xterm patchlevel 141 or higher with the termresponse - mechanism and this option is set, Vim will request the actual termimal + mechanism and this option is set, Vim will request the actual terminal key codes and number of colors from the terminal. This takes care of various configuration options of the terminal that cannot be obtained from the termlib/terminfo entry, see |xterm-codes|. diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index aa5a36a33..e53294291 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 8.2. Last change: 2021 Oct 17 +*quickref.txt* For Vim version 8.2. Last change: 2021 Dec 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1010,6 +1010,7 @@ Short explanation of each option: *option-list* 'writeany' 'wa' write to file with no need for "!" override 'writebackup' 'wb' make a backup before overwriting a file 'writedelay' 'wd' delay this many msec for each char (for debug) +'xtermcodes' request terminal codes from an xterm ------------------------------------------------------------------------------ *Q_ur* Undo/Redo commands diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 0101b51b6..35a4e3ad7 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4506,7 +4506,7 @@ it marks the "\(\I\i*\)" sub-expression as external; in the end pattern, it changes the \z1 back-reference into an external reference referring to the first external sub-expression in the start pattern. External references can also be used in skip patterns: > - :syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1" + :syn region foo start="start \z(\I\i*\)" skip="not end \z1" end="end \z1" Note that normal and external sub-expressions are completely orthogonal and indexed separately; for instance, if the pattern "\z(..\)\(..\)" is applied diff --git a/runtime/doc/tags b/runtime/doc/tags index fc5a0c925..9b5fe38c1 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -751,6 +751,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 'nowriteany' options.txt /*'nowriteany'* 'nowritebackup' options.txt /*'nowritebackup'* 'nows' options.txt /*'nows'* +'noxtermcodes' options.txt /*'noxtermcodes'* 'nrformats' options.txt /*'nrformats'* 'nu' options.txt /*'nu'* 'number' options.txt /*'number'* @@ -1262,6 +1263,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 'writedelay' options.txt /*'writedelay'* 'ws' options.txt /*'ws'* 'ww' options.txt /*'ww'* +'xtermcodes' options.txt /*'xtermcodes'* '{ motion.txt /*'{* '} motion.txt /*'}* ( motion.txt /*(* @@ -5912,6 +5914,7 @@ collate-variable eval.txt /*collate-variable* color-xterm syntax.txt /*color-xterm* coloring syntax.txt /*coloring* colortest.vim syntax.txt /*colortest.vim* +command-block vim9.txt /*command-block* command-line-functions usr_41.txt /*command-line-functions* command-line-window cmdline.txt /*command-line-window* command-mode intro.txt /*command-mode* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 3e90cc047..9e91c0e94 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 8.2. Last change: 2021 Dec 08 +*term.txt* For Vim version 8.2. Last change: 2021 Dec 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index d75015a3f..ca28f1f33 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.2. Last change: 2021 Nov 13 +*terminal.txt* For Vim version 8.2. Last change: 2021 Dec 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1428,6 +1428,8 @@ GDB command *termdebug-customizing* To change the name of the gdb command, set the "g:termdebugger" variable before invoking `:Termdebug`: > let g:termdebugger = "mygdb" +If the command needs an argument use a List: > + let g:termdebugger = ['rr', 'replay', '--'] < *gdb-version* Only debuggers fully compatible with gdb will work. Vim uses the GDB/MI interface. The "new-ui" command requires gdb version 7.12 or later. if you diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 80ea2a33e..bd97d3a2b 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.2. Last change: 2021 Dec 15 +*todo.txt* For Vim version 8.2. Last change: 2021 Dec 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,9 +38,14 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- +type of v: vars should be more specific + v:completed_item is dict<string>, not dict<any> + +E1135 is used twice + +"z=" in German can take a very long time, CTRL-C should interrupt it. + Vim9 - Make everything work: -- Check TODO items in vim9execute.c -- use CheckLegacyAndVim9Success(lines) in many more places - For builtin functions using tv_get_string*() use check_for_string() to be more strict about the argument type (not a bool). done: balloon_() @@ -48,8 +53,6 @@ Vim9 - Make everything work: map() could check that the return type of the function argument matches the type of the list or dict member. (#8092) Same for other functions, such as searchpair(). -- Test try/catch and throw better, also nested. - Test that return inside try/finally jumps to finally and then returns. - Test that a function defined inside a :def function is local to that function, g: functions can be defined and script-local functions cannot be defined. @@ -89,6 +92,9 @@ Further Vim9 improvements, possibly after launch: has(featureName), len(someString) - Implement as part of an expression: ++expr, --expr, expr++, expr--. +Update list of features to vote on: +- multiple cursors +- built-in LSP support Popup windows: - Preview popup not properly updated when it overlaps with completion menu. @@ -131,8 +137,6 @@ Text properties: where property fits in. Or Should we let the textprop highlight overrule other (e.g. diff) highlight if the priority is above a certain value? (#7392) -- Popup attached to text property stays visible when text is no longer - visible. (#7736) - Popup attached to text property stays visible when text is deleted with "cc". (#7737) "C" works OK. "dd" also files in a buffer with a single line. @@ -249,6 +253,8 @@ Idea: when typing ":e /some/dir/" and "dir" does not exist, highlight in red. initialization to figure out the default value from 'shell'. Add a test for this. +Patch to add :argdedupe. (Nir Lichtman, #6235) + MS-Windows: did path modifier :p:8 stop working? #8600 test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows. @@ -415,8 +421,6 @@ Motif: Build on Ubuntu can't enter any text in dialog text fields. Running test_gui and test_gui_init with Motif sometimes kills the window manager. Problem with Motif? -Patch to add :argdedupe. (Nir Lichtman, #6235) - When editing a file with ":edit" the output of :swapname is relative, while editing it with "vim file" it is absolute. (#355) Which one should it be? diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index b82427ca1..5b8654b8a 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 8.2. Last change: 2021 Dec 13 +*various.txt* For Vim version 8.2. Last change: 2021 Dec 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -549,14 +549,17 @@ N *+X11* Unix only: can restore window title |X11| name can be omitted. :redi[r] @">> Append messages to the unnamed register. -:redi[r] => {var} Redirect messages to a variable. If the variable - doesn't exist, then it is created. If the variable - exists, then it is initialized to an empty string. +:redi[r] => {var} Redirect messages to a variable. + In legacy script: If the variable doesn't exist, then + it is created. If the variable exists, then it is + initialized to an empty string. After the redirection + starts, if the variable is removed or locked or the + variable type is changed, then further command output + messages will cause errors. + In Vim9 script: the variable must have been declared + as a string. The variable will remain empty until redirection ends. - Only string variables can be used. After the - redirection starts, if the variable is removed or - locked or the variable type is changed, then further - command output messages will cause errors. + Only string variables can be used. To get the output of one command the |execute()| function can be used instead of redirection. diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 39affbfc2..6c142a4b1 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 8.2. Last change: 2021 Dec 15 +*vim9.txt* For Vim version 8.2. Last change: 2021 Dec 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -169,8 +169,8 @@ created yet. In this case you can call `execute()` to invoke it at runtime. > `:def` has no options like `:function` does: "range", "abort", "dict" or "closure". A `:def` function always aborts on an error (unless `:silent!` was -used for the command or inside a `:try` block), does not get a range passed -cannot be a "dict" function, and can always be a closure. +used for the command or the error was caught a `:try` block), does not get a +range passed cannot be a "dict" function, and can always be a closure. *vim9-no-dict-function* Later classes will be added, which replaces the "dict function" mechanism. For now you will need to pass the dictionary explicitly: > @@ -509,7 +509,7 @@ The function must already have been defined. > When using `function()` the resulting type is "func", a function with any number of arguments and any return type (including void). The function can be -defined later. +defined later if the argument is in quotes. Lambda using => instead of -> ~ |