From 1b8c485db6592e6b2eb650e06f5bfad46986e898 Mon Sep 17 00:00:00 2001 From: Yian Huang Date: Sat, 16 May 2020 14:36:21 -0700 Subject: [PATCH 001/126] update to Vim 8.2.0771 --- doc/editing.cnx | 38 ++++++++++++++++++++------------- doc/eval.cnx | 2 ++ doc/index.cnx | 6 +++--- doc/popup.cnx | 15 +++++++++++-- doc/recover.cnx | 12 +++++------ doc/tags-cn | 2 ++ doc/todo.cnx | 57 ++++++++++++++++++++++++++++--------------------- doc/vim9.cnx | 46 ++++++++++++++++++++++++++++++++++++--- doc/windows.cnx | 13 ++++++----- 9 files changed, 133 insertions(+), 58 deletions(-) diff --git a/doc/editing.cnx b/doc/editing.cnx index 1a10e3f1..1e2be662 100644 --- a/doc/editing.cnx +++ b/doc/editing.cnx @@ -1,4 +1,4 @@ -*editing.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年1月 +*editing.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年5月 VIM 参考手册 by Bram Moolenaar @@ -387,6 +387,9 @@ Vim 会用 'shell' 来执行反引号内的命令,其标准输出作为给定 :w ++enc=latin1 newfile 把当前缓冲区写入到 "newfile",以 latin1 编码。 +当 'fileencoding' 或 ++enc 指定的值不同于 'encoding' 时,写入文件时给出的消息 +会显示 "[已转换]"。 + 可以用多个 ++opt 参数,以空格分隔。它们都必须在任何 |+cmd| 参数之前。 *++bad* @@ -902,9 +905,10 @@ Unix 上当文件名不引用一个普通文件或者目录时,检测为设备 5. 写入并退出 *write-quit* *:q* *:quit* -:q[uit] 退出当前窗口。如果是最后的一个,退出 Vim。如果已经有 - 修改而且 Vim 拒绝放弃 |abandon| 当前的缓冲区,或者 - 如果参数列表的最后一个文件还没有被编辑,该操作失败。 +:q[uit] 退出当前窗口。如果是最后的一个 |edit-window|,退出 + Vim。如果已经有修改而且 Vim 拒绝放弃 |abandon| 当前的 + 缓冲区,或者如果参数列表的最后一个文件还没有被编辑,该 + 操作失败。 如果有其它标签页,并且退出的是当前标签页的最后一个窗 口,关闭当前标签页 |tab-page|。 激活 |QuitPre| 自动命令事件。 @@ -924,17 +928,21 @@ Unix 上当文件名不引用一个普通文件或者目录时,检测为设备 |quickfix|)。 *:wq* -:wq [++opt] 写回当前的文件并且退出。如果文件只读或者该缓冲区无名, - 写回操作将失败。如果参数列表的最后一个文件还没有编辑, - 那么退出操作将会失败。 +:wq [++opt] 写回当前的文件并且关闭窗口。如果是最后的一个 + |edit-window|,Vim 退出。 + 如果文件只读或者该缓冲区无名,写回操作失败。如果参数列 + 表的最后一个文件还没有编辑,则退出操作失败。 -:wq! [++opt] 写回当前的文件并且退出。如果当前缓冲区无名,则写回操作 - 将失败。 +:wq! [++opt] 写回当前的文件并且关闭窗口。如果是最后的一个 + |edit-window|,Vim 退出。如果当前缓冲区无名,则写回操 + 作失败。 -:wq [++opt] {file} 写入到 {file} 并且退出。 如果参数列表的最后一个文件还 - 没有编辑, 那么退出操作将会失败。 +:wq [++opt] {file} 写入到 {file} 并且关闭窗口。如果是最后的一个 + |edit-window|,Vim 退出。如果参数列表的最后一个文件还 + 没有编辑, 则退出操作失败。 -:wq! [++opt] {file} 写入到 {file} 并且退出。 +:wq! [++opt] {file} 写入到 {file} 并且关闭窗口。如果是最后的一个 + |edit-window|,Vim 退出。 :[range]wq[!] [++opt] [file] 同上,但只写入 [range] 界定的那些行。 @@ -950,9 +958,9 @@ Unix 上当文件名不引用一个普通文件或者目录时,检测为设备 同 :xit。 *ZZ* -ZZ 如果文件被修改,写回当前文件。然后退出。(和 :x 相 - 同)。(注意: 如果有当前文件有多个窗口,该文件在被修改 - 时会被写回,当前窗口会被关闭)。 +ZZ 如果文件被修改,写回当前文件。然后关闭当前窗口。(和 :x + 相同)。 + 如果有当前文件有多个窗口,只有当前窗口会被关闭。 *ZQ* ZQ 退出,不检查是否发生了修改 (同 ":q!")。 diff --git a/doc/eval.cnx b/doc/eval.cnx index 4c92b888..9778625f 100644 --- a/doc/eval.cnx +++ b/doc/eval.cnx @@ -2363,6 +2363,8 @@ popup_findpreview() 数值 获取预览弹出窗口的窗口 ID popup_getoptions({id}) 字典 获取弹出窗口 {id} 的选项 popup_getpos({id}) 字典 获取弹出窗口 {id} 的位置 popup_hide({id}) 无 隐藏弹出窗口 {id} +popup_list() 列表 获取所有弹出的窗口 ID 列表 +popup_locate({row}, {col}) 数值 获取在给出位置的弹出窗口 ID popup_menu({what}, {options}) 数值 创建弹出窗口用作菜单 popup_move({id}, {options}) 无 设置弹出窗口 {id} 的位置 popup_notification({what}, {options}) diff --git a/doc/index.cnx b/doc/index.cnx index d1e77cfe..731ad28b 100644 --- a/doc/index.cnx +++ b/doc/index.cnx @@ -319,8 +319,8 @@ SECTION 可能以 '}' 而不是 '{' 开始的小节 |W| W 1 光标前移 N 个 WORD |X| ["x]X 2 删除光标前的 N 个字符 [到寄存器 x] |Y| ["x]Y 抽出 N 行 [到寄存器 x];同 "yy" -|ZZ| ZZ 如果修改过,保存当前文件,然后退出 -|ZQ| ZQ 无条件退出当前文件 +|ZZ| ZZ 如果缓冲区修改过则写入,然后关闭窗口 +|ZQ| ZQ 关闭窗口但不写入 |[| [{char} 方括号命令 (见下 |[|) \ 不用 |]| ]{char} 方括号命令 (见下 |]|) @@ -1543,7 +1543,7 @@ SECTION 可能以 '}' 而不是 '{' 开始的小节 |:wqall| :wqa[ll] 写回所有 (改变的) 缓冲区然后退出 Vim |:wundo| :wu[ndo] 把撤销信息写入文件 |:wviminfo| :wv[iminfo] 写入 viminfo 文件 -|:xit| :x[it] 如果缓冲区被改动,写入之。然后退出窗口或者 Vim +|:xit| :x[it] 如果缓冲区被改动则写入。然后关闭窗口 |:xall| :xa[ll] 同 ":wqall" |:xmapclear| :xmapc[lear] 删除可视模式的所有映射 |:xmap| :xm[ap] 类似于 ":map",但使用可视模式 diff --git a/doc/popup.cnx b/doc/popup.cnx index 94384df7..06bbcf43 100644 --- a/doc/popup.cnx +++ b/doc/popup.cnx @@ -1,4 +1,4 @@ -*popup.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年4月 +*popup.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年5月 VIM 参考手册 by Bram Moolenaar @@ -124,6 +124,7 @@ Vim 试图在你指定的位置显示弹出。有些情况下,弹出会超出 - 终端窗口总占据焦点,不可能切换到其它窗口。 - 作业结束时,弹出窗口会关闭。 - 可用 `popup_close()` 关闭弹出窗口,终端缓冲区此时会被隐藏。 +- 不可进入终端-普通模式。 - 缺省 Pmenu 色彩只用于边框和填充。要改变终端本身的颜色,在创建终端前设置 Terminal 高亮组。之后设置 'wincolor' 也可以,但这要求终端中的程序重画所有的 内容。 @@ -168,6 +169,7 @@ Vim 试图在你指定的位置显示弹出。有些情况下,弹出会超出 |popup_getoptions()| 取得弹出的当前选项 |popup_getpos()| 取得弹出的实际位置和大小 |popup_locate()| 找到位于指定屏幕位置的弹出窗口 + |popup_list()| 取得所有弹出的列表 细 节 *popup-function-details* @@ -204,8 +206,13 @@ popup_beval({what}, {options}) *popup_beval()* GetText()->popup_beval({}) < *popup_clear()* -popup_clear() 处理表现不良插件的紧急方案: 关闭当前标签页的所有弹出窗口和全局 +popup_clear([{force}]) + 处理表现不良插件的紧急方案: 关闭当前标签页的所有弹出窗口和全局 弹出。 + 不调用关闭回调。 + 如果不给出 {force},当前窗口为弹出时此操作失败。 + 如果给出 {force} 且为 |TRUE|,即使当前窗口为弹出也关闭之。弹出 + 中如果有终端在运行,一并终止。 popup_close({id} [, {result}]) *popup_close()* @@ -364,6 +371,10 @@ popup_hide({id}) *popup_hide()* 也可用作 |method|: > GetPopup()->popup_hide() +popup_list() *popup_list()* + 返回存在的所有弹出的 |window-ID| 列表。 + + popup_locate({row}, {col}) *popup_locate()* 返回在屏幕位置 {row} 和 {col} 上的弹出 |window-ID|。如果有多个 弹出,返回最高 zindex 的弹出。如果在该位置上没有弹出,返回零。 diff --git a/doc/recover.cnx b/doc/recover.cnx index db4ab8d9..da6e42f6 100644 --- a/doc/recover.cnx +++ b/doc/recover.cnx @@ -1,4 +1,4 @@ -*recover.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年3月 +*recover.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年5月 VIM 参考手册 by Bram Moolenaar @@ -110,11 +110,11 @@ Vim 把您对文件的改动保存在一个交换文件中。多数情况下, 如果您想确定您对文件所作的修改已经被写到交换文件中了,使用这个命令: *:pre* *:preserve* *E313* *E314* -:pre[serve] 把缓冲区中的所有文本写入它们的交换文件中。这样在文件恢 - 复时就不再需要原文件了。 - 本命令设置了当前缓冲区的一个标志位。如果 'cpoptions' - 里有 '&' 标志位而且 Vim 退出时如果此缓冲区还处于载入状 - 态,不删除此缓冲区的交换文件 |cpo-&|。 +:pre[serve] 把当前缓冲区中的所有文本写入交换文件。这样在文件恢 + 复时就不再需要原文件了。本命令设置了当前缓冲区的一个标 + 志位。如果 'cpoptions' 里有 '&' 标志位而且 Vim 退出时 + 如果此缓冲区还处于载入状态,不删除此缓冲区的交换文件 + |cpo-&|。 Vim 会通过文件开始的 6 个字符 "b0VIM " 来识别它的交换文件。Vim 的版本号 (如: 3.0) 会紧跟在那些字符之后。 diff --git a/doc/tags-cn b/doc/tags-cn index e7db8aa8..8d611f8d 100644 --- a/doc/tags-cn +++ b/doc/tags-cn @@ -6128,6 +6128,7 @@ edit-files editing.cnx /*edit-files* edit-intro editing.cnx /*edit-intro* edit-no-break usr_25.cnx /*edit-no-break* edit-paragraph-join usr_25.cnx /*edit-paragraph-join* +edit-window windows.cnx /*edit-window* editing.txt editing.cnx /*editing.txt* efm-%> quickfix.cnx /*efm-%>* efm-entries quickfix.cnx /*efm-entries* @@ -8381,6 +8382,7 @@ popup_findpreview() popup.cnx /*popup_findpreview()* popup_getoptions() popup.cnx /*popup_getoptions()* popup_getpos() popup.cnx /*popup_getpos()* popup_hide() popup.cnx /*popup_hide()* +popup_list() popup.cnx /*popup_list()* popup_locate() popup.cnx /*popup_locate()* popup_menu() popup.cnx /*popup_menu()* popup_menu-shortcut-example popup.cnx /*popup_menu-shortcut-example* diff --git a/doc/todo.cnx b/doc/todo.cnx index ecb4e824..a1599fcf 100644 --- a/doc/todo.cnx +++ b/doc/todo.cnx @@ -1,4 +1,4 @@ -*todo.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年4月 +*todo.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年5月 VIM 参考手册 by Bram Moolenaar @@ -40,22 +40,17 @@ https://github.com/vim/vim/issues/1234 ----------------------- 已知漏洞和当前工作 -------------------------- Vim9 script: -Big changes, need design: -- Make closures work: - Grab the part of the stack that has the arguments and local vars. - Pass a pointer and offset to the closure where this stack fragment is (frame - pointer). - When a closure disappears at end of the function - nothing to do. - When a closure remains at end of the function: copy frame, attach to closure. -- At the vim9 script level: Allow using a function that is defined later. - Requires compiling functions only when the whole script has been sourced. - Like Javascript "hoisting", but only at the script level: - 1. Discovery phase: Read the file to find all functions, variable - declarations and imports If a variable has a constant expression we get - the type, otherwise it will be "any". Follow imports recursively. - 2. Compilation phase: compile :def function bodies, using declared types - 3. Execution phase: Execute imports when encountered. (skip over functions) -- When sourcing a script again, also delete script-local variables. +Make closures work: + - call closure from not compiled context + - Create closure in a loop. Need to make a list of them. +Forward declarations: + - Cleanup when sourcing a script again: all script-local variables, imports + and functions are deleted. + - make sure only constants in declarations are executed, no function calls. + - Declare a variable at script level without an assignment. + let var: string + Error without a type or assignment + let var # error! Making everything work: - Test that a script-local function in Vim9 script cannot be deleted. - Test that a function defined inside a :def function is local to that @@ -63,7 +58,13 @@ Making everything work: defined. - Check that when using a user function name without prefix, it does not find a global function. Prefixing g: is required. -- Compile let [var, var] = expr +- Compile: let [var, var] = expr +- Compile: for [key, value] in items(map) +- Assignment to dict doesn't work: + let ret: dict = #{} + ret[i] = string(i) +- Appending to dict item doesn't work: + let d[i] ..= value - Compile replacement of :s command: s/pat/\=expr/ - Compile redir to local variable: var_redir_start(). - Compile builtin functions that access local variables: @@ -80,11 +81,8 @@ Making everything work: - expandcmd() with `=expr` in filename uses legacy expression. - eval_expr() in ex_cexpr() - eval_expr() call in dbg_parsearg() and debuggy_find() +- Make "true" and "false" work in vim9script New syntax and functionality: -- define function and create funcref in one step: - let ref = def(arg: type): rettype - body - enddef Improve error checking: - "echo Func()" is an error if Func() does not return anything. Also: @@ -119,6 +117,10 @@ Further improvements: - compile options that are an expression, e.g. "expr:" in 'spellsuggest', 'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert', 'balloonexpr', 'includeexpr', 'indentexpr', 'formatexpr'. +- Make inline function work, to be used as a funcref: + let ref = def(arg: type): rettype + body + enddef - compile get_lambda_tv() in popup_add_timeout() - compile "skip" argument of searchpair() - compile "expr" and "call" expression of a channel in channel_exe_cmd()? @@ -255,6 +257,11 @@ Patch for the Haiku port: #5961 Patch to add Turkish manual. (Emir Sarı, #5641) +Patch to add lua sleep function. (Prabir Shrestha, #6057) +Alternative: use vim.call and vim.fn: #6063 + +Patch to add getmarklist() (Yegappan, #6032) + Patch to support different color for undercurl in cterm. (Timur Celik, #6011) @@ -290,6 +297,10 @@ Patch to delete BeOS code. (#5817) Anyone who wants to keep it? With bash ":make" does not set v:shell_error. Possible solution: set 'shellpipe' to "2>&1| tee %s; exit ${PIPESTATUS[0]}" #5994 +When changing the crypt key the buffer should be considered modified. +Like when changing 'fileformat'. Save the old key in save_file_ff(). +(Ninu-Ciprian Marginean) + Strange sequence of BufWipeout and BufNew events while doing omni-complete. (Paul Jolly, #5656) Get BufDelete without preceding BufNew. (Paul Jolly, #5694) @@ -357,8 +368,6 @@ unlisted. (#4478) Patch to include reduce() function. (#5481) -When SIGTSTP is ignored, don't let CTRL-Z suspend Vim? (Kurtis Rader, #5990) - Statusline highlighting error, off by one. (#5599) Enable 'termbidi' if $VTE_VERSION >= 5703 ? diff --git a/doc/vim9.cnx b/doc/vim9.cnx index b8afa46a..bc112fda 100644 --- a/doc/vim9.cnx +++ b/doc/vim9.cnx @@ -109,9 +109,49 @@ Vim9 函数~ 其结果是,无命名空间的函数和变量可在定义所在或导入的脚本内访问。全局函数和变量 可以在任何地方定义 (要找到需要点运气!)。 -可以在几乎任何时候定义和删除全局函数。vim9 脚本里,局部于脚本的函数在脚本载入 -时定义一次,且不能删除。除非相同的脚本被再次载入,此时所有的已有局部于脚本的函 -数和变量被先删除。 +全局函数还是可以在几乎任何时候定义和删除。vim9 脚本里,局部于脚本的函数在脚本 +载入时定义一次,且不能删除。 + + +载入 Vim9 脚本的四个阶段~ + +在老式脚本里,函数在遭遇时创立,但只在使用时解析。这样可以允许以任何顺序定义函 +数,并可相互调用,只要函数在调用时有定义便可: ~ + func One() + call Two() + endfunc + func Two() + if cond + call One() " 递归调用 + endif + endfunc + call One() + +Vim9 脚本里,函数经过编译。使用上例中同样的函数时,函数 One 在编译时不可以不知 +道函数 Two 的存在。不然就会需要运行时检查,这会变慢且不许可编译时的类型检查。 + +载入 Vim9 脚本时,有四个阶段: +1. 清理: 脚本载入前,删除所有局部于脚本的变量、导入和函数。 +2. 发现: 读入脚本,识别出函数、导入和变量的声明并解析其类型。变量的初始值设定 + 项如为常量时,进行计算以推出变量的类型。 +3. 编译: 编译函数。找到发现阶段识别的局部于脚本的函数、导入和变量并检查类型。 +4. 执行: 执行脚本中的命令,由头至尾。函数被跳过,因为不需要再次处理。变量的初 + 始值设定项在遭遇时进行计算。注意 如果之前调用的某函数设置过该值,此时它会被 + 覆盖。最好变量在使用前先进行声明,以免此种混淆。 + +这样做的效果是脚本层级定义的项目可以在脚本的任何位置使用。所以可在顶部放上主函 +数: > + def Main() + SubOne() + SubTwo() + enddef + def SubOne() + ... + def SubTwo() + ... + +注意 局部于脚本的变量必须给出类型定义或有常量的初始值设定项。否则会报出类型未 +知的错误。 用 :let 和 :const 声明变量~ diff --git a/doc/windows.cnx b/doc/windows.cnx index 54ec6d8f..ca007989 100644 --- a/doc/windows.cnx +++ b/doc/windows.cnx @@ -1,4 +1,4 @@ -*windows.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年3月 +*windows.txt* 适用于 Vim 8.2 版本。 最近更新: 2020年5月 VIM 参考手册 by Bram Moolenaar @@ -253,7 +253,9 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q* 没有 {count}: 退出当前窗口。如果给出 {count},退出第 {count} 个窗口。 - 如果退出的是最后一个窗口 (不包括帮助窗口),就会退出 Vim。 + *edit-window* + 如果退出的是最后一个编辑窗口 (不包括帮助或预览窗口),就会退出 + Vim。 如果置位了 'hidden' 并且只有此一个窗口监视当前缓冲区,那么该缓 冲区被隐藏。如果没有置位 'hidden',并且只有当前这一个窗口监视 @@ -269,7 +271,8 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q* :+quit " 退出下一个窗口 :+2quit " 退出下面第二个窗口 < - 关闭帮助窗口时,Vim 会试图恢复上次的窗口布局 |:helpclose|。 + 关闭帮助窗口时如果它不是唯一的窗口,Vim 会试图恢复上次的窗口布 + 局,见 |:helpclose|。 :q[uit]! :{count}q[uit]! @@ -289,8 +292,8 @@ CTRL-W c *CTRL-W_c* *:clo* *:close* 如果置位了 'hidden',或者改动了缓冲区但是命令里用了 [!],缓冲 区会被隐藏 (除非还有一个窗口在编辑该缓冲区)。 - 如果当前标签页只有一个窗口而且有其它标签页,关闭当前标签页。 - |tab-page|。 + 如果当前标签页只有一个 |edit-window| 而且有其它标签页,关闭当 + 前标签页。|tab-page|。 该命令在下述情况下会失败: *E444* - 屏幕上只剩下最后一个窗口的时候。 From 2c660f187009cedd9e35ca8939a10613c7f0bd20 Mon Sep 17 00:00:00 2001 From: Yian Huang Date: Sat, 30 May 2020 16:35:09 -0700 Subject: [PATCH 002/126] update to Vim 8.2.0855 --- doc/eval.cnx | 40 +++++++++++++++++++++++---- doc/if_lua.cnx | 10 ++++++- doc/index.cnx | 9 ++++--- doc/options.cnx | 3 ++- doc/os_haiku.cnx | 2 -- doc/popup.cnx | 2 +- doc/repeat.cnx | 8 ++++-- doc/tags-cn | 6 +++++ doc/terminal.cnx | 9 +++++-- doc/todo.cnx | 70 +++++++++++++++++++++++++++++++++++------------- doc/vim9.cnx | 68 +++++++++++----------------------------------- 11 files changed, 138 insertions(+), 89 deletions(-) diff --git a/doc/eval.cnx b/doc/eval.cnx index 9778625f..6b5e9e32 100644 --- a/doc/eval.cnx +++ b/doc/eval.cnx @@ -528,9 +528,11 @@ For 循环 ~ 注意 这不影响字典项目的顺序,不要希望 ":echo adict" 会先显示原有 adict 项目, 然后再显示 bdict 的项目。 -从字典里删除多个项目可以用 |filter()| 完成: > +可用 |filter()| 从字典里删除多个项目: > :call filter(dict, 'v:val =~ "x"') -删除 "dict" 里所有值不匹配 "x" 的项目。 +会删除 "dict" 里所有值不匹配 "x" 的项目。 +也可这样来删除所有的项目: > + call filter(dict, 0) 字典函数 ~ @@ -1225,6 +1227,9 @@ string *string* *String* *expr-string* *E114* 转义。 双引号必须转义: ""。 不要用 来得到 utf-8 字符,用上面提到的 \uxxxxx。 +\{xxx} 类似于 \,但在之前附加修饰符而不是把它包含到字符里。例如, + "\" 是单个字符 0x17,而 "\{C-w}" 是四个字节: CTRL 修饰符对应 3 + 个,然后是字符 "W"。 注意 "\xff" 保存为字节 255,在某些编码中它是不合法的。使用 "\u00ff" 可以按照 'encoding' 的当前值保存字符 255。 @@ -2321,6 +2326,8 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) 模式 {mode} 的映射 {name} 的右手边 mapcheck({name} [, {mode} [, {abbr}]]) 字符串 检查匹配 {name} 的映射 +mapset({mode}, {abbr}, {dict}) + 无 从 |maparg()| 返回值恢复映射 match({expr}, {pat} [, {start} [, {count}]]) 数值 {expr} 里 {pat} 的匹配位置 matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) @@ -2651,6 +2658,7 @@ win_splitmove({nr}, {target} [, {options}]) 数值 移动窗口 {nr} 成为 {target} 的分割窗口 winbufnr({nr}) 数值 窗口 {nr} 的缓冲区号 wincol() 数值 光标所在的窗口列 +windowsversion() 字符串 MS-Windows 操作系统版本 winheight({nr}) 数值 窗口 {nr} 的高度 winlayout([{tabnr}]) 列表 标签页 {tabnr} 的窗口布局 winline() 数值 光标所在的窗口行 @@ -3628,7 +3636,7 @@ executable({expr}) *executable()* MS-Windows 上,可以可选地包含 ".exe"、".bat" 等。为此, $PATHEXT 里的扩展名会被尝试。这样,如果 "foo.exe" 不存在,可能 会找到 "foo.exe.bat"。如果没有设置 $PATHEXT,使用的是 - ".exe;.com;.bat;.cmd"。$PATHEXT 里可以使用单独的句号,以尝试没 + ".com;.exe;.bat;.cmd"。$PATHEXT 里可以使用单独的句号,以尝试没 有扩展名的名字。如果 'shell' 看起来像 Unix 外壳,那么也尝试没 有扩展名的名字。 MS-Windows 上,只检查是否文件存在且不是目录,并不检查它是否真 @@ -5998,6 +6006,7 @@ map({expr1}, {expr2}) *map()* 也可用作 |method|: > mylist->map(expr2) + maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* 当 {dict} 省略或为零,返回模式 {mode} 名为 {name} 的映射的右手 边 (rhs)。返回字符串中的特殊字符用和 ":map" 命令输出的同样方式 @@ -6024,8 +6033,11 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* 如果提供 {dict} 且为 |TRUE|,返回字典,包含关于映射的所有信 息。有如下项目: - "lhs" 映射的 {lhs}。 - "rhs" 映射的 {rhs},保持输入原样。 + "lhs" 映射的 {lhs},作为键盘输入 + "lhsraw" 映射的 {lhs},保留原始字节 + "lhsrawalt" 映射的 {lhs},保留原始字节,这是一种替代形式,仅 + 当和 "lhsraw" 不同时才会存在 + "rhs" 映射的 {rhs},作为键盘输入。 "silent" 1 若是 |:map-silent| 映射,否则为 0。 "noremap" 1 若是映射的 {rhs} 不能再映射。 "script" 1 若是映射使用