diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-07-06 13:18:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-06 13:18:11 +0100 |
commit | 5ed11535e0695163cec71033b98bb97356cf0113 (patch) | |
tree | 2b1048a6dec6119e70258354b17ac1ffcdb72db3 | |
parent | cf34434b5e840dda4a21cd9c0bee24e3e43a674d (diff) |
Update runtime files
-rw-r--r-- | runtime/doc/builtin.txt | 4 | ||||
-rw-r--r-- | runtime/doc/intro.txt | 5 | ||||
-rw-r--r-- | runtime/doc/map.txt | 12 | ||||
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/tags | 2 | ||||
-rw-r--r-- | runtime/doc/term.txt | 11 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 11 | ||||
-rw-r--r-- | runtime/doc/vim9.txt | 85 | ||||
-rw-r--r-- | runtime/filetype.vim | 2 | ||||
-rw-r--r-- | runtime/ftplugin/vim.vim | 7 | ||||
-rw-r--r-- | runtime/lang/menu_zh_cn.utf-8.vim | 677 | ||||
-rw-r--r-- | runtime/syntax/fetchmail.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/sh.vim | 8 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 12 |
14 files changed, 506 insertions, 336 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index c93da54c26..dc68def416 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2872,6 +2872,10 @@ fnamemodify({fname}, {mods}) *fnamemodify()* /home/user/vim/vim/src < If {mods} is empty or an unsupported modifier is used then {fname} is returned. + When {fname} is empty then with {mods} ":h" returns ".", so + that `:cd` can be used with it. This is different from + expand('%:h') without a buffer name, which returns an empty + string. Note: Environment variables don't work in {fname}, use |expand()| first then. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 2ac98b1fac..6904091b45 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -697,7 +697,8 @@ Q Switch to "Ex" mode. This is a bit like typing ":" line-input editing commands (<Del> or <BS> to erase, CTRL-U to kill the whole line). Vim will enter this mode by default if it's invoked as - "ex" on the command-line. + "ex" on the command-line or the |-e| command line + argument was used. Use the ":vi" command |:visual| to exit "Ex" mode. Note: In older versions of Vim "Q" formatted text, that is now done with |gq|. But if you use the @@ -708,7 +709,7 @@ Q Switch to "Ex" mode. This is a bit like typing ":" gQ Switch to "Ex" mode like with "Q", but really behave like typing ":" commands after another. All command line editing, completion etc. is available. - Use the ":vi" command |:visual| to exit "Ex" mode. + Use the `:vi` command (`:visual`) to exit "Ex" mode. ============================================================================== 7. The window contents *window-contents* diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 5efc5076f8..e4332b8d4a 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -374,15 +374,17 @@ command: it is executed as if an (unrestricted) |autocommand| was invoked. <ScriptCmd> is like <Cmd> but sets the context to the script the mapping was defined in, for the duration of the command execution. This is especially useful for |Vim9| script. It also works to access an import, which is useful -in a plugin using an autoload script: > +in a plugin using a, possibly autoloaded, script: > vim9script import autoload 'implementation.vim' as impl nnoremap <F4> <ScriptCmd>impl.DoTheWork()<CR> - +< No matter where <F4> is typed, the "impl" import will be found in the script -context of where the mapping was defined. And since it's an autoload import, -the "implementation.vim" script will only be loaded once <F4> is typed, not -when the mapping is defined. +context of where the mapping was defined. When it's an autoload import, as in +the example, the "implementation.vim" script will only be loaded once <F4> is +typed, not when the mapping is defined. + +Without <ScriptCmd> using "s:impl" would result in "E121: Undefined variable". Note: - Because <Cmd> and <ScriptCmd> avoid mode-changes it does not trigger diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index cef9bd5503..cd9d7bd806 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1677,7 +1677,7 @@ A jump table for the options with a short description can be found at |Q_op|. feature is included} This option is a list of comma-separated names. Note: if one of the items is "exclude:", then you can't add an item - after that. Therefore do append an item with += but use ^= to + after that. Therefore do not append an item with += but use ^= to prepend, e.g.: > set clipboard^=unnamed < These names are recognized: diff --git a/runtime/doc/tags b/runtime/doc/tags index c08a834de1..ad35a71227 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -7881,6 +7881,7 @@ if_sniff.txt if_sniff.txt /*if_sniff.txt* if_tcl.txt if_tcl.txt /*if_tcl.txt* ignore-errors eval.txt /*ignore-errors* ignore-timestamp editing.txt /*ignore-timestamp* +import-legacy vim9.txt /*import-legacy* improved-autocmds-5.4 version5.txt /*improved-autocmds-5.4* improved-quickfix version5.txt /*improved-quickfix* improved-sessions version5.txt /*improved-sessions* @@ -8070,6 +8071,7 @@ lcs-space options.txt /*lcs-space* lcs-tab options.txt /*lcs-tab* lcs-trail options.txt /*lcs-trail* left-right-motions motion.txt /*left-right-motions* +legacy-import vim9.txt /*legacy-import* len() builtin.txt /*len()* less various.txt /*less* letter print.txt /*letter* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index c4199c2db9..35cc02bdab 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -633,10 +633,13 @@ When the GUI is running 't_Co' is set to 16777216. *termcap-cursor-shape* *termcap-cursor-color* When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim enters Replace mode the 't_SR' escape sequence is sent if it is set, otherwise -'t_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used. This -can be used to change the shape or color of the cursor in Insert or Replace -mode. These are not standard termcap/terminfo entries, you need to set them -yourself. +'t_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used. +Note: When 't_EI' is not set then 't_SI' and 't_SR' will not be sent. And +when 't_SI' or 't_SR' is not set then 't_EI' is sent only once. + +This can be used to change the shape or color of the cursor in Insert or +Replace mode. These are not standard termcap/terminfo entries, you need to set +them yourself. Example for an xterm, this changes the color of the cursor: > if &term =~ "xterm" let &t_SI = "\<Esc>]12;purple\x7" diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 736340ac46..33bf844756 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -68,6 +68,12 @@ Further Vim9 improvements, possibly after launch: - Implement as part of an expression: ++expr, --expr, expr++, expr--. Update list of features to vote on: +- Remove Athena item (won't happen) +- Remove "add open mode" (won't happen) +- Remove "editing of a hidden buffer" (done) +- Change "add IDE features" to "improve terminal debugger" +- Change "diff/merge capability for CVS" to "CVS and git" +- Remove "pre-compile them" from "improve the performance of Vim scripts" - multiple cursors - built-in LSP support - virtual text, using text properties @@ -117,8 +123,6 @@ Text properties: if the priority is above a certain value? (#7392) Combining text property with 'cursorline' does not always work (Billie Cleek, #5533) -- "C" works OK. "dd" fails to delete text property in a buffer with a single - line. - Add text property that shifts text to make room for annotation (e.g. variable type). Like the opposite of conceal. Requires fixing the cursor positioning and mouse clicks as with conceal mode. @@ -200,9 +204,6 @@ Terminal emulator window: Patches considered for including: - Add "-n" option to xxd. #10599 needs a test - allow for nesting of timeout, sketch in #10595 -- Patch to implement the vimtutor with a plugin: #6414 - Was originally written by Felipe Morales. -- Patch to make fillchars global-local. (#5206) Autoconf: must use autoconf 2.69, later version generates lots of warnings - try using autoconf 2.71 and fix all "obsolete" warnings diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 852cdb9e13..4b54f18f9f 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -145,6 +145,17 @@ Do not start a comment with #{, it looks like the legacy dictionary literal and produces an error where this might be confusing. #{{ or #{{{ are OK, these can be used to start a fold. +When starting to read a script file Vim doesn't know it is |Vim9| script until +the `vim9script` command is found. Until that point you would need to use +legacy comments: > + " legacy comment + vim9script + # Vim9 comment + +That looks ugly, better put `vim9script` in the very first line: > + vim9script + # Vim9 comment + In legacy Vim script # is also used for the alternate file name. In Vim9 script you need to use %% instead. Instead of ## use %%% (stands for all arguments). @@ -1687,21 +1698,34 @@ be exported. {not implemented yet: class, interface} Import ~ *:import* *:imp* *E1094* *E1047* *E1262* *E1048* *E1049* *E1053* *E1071* *E1236* -The exported items can be imported in another Vim9 script: > +The exported items can be imported in another script. The import syntax has +two forms. The simple form: > + import {filename} +< +Where {filename} is an expression that must evaluate to a string. In this +form the filename should end in ".vim" and the portion before ".vim" will +become the script local name of the namespace. For example: > import "myscript.vim" - -This makes each item available as "myscript.item". +< +This makes each exported item in "myscript.vim" available as "myscript.item". *:import-as* *E1257* *E1261* -In case the name is long or ambiguous, another name can be specified: > - import "thatscript.vim" as that +In case the name is long or ambiguous, this form can be used to specify +another name: > + import {longfilename} as {name} +< +In this form {name} becomes a specific script local name for the imported +namespace. Therefore {name} must consist of letters, digits and '_', like +|internal-variables|. The {longfilename} expression must evaluate to any +filename. For example: > + import "thatscript.vim.v2" as that < *E1060* *E1258* *E1259* *E1260* -Then you can use "that.EXPORTED_CONST", "that.someValue", etc. You are free -to choose the name "that". Use something that will be recognized as referring -to the imported script. Avoid command names, command modifiers and builtin -function names, because the name will shadow them. -If the name starts with a capital letter it can also shadow global user -commands and functions. Also, you cannot use the name for something else in -the script, such as a function or variable name. +Then you can use "that.item", etc. You are free to choose the name "that". +Use something that will be recognized as referring to the imported script. +Avoid command names, command modifiers and builtin function names, because the +name will shadow them. Better not start the name starts with a capital +letter, since it can then also shadow global user commands and functions. +Also, you cannot use the name for something else in the script, such as a +function or variable name. In case the dot in the name is undesired, a local reference can be made for a function: > @@ -1714,15 +1738,6 @@ This does not work for variables, since the value would be copied once and when changing the variable the copy will change, not the original variable. You will need to use the full name, with the dot. -The full syntax of the command is: - import {filename} [as {name}] -Where {filename} is an expression that must evaluate to a string. Without the -"as {name}" part it must end in ".vim". {name} must consist of letters, -digits and '_', like |internal-variables|. - -`:import` can also be used in legacy Vim script. The imported items still -become script-local, even when the "s:" prefix is not given. - `:import` can not be used in a function. Imported items are intended to exist at the script level and only imported once. @@ -1752,14 +1767,38 @@ line, there can be no line break: > echo that .name # Error! -To refer to a function in an imported script in a mapping, |<SID>| can be -used: > +When you've imported a function from one script into a vim9 script you can +refer to the imported function in a mapping by prefixing it with |<SID>|: > noremap <silent> ,a :call <SID>name.Function()<CR> When the mapping is defined "<SID>name." will be replaced with <SNR> and the script ID of the imported script. An even simpler solution is using |<ScriptCmd>|: > noremap ,a <ScriptCmd>name.Function()<CR> + +Note that this does not work for variables, only for functions. + + *import-legacy* *legacy-import* +`:import` can also be used in legacy Vim script. The imported namespace still +becomes script-local, even when the "s:" prefix is not given. For example: > + import "myfile.vim" + call s:myfile.MyFunc() + +And using the "as name" form: > + import "otherfile.vim9script" as that + call s:that.OtherFunc() + +However, the namespace cannot be resolved on it's own: > + import "that.vim" + echo s:that + " ERROR: E1060: Expected dot after name: s:that +< +This also affects the use of |<SID>| in the legacy mapping context. Since +|<SID>| is only a valid prefix for a function and NOT for a namespace, you +cannot use it +to scope a function in a script local namespace. Instead of prefixing the +function with |<SID>| you should use|<ScriptCmd>|. For example: > + noremap ,a <ScriptCmd>:call s:that.OtherFunc()<CR> < *:import-cycle* The `import` commands are executed when encountered. If script A imports diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 40f62f9dfc..8d6a97de25 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2022 Jun 03 +" Last Change: 2022 Jul 5 " Listen very carefully, I will say this only once if exists("did_load_filetypes") diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 98c94ccfc9..65c57a12bc 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -16,7 +16,7 @@ set cpo&vim if !exists('*VimFtpluginUndo') func VimFtpluginUndo() - setl fo< isk< com< tw< commentstring< + setl fo< isk< com< tw< commentstring< include< define< if exists('b:did_add_maps') silent! nunmap <buffer> [[ silent! vunmap <buffer> [[ @@ -59,6 +59,11 @@ else setlocal commentstring=\"%s endif +" set 'include' to recognize import commands +setlocal include=\\v^\\s*import\\s*(autoload)? + +" set 'define' to recognize export commands +setlocal define=\\v^\\s*export\\s*(def\|const\|var\|final) " Format comments to be up to 78 characters long if &tw == 0 diff --git a/runtime/lang/menu_zh_cn.utf-8.vim b/runtime/lang/menu_zh_cn.utf-8.vim index f9881f54d6..d19945cdd5 100644 --- a/runtime/lang/menu_zh_cn.utf-8.vim +++ b/runtime/lang/menu_zh_cn.utf-8.vim @@ -1,10 +1,15 @@ " Menu Translations: Simplified Chinese -" Maintainer: Shun Bai <baishunde@gmail.com> -" Previous Maintainer: Yuheng Xie <elephant@linux.net.cn> -" Last Change: 2022 Feb 19 +" Maintainer: Ada (Haowen) Yu <me@yuhaowen.com> +" Previous Maintainer: Shun Bai <baishunde@gmail.com>, Yuheng Xie <elephant@linux.net.cn> +" Last Change: 2022 July 6 " Original translations +" +" Generated with the scripts from: +" +" https://github.com/adaext/vim-menutrans-helper " Quit when menu translations have already been done. + if exists("did_menu_trans") finish endif @@ -15,18 +20,18 @@ set cpo&vim scriptencoding utf-8 " Help menu -menutrans &Help 帮助(&H) +menutrans &Help 帮助(&H) " Help menuitems and dialog {{{1 -menutrans &Overview<Tab><F1> 概述(&O)<Tab><F1> -menutrans &User\ Manual 用户手册(&U) -menutrans &How-to\ Links 如何使用(&H) -menutrans &Find\.\.\. 查找(&F)\.\.\. -menutrans &Credits 致谢(&C) -menutrans Co&pying 版权(&P) -menutrans &Sponsor/Register 赞助/注册(&S) -menutrans O&rphans 拯救孤儿(&R) -menutrans &Version 版本(&V) -menutrans &About 关于(&A) +menutrans &Overview<Tab><F1> 概述(&O)<Tab><F1> +menutrans &User\ Manual 用户手册(&U) +menutrans &How-to\ Links 如何使用(&H) +menutrans &Find\.\.\. 查找(&F)\.\.\. +menutrans &Credits 致谢(&C) +menutrans Co&pying 版权(&P) +menutrans &Sponsor/Register 赞助/注册(&S) +menutrans O&rphans 拯救孤儿(&R) +menutrans &Version 版本(&V) +menutrans &About 关于(&A) " fun! s:Helpfind() if !exists("g:menutrans_help_dialog") @@ -35,67 +40,68 @@ endif " }}} " File menu -menutrans &File 文件(&F) +menutrans &File 文件(&F) " File menuitems {{{1 -menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e -menutrans Sp&lit-Open\.\.\.<Tab>:sp 在拆分窗口打开(&L)\.\.\.<Tab>:sp -menutrans Open\ Tab\.\.\.<Tab>:tabnew 在标签页打开\.\.\.<Tab>:tabnew -menutrans &New<Tab>:enew 新建(&N)<Tab>:enew -menutrans &Close<Tab>:close 关闭(&C)<Tab>:close -menutrans &Save<Tab>:w 保存(&S)<Tab>:w -menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav -menutrans Split\ &Diff\ With\.\.\. 拆分窗口以对比差异(Diff)(&D)\.\.\. -menutrans Split\ Patched\ &By\.\.\. 拆分窗口以进行修补(Patch)(&B)\.\.\. -menutrans &Print 打印(&P) -menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa -menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa +menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e +menutrans Sp&lit-Open\.\.\.<Tab>:sp 在拆分窗口打开(&L)\.\.\.<Tab>:sp +menutrans Open\ Tab\.\.\.<Tab>:tabnew 在标签页打开\.\.\.<Tab>:tabnew +menutrans &New<Tab>:enew 新建(&N)<Tab>:enew +menutrans &Close<Tab>:close 关闭(&C)<Tab>:close +menutrans &Save<Tab>:w 保存(&S)<Tab>:w +menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav +menutrans Split\ &Diff\ With\.\.\. 拆分窗口以对比差异(Diff)(&D)\.\.\. +menutrans Split\ Patched\ &By\.\.\. 拆分窗口以进行修补(Patch)(&B)\.\.\. +menutrans &Print 打印(&P) +menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa +menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa " }}} " Edit menu -menutrans &Edit 编辑(&E) +menutrans &Edit 编辑(&E) " Edit menuitems {{{1 -menutrans &Undo<Tab>u 撤销(&U)<Tab>u -menutrans &Redo<Tab>^R 恢复(&R)<Tab>^R -menutrans Rep&eat<Tab>\. 重复(&E)<Tab>\. -menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x -menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y -menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP -menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p -menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p -menutrans &Delete<Tab>x 删除(&D)<Tab>x -menutrans &Select\ All<Tab>ggVG 全选(&S)<Tab>ggVG -menutrans &Find\.\.\. 查找(&F)\.\.\. -menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\. -menutrans &Find<Tab>/ 查找(&F)<Tab>/ -menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s -menutrans Settings\ &Window 设置窗口(&W) -menutrans Startup\ &Settings 启动设置(&S) +menutrans &Undo<Tab>u 撤销(&U)<Tab>u +menutrans &Redo<Tab>^R 恢复(&R)<Tab>^R +menutrans Rep&eat<Tab>\. 重复(&E)<Tab>\. +menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x +menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y +menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP +menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p +menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p +menutrans &Delete<Tab>x 删除(&D)<Tab>x +menutrans &Select\ All<Tab>ggVG 全选(&S)<Tab>ggVG +menutrans &Find\.\.\. 查找(&F)\.\.\. +menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\. +menutrans &Find<Tab>/ 查找(&F)<Tab>/ +menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s +menutrans Find\ and\ Rep&lace<Tab>:s 查找和替换(&L)<Tab>:s +menutrans Settings\ &Window 设置窗口(&W) +menutrans Startup\ &Settings 启动设置(&S) " Edit/Global Settings -menutrans &Global\ Settings 全局设置(&G) +menutrans &Global\ Settings 全局设置(&G) " Edit.Global Settings menuitems and dialogs {{{2 -menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! 开/关高亮查找内容(&H)<Tab>:set\ hls! -menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! 开/关忽略大小写(&I)<Tab>:set\ ic! -menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! 开/关显示括号匹配(&S)<Tab>:set\ sm! -menutrans &Context\ Lines 上下文行数(&C) -menutrans &Virtual\ Edit 虚拟编辑(&V) +menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! 开/关高亮查找内容(&H)<Tab>:set\ hls! +menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! 开/关忽略大小写(&I)<Tab>:set\ ic! +menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! 开/关显示括号匹配(&S)<Tab>:set\ sm! +menutrans &Context\ Lines 上下文行数(&C) +menutrans &Virtual\ Edit 虚拟编辑(&V) " Edit.Global Settings.Virtual Edit menuitems {{{3 -menutrans Never 从不 -menutrans Block\ Selection 只在选定矩形块时 -menutrans Insert\ Mode 只在插入模式时 -menutrans Block\ and\ Insert 在选定矩形块和插入模式时 -menutrans Always 始终 +menutrans Never 从不 +menutrans Block\ Selection 只在选定矩形块时 +menutrans Insert\ Mode 只在插入模式时 +menutrans Block\ and\ Insert 在选定矩形块和插入模式时 +menutrans Always 始终 " }}} -menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! 开/关插入模式(&M)<Tab>:set\ im! -menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! 开/关\ Vi\ 兼容性(&O)<Tab>:set\ cp! -menutrans Search\ &Path\.\.\. 搜索路径(&P)\.\.\. -menutrans Ta&g\ Files\.\.\. 标记文件(Tags)(&G)\.\.\. +menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! 开/关插入模式(&M)<Tab>:set\ im! +menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! 开/关\ Vi\ 兼容性(&O)<Tab>:set\ cp! +menutrans Search\ &Path\.\.\. 搜索路径(&P)\.\.\. +menutrans Ta&g\ Files\.\.\. 标记文件(Tags)(&G)\.\.\. " GUI options -menutrans Toggle\ &Toolbar 开/关工具栏(&T) -menutrans Toggle\ &Bottom\ Scrollbar 开/关底部滚动条(&B) -menutrans Toggle\ &Left\ Scrollbar 开/关左侧滚动条(&L) -menutrans Toggle\ &Right\ Scrollbar 开/关右侧滚动条(&R) +menutrans Toggle\ &Toolbar 开/关工具栏(&T) +menutrans Toggle\ &Bottom\ Scrollbar 开/关底部滚动条(&B) +menutrans Toggle\ &Left\ Scrollbar 开/关左侧滚动条(&L) +menutrans Toggle\ &Right\ Scrollbar 开/关右侧滚动条(&R) " fun! s:SearchP() if !exists("g:menutrans_path_dialog") @@ -109,23 +115,23 @@ endif " }}} " Edit/File Settings -menutrans F&ile\ Settings 文件设置(&I) +menutrans F&ile\ Settings 文件设置(&I) " Edit.File Settings menuitems and dialogs {{{2 " Boolean options -menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! 开/关行号(&N)<Tab>:set\ nu! -menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! 开/关相对行号(&V)<Tab>:set\ rnu! -menutrans Toggle\ &List\ Mode<Tab>:set\ list! 开/关列表模式(&L)<Tab>:set\ list! -menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! 开/关换行(&W)<Tab>:set\ wrap! -menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! 开/关词尾换行(&R)<Tab>:set\ lbr! -menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! 开/关制表符扩展(&E)<Tab>:set\ et! -menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! 开/关自动缩进(&A)<Tab>:set\ ai! -menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! 开/关\ C\ 语言式缩进(&C)<Tab>:set\ cin! +menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! 开/关行号(&N)<Tab>:set\ nu! +menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! 开/关相对行号(&V)<Tab>:set\ rnu! +menutrans Toggle\ &List\ Mode<Tab>:set\ list! 开/关列表模式(&L)<Tab>:set\ list! +menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! 开/关换行(&W)<Tab>:set\ wrap! +menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! 开/关词尾换行(&R)<Tab>:set\ lbr! +menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! 开/关制表符扩展(&E)<Tab>:set\ et! +menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! 开/关自动缩进(&A)<Tab>:set\ ai! +menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! 开/关\ C\ 语言式缩进(&C)<Tab>:set\ cin! " other options -menutrans &Shiftwidth 缩进宽度(&S) -menutrans Soft\ &Tabstop 软制表位宽度(Soft\ Tabstop)(&T) -menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\. -menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\. +menutrans &Shiftwidth 缩进宽度(&S) +menutrans Soft\ &Tabstop 软制表位宽度(Soft\ Tabstop)(&T) +menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\. +menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\. " fun! s:TextWidth() if !exists("g:menutrans_textwidth_dialog") @@ -140,36 +146,36 @@ if !exists("g:menutrans_fileformat_choices") let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n取消(&C)" endif " }}} -menutrans Show\ C&olor\ Schemes\ in\ Menu 在菜单中显示配色方案(&O) -menutrans C&olor\ Scheme 配色方案(&O) -menutrans Show\ &Keymaps\ in\ Menu 在菜单中显示键盘映射(&K) -menutrans &Keymap 键盘映射(&K) -menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\. +menutrans Show\ C&olor\ Schemes\ in\ Menu 在菜单中显示配色方案(&O) +menutrans C&olor\ Scheme 配色方案(&O) +menutrans Show\ &Keymaps\ in\ Menu 在菜单中显示键盘映射(&K) +menutrans &Keymap 键盘映射(&K) +menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\. " }}} " Programming menu -menutrans &Tools 工具(&T) +menutrans &Tools 工具(&T) " Tools menuitems {{{1 -menutrans &Jump\ to\ This\ Tag<Tab>g^] 跳转到这个标记(Tag)(&J)<Tab>g^] -menutrans Jump\ &Back<Tab>^T 跳转回(&B)<Tab>^T -menutrans Build\ &Tags\ File 生成标记文件(Tags)(&T) +menutrans &Jump\ to\ This\ Tag<Tab>g^] 跳转到这个标记(Tag)(&J)<Tab>g^] +menutrans Jump\ &Back<Tab>^T 跳转回(&B)<Tab>^T +menutrans Build\ &Tags\ File 生成标记文件(Tags)(&T) " Tools.Spelling Menu -menutrans &Spelling 拼写检查(&S) +menutrans &Spelling 拼写检查(&S) " Tools.Spelling menuitems and dialog {{{2 -menutrans &Spell\ Check\ On 打开拼写检查(&S) -menutrans Spell\ Check\ &Off 关闭拼写检查(&O) -menutrans To\ &Next\ Error<Tab>]s 上一个错误(&N)<Tab>]s -menutrans To\ &Previous\ Error<Tab>[s 下一个错误(&P)<Tab>[s -menutrans Suggest\ &Corrections<Tab>z= 更正建议(&C)<Tab>z= -menutrans &Repeat\ Correction<Tab>:spellrepall 更正全部同类错误(&R)<Tab>:spellrepall -menutrans Set\ Language\ to\ "en" 设置语言为\ "en" -menutrans Set\ Language\ to\ "en_au" 设置语言为\ "en_au" -menutrans Set\ Language\ to\ "en_ca" 设置语言为\ "en_ca" -menutrans Set\ Language\ to\ "en_gb" 设置语言为\ "en_gb" -menutrans Set\ Language\ to\ "en_nz" 设置语言为\ "en_nz" -menutrans Set\ Language\ to\ "en_us" 设置语言为\ "en_us" -menutrans &Find\ More\ Languages 查找更多语言(&F) +menutrans &Spell\ Check\ On 打开拼写检查(&S) +menutrans Spell\ Check\ &Off 关闭拼写检查(&O) +menutrans To\ &Next\ Error<Tab>]s 上一个错误(&N)<Tab>]s +menutrans To\ &Previous\ Error<Tab>[s 下一个错误(&P)<Tab>[s +menutrans Suggest\ &Corrections<Tab>z= 更正建议(&C)<Tab>z= +menutrans &Repeat\ Correction<Tab>:spellrepall 更正全部同类错误(&R)<Tab>:spellrepall +menutrans Set\ Language\ to\ "en" 设置语言为\ "en" +menutrans Set\ Language\ to\ "en_au" 设置语言为\ "en_au" +menutrans Set\ Language\ to\ "en_ca" 设置语言为\ "en_ca" +menutrans Set\ Language\ to\ "en_gb" 设置语言为\ "en_gb" +menutrans Set\ Language\ to\ "en_nz" 设置语言为\ "en_nz" +menutrans Set\ Language\ to\ "en_us" 设置语言为\ "en_us" +menutrans &Find\ More\ Languages 查找更多语言(&F) " func! s:SpellLang() if !exists("g:menutrans_set_lang_to") @@ -178,113 +184,113 @@ endif " }}} " Tools.Fold Menu -menutrans &Folding 折叠(&F) +menutrans &Folding 折叠(&F) " Tools.Fold menuitems {{{2 " open close folds -menutrans &Enable/Disable\ Folds<Tab>zi 启用/禁用折叠(&E)<Tab>zi -menutrans &View\ Cursor\ Line<Tab>zv 展开光标所在行(&V)<Tab>zv -menutrans Vie&w\ Cursor\ Line\ Only<Tab>zMzx 只展开光标所在行(&W)<Tab>zMzx -menutrans C&lose\ More\ Folds<Tab>zm 折叠一级(&L)<Tab>zm -menutrans &Close\ All\ Folds<Tab>zM 折叠全部(&C)<Tab>zM -menutrans O&pen\ More\ Folds<Tab>zr 展开一级(&P)<Tab>zr -menutrans &Open\ All\ Folds<Tab>zR 展开全部(&O)<Tab>zR +menutrans &Enable/Disable\ Folds<Tab>zi 启用/禁用折叠(&E)<Tab>zi +menutrans &View\ Cursor\ Line<Tab>zv 展开光标所在行(&V)<Tab>zv +menutrans Vie&w\ Cursor\ Line\ Only<Tab>zMzx 只展开光标所在行(&W)<Tab>zMzx +menutrans C&lose\ More\ Folds<Tab>zm 折叠一级(&L)<Tab>zm +menutrans &Close\ All\ Folds<Tab>zM 折叠全部(&C)<Tab>zM +menutrans O&pen\ More\ Folds<Tab>zr 展开一级(&P)<Tab>zr +menutrans &Open\ All\ Folds<Tab>zR 展开全部(&O)<Tab>zR " fold method -menutrans Fold\ Met&hod 折叠方式(&H) +menutrans Fold\ Met&hod 折叠方式(&H) " Tools.Fold.Fold Method menuitems {{{3 -menutrans M&anual 手动(&A) -menutrans I&ndent 缩进(&N) -menutrans E&xpression 表达式(&X) -menutrans S&yntax 语法(&Y) -menutrans &Diff 差异(Diff)(&D) -menutrans Ma&rker 记号(Marker)(&R) +menutrans M&anual 手动(&A) +menutrans I&ndent 缩进(&N) +menutrans E&xpression 表达式(&X) +menutrans S&yntax 语法(&Y) +menutrans &Diff 差异(Diff)(&D) +menutrans Ma&rker 记号(Marker)(&R) " }}} " create and delete folds -menutrans Create\ &Fold<Tab>zf 创建折叠(&F)<Tab>zf -menutrans &Delete\ Fold<Tab>zd 删除折叠(&D)<Tab>zd -menutrans Delete\ &All\ Folds<Tab>zD 删除全部折叠(&A)<Tab>zD +menutrans Create\ &Fold<Tab>zf 创建折叠(&F)<Tab>zf +menutrans &Delete\ Fold<Tab>zd 删除折叠(&D)<Tab>zd +menutrans Delete\ &All\ Folds<Tab>zD 删除全部折叠(&A)<Tab>zD " moving around in folds -menutrans Fold\ Col&umn\ Width 折叠操作栏宽度(&W) +menutrans Fold\ Col&umn\ Width 折叠操作栏宽度(&W) " }}} " Tools.Diff Menu -menutrans &Diff 差异(Diff)(&D) +menutrans &Diff 差异(Diff)(&D) " Tools.Diff menuitems {{{2 -menutrans &Update 刷新(&U) -menutrans &Get\ Block 采用对侧文本块(&G) -menutrans &Put\ Block 采用本侧文本块(&P) +menutrans &Update 刷新(&U) +menutrans &Get\ Block 采用对侧文本块(&G) +menutrans &Put\ Block 采用本侧文本块(&P) " }}} -menutrans &Make<Tab>:make 生成(Make)(&M)<Tab>:make -menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl -menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl! -menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn -menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp -menutrans &Older\ List<Tab>:cold 较旧的错误列表(&O)<Tab>:cold -menutrans N&ewer\ List<Tab>:cnew 较新的错误列表(&E)<Tab>:cnew -menutrans Error\ &Window 错误窗口(&W) +menutrans &Make<Tab>:make 生成(Make)(&M)<Tab>:make +menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl +menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl! +menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn +menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp +menutrans &Older\ List<Tab>:cold 较旧的错误列表(&O)<Tab>:cold +menutrans N&ewer\ List<Tab>:cnew 较新的错误列表(&E)<Tab>:cnew +menutrans Error\ &Window 错误窗口(&W) " Tools.Error Window menuitems {{{2 -menutrans &Update<Tab>:cwin 刷新(&U)<Tab>:cwin -menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen -menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose +menutrans &Update<Tab>:cwin 刷新(&U)<Tab>:cwin +menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen +menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose " }}} -menutrans Show\ Compiler\ Se&ttings\ in\ Menu 在菜单中显示编译器设置(&T) -menutrans Se&t\ Compiler 设置编译器(&T) -menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制(&C)<Tab>:%!xxd -menutrans Conve&rt\ Back<Tab>:%!xxd\ -r 转换回(&R)<Tab>:%!xxd\ -r +menutrans Show\ Compiler\ Se&ttings\ in\ Menu 在菜单中显示编译器设置(&T) +menutrans Se&t\ Compiler 设置编译器(&T) +menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制(&C)<Tab>:%!xxd +menutrans Conve&rt\ Back<Tab>:%!xxd\ -r 转换回(&R)<Tab>:%!xxd\ -r " }}} " Buffer menu -menutrans &Buffers 缓冲区(&B) +menutrans &Buffers 缓冲区(&B) " Buffer menuitems and dialog {{{1 -menutrans &Refresh\ Menu 刷新本菜单(&R) -menutrans &Delete 删除(&D) -menutrans &Alternate 切换(&A) -menutrans &Next 下一个(&N) -menutrans &Previous 上一个(&P) +menutrans &Refresh\ Menu 刷新本菜单(&R) +menutrans &Delete 删除(&D) +menutrans &Alternate 切换(&A) +menutrans &Next 下一个(&N) +menutrans &Previous 上一个(&P) -" func! s:BMMunge(fname, bnum) +" func! s:BMMunge(fname, bnum) if !exists("g:menutrans_no_file") let g:menutrans_no_file = "[无文件]" endif " }}} " Window menu -menutrans &Window 窗口(&W) +menutrans &Window 窗口(&W) " Window menuitems {{{1 -menutrans &New<Tab>^Wn 新建(&N)<Tab>^Wn -menutrans S& |