# HG changeset patch # User Christian Brabandt # Date 1521381607 -3600 # Node ID 9eebe457eb3c8d598547a455c1faa906a7319ebe # Parent cd85b03c9fe2ec62d5050bfbf8bd4250b7a5b662 Update runtime files. Convert a couple of help files to utf-8. commit https://github.com/vim/vim/commit/98ef233e14faaaf42e0342da1803d493ce0337b2 Author: Bram Moolenaar Date: Sun Mar 18 14:44:37 2018 +0100 Update runtime files. Convert a couple of help files to utf-8. diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 8.0. Last change: 2018 Mar 05 +*autocmd.txt* For Vim version 8.0. Last change: 2018 Mar 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -56,6 +56,8 @@ 2. Defining autocommands *autocmd-def 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, so that the autocommands execute in the order in which they were given. See |autocmd-nested| for [nested]. @@ -91,7 +93,8 @@ will appear twice. To avoid this, defin that you can easily clear them: > augroup vimrc - autocmd! " Remove all vimrc autocommands + " Remove all vimrc autocommands + autocmd! au BufNewFile,BufRead *.html so :h/html.vim augroup END @@ -145,6 +148,8 @@ 3. Removing autocommands *autocmd-rem plugins, syntax highlighting, etc. :au[tocmd]! [group] Remove ALL autocommands. + Note: a quote will be seen as argument to the :autocmd + and won't start a comment. Warning: You should normally not do this without a group, it breaks plugins, syntax highlighting, etc. @@ -329,10 +334,6 @@ Name triggered by ~ |CmdlineEnter| after the cursor moves to the command line |CmdlineLeave| before the cursor leaves the command line -|CmdlineChanged| after a change was made to the command-line text -|CmdlineEnter| after the cursor moves to the command line -|CmdlineLeave| before the cursor leaves the command line - |InsertEnter| starting Insert mode |InsertChange| when typing while in Insert or Replace mode |InsertLeave| when leaving Insert mode diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2018 Mar 10 +*eval.txt* For Vim version 8.0. Last change: 2018 Mar 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2192,7 +2192,7 @@ gettabvar({nr}, {varname} [, {def}]) gettabwinvar({tabnr}, {winnr}, {name} [, {def}]) any {name} in {winnr} in tab page {tabnr} getwininfo([{winid}]) List list of windows -getwinpos([{tmeout}]) List X and Y coord in pixels of the Vim window +getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window getwinposx() Number X coord in pixels of the Vim window getwinposy() Number Y coord in pixels of the Vim window getwinvar({nr}, {varname} [, {def}]) @@ -3172,8 +3172,8 @@ char2nr({expr} [, {utf8}]) *char2nr( char2nr("ABC") returns 65 < When {utf8} is omitted or zero, the current 'encoding' is used. Example for "utf-8": > - char2nr("á") returns 225 - char2nr("á"[0]) returns 195 + 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. @@ -9236,6 +9236,8 @@ visualextra Compiled with extra Visual |blockwise-operators|. vms VMS version of Vim. vreplace Compiled with |gR| and |gr| commands. +vtp Compiled for vcon support |+vtp| (check vcon to find + out if it works in the current console)). wildignore Compiled with 'wildignore' option. wildmenu Compiled with 'wildmenu' option. win32 Win32 version of Vim (MS-Windows 95 and later, 32 or @@ -9474,8 +9476,7 @@ may be larger. It is also possible to define a function without any arguments. You must still supply the () then. -It is allowed to define another function inside a function -body. +It is allowed to define another function inside a function body. *local-variables* Inside a function local variables can be used. These will disappear when the diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt --- a/runtime/doc/if_ruby.txt +++ b/runtime/doc/if_ruby.txt @@ -1,4 +1,4 @@ -*if_ruby.txt* For Vim version 8.0. Last change: 2016 Sep 01 +*if_ruby.txt* For Vim version 8.0. Last change: 2018 Mar 15 VIM REFERENCE MANUAL by Shugo Maeda @@ -221,6 +221,9 @@ for sure edit "gvim.exe" and search for If you want to build Vim with RubyInstaller 1.9 or 2.X using MSVC, you need some tricks. See the src/INSTALLpc.txt for detail. +If Vim is built with RubyInstaller 2.4 or later, you may also need to add +"C:\Ruby\bin\ruby_builtin_dlls" to the PATH environment variable. + Unix ~ diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.0. Last change: 2018 Mar 09 +*options.txt* For Vim version 8.0. Last change: 2018 Mar 13 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 8.0. Last change: 2018 Feb 04 +*pattern.txt* For Vim version 8.0. Last change: 2018 Mar 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1166,7 +1166,8 @@ x A single character, with no special me - Matching with a collection can be slow, because each character in the text has to be compared with each character in the collection. Use one of the other atoms above when possible. Example: "\d" is - much faster than "[0-9]" and matches the same characters. + much faster than "[0-9]" and matches the same characters. However, + the new |NFA| regexp engine deals with this better than the old one. */\%[]* *E69* *E70* *E369* \%[] A sequence of optionally matched atoms. This always matches. diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 8.0. Last change: 2018 Mar 01 +*starting.txt* For Vim version 8.0. Last change: 2018 Mar 14 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -294,6 +294,7 @@ 'gfw' options.txt /*'gfw'* 'ghr' options.txt /*'ghr'* 'go' options.txt /*'go'* +'go-!' options.txt /*'go-!'* 'go-A' options.txt /*'go-A'* 'go-F' options.txt /*'go-F'* 'go-L' options.txt /*'go-L'* @@ -4600,6 +4601,7 @@ EncodingChanged autocmd.txt /*EncodingCh Eterm syntax.txt /*Eterm* Ex intro.txt /*Ex* Ex-mode intro.txt /*Ex-mode* +ExitPre autocmd.txt /*ExitPre* Exuberant_ctags tagsrch.txt /*Exuberant_ctags* F motion.txt /*F* FALSE eval.txt /*FALSE* @@ -4830,6 +4832,7 @@ Tcl if_tcl.txt /*Tcl* TermChanged autocmd.txt /*TermChanged* TermResponse autocmd.txt /*TermResponse* Terminal-mode terminal.txt /*Terminal-mode* +TerminalOpen autocmd.txt /*TerminalOpen* TextChanged autocmd.txt /*TextChanged* TextChangedI autocmd.txt /*TextChangedI* TextChangedP autocmd.txt /*TextChangedP* @@ -8928,6 +8931,7 @@ term_gettty() eval.txt /*term_gettty()* term_list() eval.txt /*term_list()* term_scrape() eval.txt /*term_scrape()* term_sendkeys() eval.txt /*term_sendkeys()* +term_setkill() eval.txt /*term_setkill()* term_setrestore() eval.txt /*term_setrestore()* term_setsize() eval.txt /*term_setsize()* term_start() eval.txt /*term_start()* diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.0. Last change: 2018 Mar 10 +*terminal.txt* For Vim version 8.0. Last change: 2018 Mar 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -99,9 +99,14 @@ themselves (like Vim does). To change the keys you type use terminal mode mappings, see |:tmap|. These are defined like any mapping, but apply only when typing keys that are -sent to the job running in the terminal. For example, to make Escape switch +sent to the job running in the terminal. For example, to make F1 switch to Terminal-Normal mode: > + tnoremap N +You can use Esc, but you need to make sure it won't cause other keys to +break: > tnoremap N + set notimeout ttimeout timeoutlen=100 + < *options-in-terminal* After opening the terminal window and setting 'buftype' to "terminal" the BufWinEnter autocommand event is triggered. This makes it possible to set @@ -408,7 +413,7 @@ an expected screen dump. Vim uses the window size, text, color and other attributes as displayed. The Vim screen size, font and other properties do not matter. Therefore this -mechanism is portable across systems. A convential screenshot would reflect +mechanism is portable across systems. A conventional screenshot would reflect all differences, including font size and family. @@ -483,9 +488,9 @@ 2. The difference between the first and 3. The contents of the second dump You can usually see what differs in the second part. Use the 'ruler' to -relate it to the postion in the first or second dump. +relate it to the position in the first or second dump. -Alternatively, press "s" to swap the first and second dump. Do this everal +Alternatively, press "s" to swap the first and second dump. Do this several times so that you can spot the difference in the context of the text. ============================================================================== @@ -659,7 +664,8 @@ invoking `:Termdebug`: > let termdebugger = "mygdb" < *gdb-version* Only debuggers fully compatible with gdb will work. Vim uses the GDB/MI -interface. This probably requires gdb version 7.12. if you get this error: +interface. The "new-ui" command requires gdb version 7.12 or later. if you +get this error: Undefined command: "new-ui". Try "help".~ Then your gdb is too old. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.0. Last change: 2018 Mar 09 +*todo.txt* For Vim version 8.0. Last change: 2018 Mar 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,11 +35,11 @@ entered there will not be repeated below *known-bugs* -------------------- Known bugs and current work ----------------------- -No maintainer for Vietnamese translations. -No maintainer for Simplified Chinese translations. - Terminal emulator window: -- Lots of stuff to implement, see src/terminal.c +- Still some stuff to implement and bugs to fix, see src/terminal.c +- Crash when using popup menu while balloon is visible? +- Test_terminal_qall_kill_func if flaky +- Drop options argument of term_dumpdiff() / termp_dumpload() ? Mode message isn't updated on vertical split. (Alexei Averchenko, 2018 Feb 2, #2611) @@ -47,12 +47,16 @@ Mode message isn't updated on vertical s Errors found with random data: heap-buffer-overflow in alist_add (#2472) +Implement option_save() and option_restore(). + Compiler warnings (geeknik, 2017 Oct 26): - signed integer overflow in do_sub() (#2249) - signed integer overflow in get_address() (#2248) - signed integer overflow in getdecchrs() (#2254) - undefined left shift in get_string_tv() (#2250) +Mouse pointer sticks to stop shape. Only on Windows GUI? #2709 + balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec 20, #2481) Also see #2352, want better control over balloon, perhaps set the position. @@ -62,6 +66,9 @@ Try out background make plugin: or asyncmake: https://github.com/yegappan/asyncmake +Add a ModeChanged autocommand that has an argument indicating the old and new +mode. Also used for switching Terminal mode. + Cursor in status line after search. (#2530) Cursor in wrong position when line wraps. (#2540) @@ -79,6 +86,9 @@ Jan 15, #2555) Check argument of systemlist(). (Pavlov) +No maintainer for Vietnamese translations. +No maintainer for Simplified Chinese translations. + When 'inchsearch' and 'hlsearch' are set /\v highlights everything. Also see #2337 @@ -91,6 +101,9 @@ first. Add the debug command line history to viminfo. +Avoid that "sign unplace id" does a redraw right away, esp. when there is a +sequence of these commands. (Andy Stewart, 2018 Mar 16) + ch_sendraw() with long string does not try to read inbetween, which may cause a deadlock if the reading side is waiting for the write to finish. (Nate Bosch, 2018 Jan 13, #2548) @@ -186,9 +199,6 @@ Ask whether to use Windows or Vim key be Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017 Nov 21) -Add a ModeChanged autocommand that has an argument indicating the old and new -mode. Also used for switching Terminal mode. - When using command line window, CmdlineLeave is triggered without CmdlineEnter. (xtal8, 2017 Oct 30, #2263) Add some way to get the nested state. Although CmdwinEnter is obviously @@ -1087,7 +1097,7 @@ Patch: On MS-Windows shellescape() may h (Ingo Karkat, 2015 Jan 16) Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15) -Update 2016 Jun 10, # 857 +Update 2018 March 12, #2711 Redo only remembers the last change. Could use "{count}g." to redo an older change. How does the user know which change? At least have a way to list diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt --- a/runtime/doc/usr_24.txt +++ b/runtime/doc/usr_24.txt @@ -1,4 +1,4 @@ -*usr_24.txt* For Vim version 8.0. Last change: 2006 Jul 23 +*usr_24.txt* For Vim version 8.0. Last change: 2018 Mar 18 VIM USER MANUAL - by Bram Moolenaar @@ -538,8 +538,8 @@ a 16 bit and a 32 bit number (e.g., for *24.9* Digraphs Some characters are not on the keyboard. For example, the copyright character -(©). To type these characters in Vim, you use digraphs, where two characters -represent one. To enter a ©, for example, you press three keys: > +(©). To type these characters in Vim, you use digraphs, where two characters +represent one. To enter a ©, for example, you press three keys: > CTRL-K Co @@ -549,12 +549,12 @@ To find out what digraphs are available, Vim will display the digraph table. Here are three lines of it: - AC ~_ 159 NS | 160 !I ¡ 161 Ct ¢ 162 Pd £ 163 Cu ¤ 164 Ye ¥ 165 ~ - BB ¦ 166 SE § 167 ': ¨ 168 Co © 169 -a ª 170 << « 171 NO ¬ 172 ~ - -- ­ 173 Rg ® 174 'm ¯ 175 DG ° 176 +- ± 177 2S ² 178 3S ³ 179 ~ + AC ~_ 159 NS | 160 !I ¡ 161 Ct ¢ 162 Pd £ 163 Cu ¤ 164 Ye Â¥ 165 ~ + BB ¦ 166 SE § 167 ': ¨ 168 Co © 169 -a ª 170 << « 171 NO ¬ 172 ~ + -- ­ 173 Rg ® 174 'm ¯ 175 DG ° 176 +- ± 177 2S ² 178 3S ³ 179 ~ This shows, for example, that the digraph you get by typing CTRL-K Pd is the -character (£). This is character number 163 (decimal). +character (£). This is character number 163 (decimal). Pd is short for Pound. Most digraphs are selected to give you a hint about the character they will produce. If you look through the list you will understand the logic. @@ -569,9 +569,9 @@ that combination. Thus CTRL-K dP also w You can define your own digraphs. Example: > - :digraph a" ä + :digraph a" ä -This defines that CTRL-K a" inserts an ä character. You can also specify the +This defines that CTRL-K a" inserts an ä character. You can also specify the character with a decimal number. This defines the same digraph: > :digraph a" 228 diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 8.0. Last change: 2018 Mar 04 +*various.txt* For Vim version 8.0. Last change: 2018 Mar 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -429,7 +429,7 @@ N *+reltime* |reltime()| function, 'hl B *+rightleft* Right to left typing |'rightleft'| m *+ruby* Ruby interface |ruby| m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn| -N *+scrollbind* |'scrollbind'| +T *+scrollbind* |'scrollbind'| B *+signs* |:sign| N *+smartindent* |'smartindent'| N *+startuptime* |--startuptime| argument diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,4 +1,4 @@ -*version6.txt* For Vim version 8.0. Last change: 2014 Aug 29 +*version6.txt* For Vim version 8.0. Last change: 2018 Mar 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -6103,7 +6103,7 @@ New tutor translations: Slovak (Lubos Celko) Greek (Christos Kontas) German (Joachim Hofmann) - Norwegian (Øyvind Holm) + Norwegian (Øyvind Holm) New filetype plugins: Occam (Mario Schweigler) @@ -6121,13 +6121,13 @@ New compiler plugins: Modelsim vcom (Paul Baleme) New menu translations: - Brazilian (José de Paula) + Brazilian (José de Paula) British (Mike Williams) Korean in UTF-8. (Nam SungHyun) - Norwegian (Øyvind Holm) + Norwegian (Øyvind Holm) Serbian (Aleksandar Jelenak) -New message translation for Norwegian. (Øyvind Holm) +New message translation for Norwegian. (Øyvind Holm) New color scheme: desert (Hans Fugal) @@ -10066,7 +10066,7 @@ Files: src/os_unix.c Patch 6.2.019 (lang) Problem: Loading the Portuguese menu causes an error message. -Solution: Join two lines. (Jose Pedro Oliveira, José de Paula) +Solution: Join two lines. (Jose Pedro Oliveira, José de Paula) Files: runtime/lang/menu_pt_br.vim Patch 6.2.020 @@ -12418,7 +12418,7 @@ Files: src/message.c Patch 6.2.376 Problem: Win32: Ruby interface cannot be dynamically linked with Ruby 1.6. -Solution: Add #ifdefs around use of rb_w32_snprintf(). (Benoît Cerrina) +Solution: Add #ifdefs around use of rb_w32_snprintf(). (Benoît Cerrina) Files: src/if_ruby.c Patch 6.2.377 (after 6.2.372) @@ -14320,7 +14320,7 @@ Files: src/edit.c Patch 6.3.061 Problem: When editing a utf-8 file in an utf-8 xterm and there is a multi-byte character in the last column, displaying is messed up. - (Joël Rio) + (Joël Rio) Solution: Check for a multi-byte character, not a multi-column character. Files: src/screen.c diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -3,7 +3,7 @@ " Maintainer: Tom Picton " Previous Maintainer: James Sully " Previous Maintainer: Johannes Zellner -" Last Change: Wed, 20 December 2017 +" Last Change: Sun, 18 March 2018 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -14,7 +14,25 @@ set cpo&vim setlocal cinkeys-=0# setlocal indentkeys-=0# setlocal include=^\\s*\\(from\\\|import\\) -setlocal includeexpr=substitute(v:fname,'\\.','/','g') + +" For imports with leading .., append / and replace additional .s with ../ +let b:grandparent_match = '^\(.\.\)\(\.*\)' +let b:grandparent_sub = '\=submatch(1)."/".repeat("../",strlen(submatch(2)))' + +" For imports with a single leading ., replace it with ./ +let b:parent_match = '^\.\(\.\)\@!' +let b:parent_sub = './' + +" Replace any . sandwiched between word characters with / +let b:child_match = '\(\w\)\.\(\w\)' +let b:child_sub = '\1/\2' + +setlocal includeexpr=substitute(substitute(substitute( + \v:fname, + \b:grandparent_match,b:grandparent_sub,''), + \b:parent_match,b:parent_sub,''), + \b:child_match,b:child_sub,'g') + setlocal suffixesadd=.py setlocal comments=b:#,fb:- setlocal commentstring=#\ %s diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula -" Last Change: 2018 Mar 09 +" Last Change: 2018 Mar 12 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -233,9 +233,9 @@ call s:AddITags(s:indent_tags, [ call s:AddITags(s:indent_tags, [ \ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas', \ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption', - \ 'figure', 'footer', 'header', 'keygen', 'mark', 'meter', 'nav', 'output', - \ 'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 'svg', - \ 'time', 'track', 'video', 'wbr']) + \ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter', + \ 'nav', 'output', 'progress', 'rp', 'rt', 'ruby', 'section', 'source', + \ 'summary', 'svg', 'time', 'track', 'video', 'wbr']) " Tags added for web components: call s:AddITags(s:indent_tags, [