Mercurial > vim
changeset 13051:a6d3e2081544
Update runtime files
commit https://github.com/vim/vim/commit/f0b03c4e98f8a7184d8b4a5d702cbcd602426923
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 17 17:17:07 2017 +0100
Update runtime files
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Dec 2017 17:30:05 +0100 |
parents | 2615e7a87cb2 |
children | 16b241634614 |
files | runtime/autoload/dist/ft.vim runtime/doc/autocmd.txt runtime/doc/eval.txt runtime/doc/filetype.txt runtime/doc/options.txt runtime/doc/quickfix.txt runtime/doc/repeat.txt runtime/doc/tags runtime/doc/terminal.txt runtime/doc/todo.txt runtime/doc/usr_41.txt runtime/filetype.vim runtime/ftplugin/vim.vim runtime/ftplugin/zimbu.vim runtime/indent/javascript.vim runtime/pack/dist/opt/termdebug/plugin/termdebug.vim runtime/syntax/apachestyle.vim runtime/syntax/haskell.vim runtime/syntax/html.vim runtime/syntax/tex.vim runtime/syntax/vim.vim |
diffstat | 21 files changed, 287 insertions(+), 195 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -1,7 +1,7 @@ " Vim functions for file type detection " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Nov 11 +" Last Change: 2017 Dec 05 " These functions are moved here from runtime/filetype.vim to make startup " faster. @@ -618,7 +618,11 @@ func dist#ft#FTperl() setf perl return 1 endif - if search('^use\s\s*\k', 'nc', 30) + let save_cursor = getpos('.') + call cursor(1,1) + let has_use = search('^use\s\s*\k', 'c', 30) + call setpos('.', save_cursor) + if has_use setf perl return 1 endif
--- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 8.0. Last change: 2017 Nov 05 +*autocmd.txt* For Vim version 8.0. Last change: 2017 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -957,7 +957,7 @@ TextChangedI After a change was made t current buffer in Insert mode. Not triggered when the popup menu is visible. Otherwise the same as TextChanged. - |TextYankPost| + *TextYankPost* TextYankPost After text has been yanked or deleted in the current buffer. The following values of |v:event| can be used to determine the operation @@ -976,7 +976,6 @@ TextYankPost After text has been yanke called recursively. It is not allowed to change the buffer text, see |textlock|. - *User* User Never executed automatically. To be used for autocommands that are only executed with
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2017 Dec 09 +*eval.txt* For Vim version 8.0. Last change: 2017 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2276,6 +2276,8 @@ mode([expr]) String current editing mo mzeval({expr}) any evaluate |MzScheme| expression nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr} +option_restore({list}) none restore options saved by option_save() +option_save({list}) List save options values or({expr}, {expr}) Number bitwise OR pathshorten({expr}) String shorten directory names in a path perleval({expr}) any evaluate |Perl| expression @@ -6114,6 +6116,31 @@ nr2char({expr} [, {utf8}]) *nr2char() characters. nr2char(0) is a real NUL and terminates the string, thus results in an empty string. +option_restore({list}) *option_restore()* + Restore options previously saved by option_save(). + When buffer-local options have been saved, this function must + be called when the same buffer is the current buffer. + When window-local options have been saved, this function must + be called when the same window is the current window. + When in the wrong buffer and/or window an error is given and + the local options won't be restored. + NOT IMPLEMENTED YET! + +option_save({list}) *option_save()* + Saves the options named in {list}. The returned value can be + passed to option_restore(). Example: > + let s:saved_options = option_save([ + \ 'ignorecase', + \ 'iskeyword', + \ ]) + au <buffer> BufLeave * + \ call option_restore(s:saved_options) +< The advantage over using `:let` is that global and local + values are handled and the script ID is restored, so that + `:verbose set` will show where the option was originally set, + not where it was restored. + NOT IMPLEMENTED YET! + or({expr}, {expr}) *or()* Bitwise OR on the two arguments. The arguments are converted to a number. A List, Dict or Float argument causes an error.
--- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 8.0. Last change: 2017 Oct 10 +*filetype.txt* For Vim version 8.0. Last change: 2017 Dec 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -706,4 +706,23 @@ You can change the default by defining t Currently no other formats are recognized. +VIM *ft-vim-plugin* + +The Vim filetype plugin defines mappings to move to the start and end of +functions with [[ and ]]. Move around comments with ]" and [". + +The mappings can be disabled with: > + let g:no_vim_maps = 1 + + +ZIMBU *ft-zimbu-plugin* + +The Zimbu filetype plugin defines mappings to move to the start and end of +functions with [[ and ]]. + +The mappings can be disabled with: > + let g:no_zimbu_maps = 1 +< + + vim:tw=78:ts=8:ft=help:norl:
--- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.0. Last change: 2017 Nov 26 +*options.txt* For Vim version 8.0. Last change: 2017 Dec 01 VIM REFERENCE MANUAL by Bram Moolenaar
--- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.0. Last change: 2017 Sep 13 +*quickfix.txt* For Vim version 8.0. Last change: 2017 Dec 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -363,7 +363,7 @@ Any Vim type can be associated as a cont The |setqflist()| and the |setloclist()| functions can be used to associate a context with a quickfix and a location list respectively. The |getqflist()| and the |getloclist()| functions can be used to retrieve the context of a -quickifx and a location list respectively. This is useful for a Vim plugin +quickfix and a location list respectively. This is useful for a Vim plugin dealing with multiple quickfix/location lists. Examples: > @@ -376,13 +376,13 @@ Examples: > echo getloclist(2, {'id' : qfid, 'context' : 1}) < *quickfix-parse* -You can parse a list of lines using 'erroformat' without creating or modifying -a quickfix list using the |getqflist()| function. Examples: > +You can parse a list of lines using 'errorformat' without creating or +modifying a quickfix list using the |getqflist()| function. Examples: > echo getqflist({'lines' : ["F1:10:Line10", "F2:20:Line20"]}) echo getqflist({'lines' : systemlist('grep -Hn quickfix *')}) This returns a dictionary where the 'items' key contains the list of quickfix entries parsed from lines. The following shows how to use a custom -'errorformat' to parse the lines without modifying the 'erroformat' option: > +'errorformat' to parse the lines without modifying the 'errorformat' option: > echo getqflist({'efm' : '%f#%l#%m', 'lines' : ['F1#10#Line']}) <
--- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 8.0. Last change: 2017 Jun 10 +*repeat.txt* For Vim version 8.0. Last change: 2017 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -242,6 +242,10 @@ For writing a Vim script, see chapter 41 If the directory pack/*/opt/{name}/after exists it is added at the end of 'runtimepath'. + If loading packages from "pack/*/start" was skipped, + then this directory is searched first: + pack/*/start/{name} ~ + Note that {name} is the directory name, not the name of the .vim file. All the files matching the pattern pack/*/opt/{name}/plugin/**/*.vim ~
--- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4820,6 +4820,7 @@ TermResponse autocmd.txt /*TermResponse* Terminal-mode terminal.txt /*Terminal-mode* TextChanged autocmd.txt /*TextChanged* TextChangedI autocmd.txt /*TextChangedI* +TextYankPost autocmd.txt /*TextYankPost* Transact-SQL ft_sql.txt /*Transact-SQL* U undo.txt /*U* UTF-8 mbyte.txt /*UTF-8* @@ -5869,6 +5870,7 @@ eval() eval.txt /*eval()* eval-examples eval.txt /*eval-examples* eval-sandbox eval.txt /*eval-sandbox* eval.txt eval.txt /*eval.txt* +event-variable eval.txt /*event-variable* eventhandler() eval.txt /*eventhandler()* eview starting.txt /*eview* evim starting.txt /*evim* @@ -6230,6 +6232,7 @@ ft-vb-syntax syntax.txt /*ft-vb-syntax* ft-verilog-indent indent.txt /*ft-verilog-indent* ft-vhdl-indent indent.txt /*ft-vhdl-indent* ft-vim-indent indent.txt /*ft-vim-indent* +ft-vim-plugin filetype.txt /*ft-vim-plugin* ft-vim-syntax syntax.txt /*ft-vim-syntax* ft-xf86conf-syntax syntax.txt /*ft-xf86conf-syntax* ft-xhtml-omni insert.txt /*ft-xhtml-omni* @@ -6237,6 +6240,7 @@ ft-xml-omni insert.txt /*ft-xml-omni* ft-xml-syntax syntax.txt /*ft-xml-syntax* ft-xpm-syntax syntax.txt /*ft-xpm-syntax* ft-yaml-syntax syntax.txt /*ft-yaml-syntax* +ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin* ft-zsh-syntax syntax.txt /*ft-zsh-syntax* ft_ada.txt ft_ada.txt /*ft_ada.txt* ft_rust.txt ft_rust.txt /*ft_rust.txt* @@ -7826,6 +7830,8 @@ option-backslash options.txt /*option-ba option-list quickref.txt /*option-list* option-summary options.txt /*option-summary* option-window options.txt /*option-window* +option_restore() eval.txt /*option_restore()* +option_save() eval.txt /*option_save()* options options.txt /*options* options-changed version5.txt /*options-changed* options-in-terminal terminal.txt /*options-in-terminal* @@ -8058,14 +8064,19 @@ quake.vim syntax.txt /*quake.vim* quickfix quickfix.txt /*quickfix* quickfix-6 version6.txt /*quickfix-6* quickfix-ID quickfix.txt /*quickfix-ID* +quickfix-context quickfix.txt /*quickfix-context* quickfix-directory-stack quickfix.txt /*quickfix-directory-stack* quickfix-error-lists quickfix.txt /*quickfix-error-lists* quickfix-functions usr_41.txt /*quickfix-functions* quickfix-gcc quickfix.txt /*quickfix-gcc* quickfix-manx quickfix.txt /*quickfix-manx* +quickfix-parse quickfix.txt /*quickfix-parse* quickfix-perl quickfix.txt /*quickfix-perl* +quickfix-size quickfix.txt /*quickfix-size* +quickfix-title quickfix.txt /*quickfix-title* quickfix-valid quickfix.txt /*quickfix-valid* quickfix-window quickfix.txt /*quickfix-window* +quickfix-window-ID quickfix.txt /*quickfix-window-ID* quickfix.txt quickfix.txt /*quickfix.txt* quickref quickref.txt /*quickref* quickref.txt quickref.txt /*quickref.txt* @@ -9104,6 +9115,7 @@ v:ctype eval.txt /*v:ctype* v:dying eval.txt /*v:dying* v:errmsg eval.txt /*v:errmsg* v:errors eval.txt /*v:errors* +v:event eval.txt /*v:event* v:exception eval.txt /*v:exception* v:false eval.txt /*v:false* v:fcs_choice eval.txt /*v:fcs_choice* @@ -9471,6 +9483,7 @@ win_getid() eval.txt /*win_getid()* win_gotoid() eval.txt /*win_gotoid()* win_id2tabwin() eval.txt /*win_id2tabwin()* win_id2win() eval.txt /*win_id2win()* +win_screenpos() eval.txt /*win_screenpos()* winbufnr() eval.txt /*winbufnr()* wincol() eval.txt /*wincol()* window windows.txt /*window*
--- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.0. Last change: 2017 Nov 17 +*terminal.txt* For Vim version 8.0. Last change: 2017 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -370,12 +370,14 @@ Starting ~ Load the plugin with this command: > packadd termdebug < *:Termdebug* -To start debugging use `:TermDebug` folowed by the command name, for example: > +To start debugging use `:Termdebug` followed by the command name, for example: > :Termdebug vim This opens two windows: + gdb window A terminal window in which "gdb vim" is executed. Here you can directly interact with gdb. The buffer name is "!gdb". + program window A terminal window for the executed program. When "run" is used in gdb the program I/O will happen in this window, so that it does not interfere with controlling gdb. The buffer @@ -476,14 +478,15 @@ In the window showing the source code th :Continue execute the gdb "continue" command :Stop interrupt the program -The plugin adds a window toolbar with these entries: +If 'mouse' is set the plugin adds a window toolbar with these entries: Step :Step Next :Over Finish :Finish Cont :Continue Stop :Stop Eval :Evaluate -This way you can use the mouse to perform the most common commands. +This way you can use the mouse to perform the most common commands. You need +to have the 'mouse' option set to enable mouse clicks. Inspecting variables ~
--- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.0. Last change: 2017 Nov 29 +*todo.txt* For Vim version 8.0. Last change: 2017 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,13 +35,6 @@ entered there will not be repeated below *known-bugs* -------------------- Known bugs and current work ----------------------- -Motif testgui: -From test_options.vim: -Found errors in Test_set_values(): -Caught exception in Test_set_values(): Vim(set):E596: Invalid font(s): guifont=fixedsys @ /home/mool/vim/vim80/src/testdir/opt_test.vim, line 1153 - -WinBar: balloon shows up for next line - No maintainer for Vietnamese translations. No maintainer for Simplified Chinese translations. @@ -147,9 +140,14 @@ Suggested by Hiroki Kokubun: - [Iceberg](https://github.com/cocopon/iceberg.vim) (my one) - [hybrid](https://github.com/w0ng/vim-hybrid) Include solarized color scheme?, it does not support termguicolors. --> Make check for colorscheme that it's sane. - Sanitized version of pablo (Lifepillar, 2017 Nov 21) +heap use after free. (gy741, #2447) +heap use after free in set_bufref (gy741, #2448) + reproduces with valgrind (Dominique) +heap use after free in getout. (gy741, #2449) + reproduces with valgrind (Dominique) + Compiler warnings (geeknik, 2017 Oct 26): - signed integer overflow in do_sub() (#2249) - signed integer overflow in get_address() (#2248) @@ -157,21 +155,10 @@ Compiler warnings (geeknik, 2017 Oct 26) - signed integer overflow in nfa_regatom() (#2251) - undefined left shift in get_string_tv() (#2250) -patch for: fix SHIFT-Insert on Windows command prompt (Yasuhiro Matsumoto, -#2381) - -Patch for profile log truncating halfway a character. (ichizok, 2017 Nov 28, -#2385) - -WinBar: Maximizing window causes window size to be wrong. (Lifepillar, 2017 -Nov 29, #2356) - -CTRL-A does not work with empty line. (Alex, #2387) -Patch by Hirohito Higashi, 2017 Nov 29. - -'hlsearch' shows empty matches, which means highlighting everything. -Don't do that. For "foo\|" or "\v" -Patch from Christian, 2017 Nov 14. Should still display "$" matches. +Triggering CursorHoldI happens too often in the GUI. (#2451). +Should move code from os_unix.c mch_inchar() up into common use, it's not +really machine specific. Also the part of WaitForChar(), it deals with timers +and is also for all machines. When starting with --clean packages under "start" are not loaded. Make this work: :packadd START {name} similar to :runtime START name @@ -179,6 +166,18 @@ work: :packadd START {name} similar to When using :packadd files under "later" are not used, which is inconsistent with packages under "start". (xtal8, #1994) +Patch to add changedtick var to quickfix list. (Yegappan Lakshmanan, 2017 Nov +18, #2391) + +7 Add a watchpoint in the debug mode: An expression that breaks execution + when evaluating to non-zero. Add the "watchadd expr" command, stop when + the value of the expression changes. ":watchdel" deletes an item, + ":watchlist" lists the items. (Charles Campbell) +Patch by Christian Brabandt, 2016 Jun 10, #859 + +7 Make "ga" show the digraph for a character, if it exists. +Patch from Christian Brabandt, 2011 Aug 19. + Fold at end of the buffer behaves inconsistently. (James McCoy, 2017 Oct 9) With foldmethod=syntax and nofoldenable comment highlighting isn't removed. @@ -191,12 +190,18 @@ Using 'wildignore' also applies to liter directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266) Also see #1689. +Patch for 24 bit color support in MS-Windows console, using vcon. (Nobuhiro +Takasaki, Ken Takata, 2017 Oct 1, #2060). + ml_get error when using a Python. (Yggdroot, 2017 Jun 1, #1737) Lemonboy can reproduce (2017 Jun 5) Patch to fix E806. (Dominique, 2017 Nov 22, #2368) Kazunobu Kuriyama: caused by XtSetLanguageProc(). +Patch to fix GUI find/replace dialog. (kiloliter, 2017 Dec 11, report in +#2418, fix in #2435) + Invalid range error when using BufWinLeave for closing terminal. (Gabriel Barta, 2017 Nov 15, #2339) @@ -219,9 +224,8 @@ Koichi Iwamoto, #2126 Patch to fix cmdline abbreviation after '<,'>. (Christian Brabandt, 2017 Nov 13, on issue #2320) -Patch to add TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011 -May 24) Update May 26. -Now in patch by Lemonboy, #2333 +Patch for Neovim concerning restoring when closing help window. (glacambre +neovim #7431) Default install on MS-Windows should source defaults.vim. Ask whether to use Windows or Vim key behavior? @@ -238,7 +242,7 @@ matchit hasn't been maintained for a lon Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313) -MS-Windows: buffer completetion doesn't work when using backslash (or slash) +MS-Windows: buffer completion doesn't work when using backslash (or slash) for a path separator. (xtal8, #2201) Patch to adjust to DPI setting for GTK. (Roel van de Kraats, 2017 Nov 20, @@ -264,9 +268,6 @@ line breaks. (Ken Takata, 2017 Aug 22) The ":move" command does not honor closed folds. (Ryan Lue, #2351) -Patch for 24 bit color support in MS-Windows console, using vcon. (Nobuhiro -Takasaki, Ken Takata, 2017 Oct 1, #2060). - Memory leaks in test_channel? (or is it because of fork()) Memory leak in test_arabic. Using uninitialized value in test_crypt. @@ -304,6 +305,9 @@ Alternatives for ~: The ++ options for the :edit command are also useful on the Vim command line. +When recovering a file, put the swap file name in b:recovered_swapfile. Then +a command can delete it. + Overlong utf-8 sequence is displayed wrong. (Harm te Hennepe, 2017 Sep 14, #2089) Patch with possible solution by Björn Linse. @@ -641,7 +645,7 @@ Probably list of keystrokes, with some a Could store in logfile to be able to analyse it with an external command. E.g. to see when's the last time a plugin command was used. -execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1, +execute() cannot be used with command completion. (Daniel Hahler, 2016 Oct 1, #1141) cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983) @@ -812,12 +816,6 @@ directory exists. (Sergio Gallelli, 2013 In debug mode one can inspect variables, but not the function parameters (starting with a:). (Luc Hermitte, 2017 Jan 4, #1352) -7 Add a watchpoint in the debug mode: An expression that breaks execution - when evaluating to non-zero. Add the "watchadd expr" command, stop when - the value of the expression changes. ":watchdel" deletes an item, - ":watchlist" lists the items. (Charles Campbell) -Patch by Christian Brabandt, 2016 Jun 10, #859 - If ":bd" also closes a Tab page then the " mark is not set. (Harm te Hennepe, 2016 Apr 25, #780) @@ -1248,13 +1246,6 @@ Patch to allow more types in remote_expr Doesn't work for string in list. Other way to pass all types of variables reliably? -Using ":call foo#d.f()" doesn't autoload the "foo.vim" file. -That is, calling a dictionary function on an autoloaded dict. -Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar -17) -Patch by Christian Brabandt, 2013 Mar 23. -Not 100% sure this is the right solution. - Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}. (Christian Brabandt, 2013 Dec 9) @@ -1523,9 +1514,6 @@ doesn't jump to the correct line with :c Behavior of i" and a" text objects isn't logical. (Ben Fritz, 2013 Nov 19) -7 Make "ga" show the digraph for a character, if it exists. -Patch from Christian Brabandt, 2011 Aug 19. - maparg() does not show the <script> flag. When temporarily changing a mapping, how to restore the script ID?
--- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 8.0. Last change: 2017 Nov 19 +*usr_41.txt* For Vim version 8.0. Last change: 2017 Dec 02 VIM USER MANUAL - by Bram Moolenaar @@ -902,6 +902,7 @@ Vim server: *server-functions* Window size and position: *window-size-functions* winheight() get height of a specific window winwidth() get width of a specific window + win_screenpos() get screen position of a window winrestcmd() return command to restore window sizes winsaveview() get view of current window winrestview() restore saved view of current window
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1925,6 +1925,9 @@ au StdinReadPost * if !did_filetype() | " Most of these should call s:StarSetf() to avoid names ending in .gz and the " like are used. +" More Apache style config files +au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle') + " More Apache config files au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
--- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Nov 06 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -39,21 +39,23 @@ endif " Comments start with a double quote setlocal commentstring=\"%s -" Move around functions. -nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> -vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> -nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> -vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> -nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> -vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> -nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> -vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> +if !exists("no_plugin_maps") && !exists("no_vim_maps") + " Move around functions. + nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> + vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> + nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> + vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> + nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> + vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> + nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> + vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> -" Move around comments -nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> -vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> + " Move around comments + nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> + vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> + nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> + vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> +endif " Let the matchit plugin know what items can be matched. if exists("loaded_matchit")
--- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2012 Sep 08 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -135,8 +135,10 @@ iabbr <buffer> <expr> until GCUpperSpace iabbr <buffer> <expr> while GCUpperSpace("while") iabbr <buffer> <expr> repeat GCUpper("repeat") -nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> -nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> +if !exists("no_plugin_maps") && !exists("no_zimbu_maps") + nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> + nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> +endif " Using a function makes sure the search pattern is restored func! ZimbuGoStartBlock()
--- a/runtime/indent/javascript.vim +++ b/runtime/indent/javascript.vim @@ -2,7 +2,7 @@ " Language: Javascript " Maintainer: Chris Paul ( https://github.com/bounceme ) " URL: https://github.com/pangloss/vim-javascript -" Last Change: September 18, 2017 +" Last Change: December 4, 2017 " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -10,10 +10,6 @@ if exists('b:did_indent') endif let b:did_indent = 1 -" indent correctly if inside <script> -" vim/vim@690afe1 for the switch from cindent -let b:html_indent_script1 = 'inc' - " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetJavascriptIndent() setlocal autoindent nolisp nosmartindent @@ -25,13 +21,6 @@ setlocal indentkeys+=0],0) let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<' -" Regex of syntax group names that are or delimit string or are comments. -let b:syng_strcom = get(b:,'syng_strcom','string\|comment\|regex\|special\|doc\|template\%(braces\)\@!') -let b:syng_str = get(b:,'syng_str','string\|template\|special') -" template strings may want to be excluded when editing graphql: -" au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special' -" au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc' - " Only define the function once. if exists('*GetJavascriptIndent') finish @@ -40,6 +29,23 @@ endif let s:cpo_save = &cpo set cpo&vim +" indent correctly if inside <script> +" vim/vim@690afe1 for the switch from cindent +" overridden with b:html_indent_script1 +call extend(g:,{'html_indent_script1': 'inc'},'keep') + +" Regex of syntax group names that are or delimit string or are comments. +let s:bvars = { + \ 'syng_strcom': 'string\|comment\|regex\|special\|doc\|template\%(braces\)\@!', + \ 'syng_str': 'string\|template\|special' } +" template strings may want to be excluded when editing graphql: +" au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special' +" au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc' + +function s:GetVars() + call extend(b:,extend(s:bvars,{'js_cache': [0,0,0]}),'keep') +endfunction + " Get shiftwidth value if exists('*shiftwidth') function s:sw() @@ -104,21 +110,22 @@ endfunction function s:SkipFunc() if s:top_col == 1 throw 'out of bounds' - endif - let s:top_col = 0 - if s:check_in + elseif s:check_in if eval(s:skip_expr) return 1 endif let s:check_in = 0 elseif getline('.') =~ '\%<'.col('.').'c\/.\{-}\/\|\%>'.col('.').'c[''"]\|\\$' if eval(s:skip_expr) - let s:looksyn = a:firstline return 1 endif - elseif search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn) && eval(s:skip_expr) - let s:check_in = 1 - return 1 + elseif search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn) + if eval(s:skip_expr) + let s:check_in = 1 + return 1 + endif + else + let s:synid_cache[:] += [[line2byte('.') + col('.') - 1], ['']] endif let [s:looksyn, s:top_col] = getpos('.')[1:2] endfunction @@ -159,19 +166,29 @@ function s:Token() return s:LookingAt() =~ '\k' ? expand('<cword>') : s:LookingAt() endfunction -function s:PreviousToken() - let l:col = col('.') +function s:PreviousToken(...) + let [l:pos, tok] = [getpos('.'), ''] if search('\m\k\{1,}\|\S','ebW') - if search('\m\*\%#\/\|\/\/\%<'.a:firstline.'l','nbW',line('.')) && eval(s:in_comm) - if s:SearchLoop('\S\ze\_s*\/[/*]','bW',s:in_comm) - return s:Token() + if getline('.')[col('.')-2:col('.')-1] == '*/' + if eval(s:in_comm) && !s:SearchLoop('\S\ze\_s*\/[/*]','bW',s:in_comm) + call setpos('.',l:pos) + else + let tok = s:Token() endif - call cursor(a:firstline, l:col) else - return s:Token() + let two = a:0 || line('.') != l:pos[1] ? strridx(getline('.')[:col('.')],'//') + 1 : 0 + if two && eval(s:in_comm) + call cursor(0,two) + let tok = s:PreviousToken(1) + if tok is '' + call setpos('.',l:pos) + endif + else + let tok = s:Token() + endif endif endif - return '' + return tok endfunction function s:Pure(f,...) @@ -183,23 +200,30 @@ function s:SearchLoop(pat,flags,expr) endfunction function s:ExprCol() + if getline('.')[col('.')-2] == ':' + return 1 + endif let bal = 0 - while s:SearchLoop('[{}?]\|\_[^:]\zs::\@!','bW',s:skip_expr) + while s:SearchLoop('[{}?:]','bW',s:skip_expr) if s:LookingAt() == ':' + if getline('.')[col('.')-2] == ':' + call cursor(0,col('.')-1) + continue + endif let bal -= 1 elseif s:LookingAt() == '?' - let bal += 1 - if bal == 1 - break + if getline('.')[col('.'):col('.')+1] =~ '^\.\d\@!' + continue + elseif !bal + return 1 endif + let bal += 1 elseif s:LookingAt() == '{' - let bal = !s:IsBlock() - break + return !s:IsBlock() elseif !s:GetPair('{','}','bW',s:skip_expr) break endif endwhile - return s:Nat(bal) endfunction " configurable regexes that define continuation lines, not including (, {, or [. @@ -208,30 +232,29 @@ let s:opfirst = '^' . get(g:,'javascript let s:continuation = get(g:,'javascript_continuation', \ '\C\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$' -function s:Continues(ln,con) - let tok = matchstr(a:con[-15:],s:continuation) +function s:Continues() + let tok = matchstr(strpart(getline('.'),col('.')-15,15),s:continuation) if tok =~ '[a-z:]' - call cursor(a:ln, len(a:con)) return tok == ':' ? s:ExprCol() : s:PreviousToken() != '.' elseif tok !~ '[/>]' return tok isnot '' endif - return s:SynAt(a:ln, len(a:con)) !~? (tok == '>' ? 'jsflow\|^html' : 'regex') + return s:SynAt(line('.'),col('.')) !~? (tok == '>' ? 'jsflow\|^html' : 'regex') endfunction " Check if line 'lnum' has a balanced amount of parentheses. -function s:Balanced(lnum) - let [l:open, l:line] = [0, getline(a:lnum)] - let pos = match(l:line, '[][(){}]') +function s:Balanced(lnum,line) + let l:open = 0 + let pos = match(a:line, '[][(){}]') while pos != -1 if s:SynAt(a:lnum,pos + 1) !~? b:syng_strcom - let l:open += match(' ' . l:line[pos],'[[({]') + let l:open += match(' ' . a:line[pos],'[[({]') if l:open < 0 return endif endif - let pos = match(l:line, !l:open ? '[][(){}]' : '()' =~ l:line[pos] ? - \ '[()]' : '{}' =~ l:line[pos] ? '[{}]' : '[][]', pos + 1) + let pos = match(a:line, !l:open ? '[][(){}]' : '()' =~ a:line[pos] ? + \ '[()]' : '{}' =~ a:line[pos] ? '[{}]' : '[][]', pos + 1) endwhile return !l:open endfunction @@ -244,27 +267,38 @@ function s:OneScope() \ s:Pure('s:PreviousToken') != '.' && !(tok == 'while' && s:DoWhile()) elseif s:Token() =~# '^else$\|^do$' return s:Pure('s:PreviousToken') != '.' + elseif strpart(getline('.'),col('.')-2,2) == '=>' + call cursor(0,col('.')-1) + if s:PreviousToken() == ')' + return s:GetPair('(', ')', 'bW', s:skip_expr) + endif + return 1 endif - return strpart(getline('.'),col('.')-2,2) == '=>' endfunction function s:DoWhile() let cpos = searchpos('\m\<','cbW') - if s:SearchLoop('\C[{}]\|\<\%(do\|while\)\>','bW',s:skip_expr) - if s:{s:LookingAt() == '}' && s:GetPair('{','}','bW',s:skip_expr) ? - \ 'Previous' : ''}Token() ==# 'do' && s:IsBlock() - return 1 + while s:SearchLoop('\C[{}]\|\<\%(do\|while\)\>','bW',s:skip_expr) + if s:LookingAt() =~ '\a' + if s:Pure('s:IsBlock') + if s:LookingAt() ==# 'd' + return 1 + endif + break + endif + elseif s:LookingAt() != '}' || !s:GetPair('{','}','bW',s:skip_expr) + break endif - call call('cursor',cpos) - endif + endwhile + call call('cursor',cpos) endfunction " returns total offset from braceless contexts. 'num' is the lineNr which " encloses the entire context, 'cont' if whether a:firstline is a continued " expression, which could have started in a braceless context -function s:IsContOne(num,cont) - let [l:num, b_l] = [a:num + !a:num, 0] - let pind = a:num ? indent(a:num) + s:sw() : 0 +function s:IsContOne(cont) + let [l:num, b_l] = [b:js_cache[1] + !b:js_cache[1], 0] + let pind = b:js_cache[1] ? indent(b:js_cache[1]) + s:sw() : 0 let ind = indent('.') + !a:cont while line('.') > l:num && ind > pind || line('.') == l:num if indent('.') < ind && s:OneScope() @@ -282,20 +316,16 @@ function s:IsContOne(num,cont) return b_l endfunction -function s:Class() - return (s:Token() ==# 'class' || s:PreviousToken() =~# '^class$\|^extends$') && - \ s:PreviousToken() != '.' -endfunction - function s:IsSwitch() - return s:PreviousToken() !~ '[.*]' && - \ (!s:GetPair('{','}','cbW',s:skip_expr) || s:IsBlock() && !s:Class()) + call call('cursor',b:js_cache[1:]) + return search('\m\C\%#.\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>','nWc'.s:z) endfunction " https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader function s:IsBlock() let tok = s:PreviousToken() if join(s:stack) =~? 'xml\|jsx' && s:SynAt(line('.'),col('.')-1) =~? 'xml\|jsx' + let s:in_jsx = 1 return tok != '{' elseif tok =~ '\k' if tok ==# 'type' @@ -320,7 +350,7 @@ function s:IsBlock() endfunction function GetJavascriptIndent() - let b:js_cache = get(b:,'js_cache',[0,0,0]) + call s:GetVars() let s:synid_cache = [[],[]] let l:line = getline(v:lnum) " use synstack as it validates syn state and works in an empty line @@ -334,7 +364,7 @@ function GetJavascriptIndent() return -1 endif elseif s:stack[-1] =~? b:syng_str - if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1) + if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1,getline(v:lnum-1)) let b:js_cache[0] = v:lnum endif return -1 @@ -361,7 +391,7 @@ function GetJavascriptIndent() call cursor(v:lnum,1) let idx = index([']',')','}'],l:line[0]) if b:js_cache[0] > l:lnum && b:js_cache[0] < v:lnum || - \ b:js_cache[0] == l:lnum && s:Balanced(l:lnum) + \ b:js_cache[0] == l:lnum && s:Balanced(l:lnum,pline) call call('cursor',b:js_cache[1:]) else let [s:looksyn, s:top_col, s:check_in, s:l1] = [v:lnum - 1,0,0, @@ -382,10 +412,10 @@ function GetJavascriptIndent() let [b:js_cache[0], num] = [v:lnum, b:js_cache[1]] - let [num_ind, is_op, b_l, l:switch_offset] = [s:Nat(indent(num)),0,0,0] + let [num_ind, is_op, b_l, l:switch_offset, s:in_jsx] = [s:Nat(indent(num)),0,0,0,0] if !num || s:LookingAt() == '{' && s:IsBlock() let ilnum = line('.') - if num && s:LookingAt() == ')' && s:GetPair('(',')','bW',s:skip_expr) + if num && !s:in_jsx && s:LookingAt() == ')' && s:GetPair('(',')','bW',s:skip_expr) if ilnum == num let [num, num_ind] = [line('.'), indent('.')] endif @@ -399,23 +429,24 @@ function GetJavascriptIndent() endif endif if idx == -1 && pline[-1:] !~ '[{;]' + call cursor(l:lnum, len(pline)) let sol = matchstr(l:line,s:opfirst) if sol is '' || sol == '/' && s:SynAt(v:lnum, \ 1 + len(getline(v:lnum)) - len(l:line)) =~? 'regex' - if s:Continues(l:lnum,pline) + if s:Continues() let is_op = s:sw() endif - elseif num && sol =~# '^\%(in\%(stanceof\)\=\|\*\)$' - call call('cursor',b:js_cache[1:]) - if s:PreviousToken() =~ '\k' && s:Class() - return num_ind + s:sw() - endif - let is_op = s:sw() + elseif num && sol =~# '^\%(in\%(stanceof\)\=\|\*\)$' && + \ s:LookingAt() == '}' && s:GetPair('{','}','bW',s:skip_expr) && + \ s:PreviousToken() == ')' && s:GetPair('(',')','bW',s:skip_expr) && + \ (s:PreviousToken() == ']' || s:LookingAt() =~ '\k' && + \ s:{s:PreviousToken() == '*' ? 'Previous' : ''}Token() !=# 'function') + return num_ind + s:sw() else let is_op = s:sw() endif call cursor(l:lnum, len(pline)) - let b_l = s:Nat(s:IsContOne(b:js_cache[1],is_op) - (!is_op && l:line =~ '^{')) * s:sw() + let b_l = s:Nat(s:IsContOne(is_op) - (!is_op && l:line =~ '^{')) * s:sw() endif elseif idx.s:LookingAt().&cino =~ '^-1(.*(' && (search('\m\S','nbW',num) || s:ParseCino('U')) let pval = s:ParseCino('(') @@ -431,10 +462,10 @@ function GetJavascriptIndent() " main return if l:line =~ '^[])}]\|^|}' - if l:line_raw[0] == ')' && getline(num)[b:js_cache[2]-1] == '(' + if l:line_raw[0] == ')' if s:ParseCino('M') return indent(l:lnum) - elseif &cino =~# 'm' && !s:ParseCino('m') + elseif num && &cino =~# 'm' && !s:ParseCino('m') return virtcol('.') - 1 endif endif
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -216,7 +216,7 @@ func s:InstallCommands() " TODO: can the K mapping be restored? nnoremap K :Evaluate<CR> - if has('menu') + if has('menu') && &mouse != '' nnoremenu WinBar.Step :Step<CR> nnoremenu WinBar.Next :Over<CR> nnoremenu WinBar.Finish :Finish<CR>
--- a/runtime/syntax/apachestyle.vim +++ b/runtime/syntax/apachestyle.vim @@ -1,8 +1,10 @@ " Vim syntax file " Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) -" Maintainer: Christian Hammers <ch@westend.com> -" URL: none +" Maintainer: Ben RUBSON <ben.rubson@gmail.com> +" Former Maintainer: Christian Hammers <ch@westend.com> " ChangeLog: +" 2017-12-17,ch +" correctly detect comments " 2001-05-04,ch " adopted Vim 6.0 syntax style " 1999-10-28,ch @@ -27,8 +29,8 @@ endif syn case ignore +syn match apOption /^\s*[^ \t#<=]*/ syn match apComment /^\s*#.*$/ -syn match apOption /^\s*[^ \t#<=]*/ "syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly " tags
--- a/runtime/syntax/haskell.vim +++ b/runtime/syntax/haskell.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Haskell " Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org> -" Last Change: 2017 Jun 04 +" Last Change: 2017 Dec 16 " Original Author: John Williams <jrw@pobox.com> " " Thanks to Ryan Crumley for suggestions and John Meacham for @@ -59,8 +59,8 @@ syn match hsSpecialCharError contained syn region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar syn match hsCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=hsSpecialChar,hsSpecialCharError syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hsSpecialCharError -syn match hsNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" -syn match hsFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" +syn match hsNumber "\v<[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*>|<0[oO]_*%(_*[0-7])*>|<0[bB]_*[01]%(_*[01])*>" +syn match hsFloat "\v<[0-9]%(_*[0-9])*\.[0-9]%(_*[0-9])*%(_*[eE][-+]?[0-9]%(_*[0-9])*)?>|<[0-9]%(_*[0-9])*_*[eE][-+]?[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*\.[0-9a-fA-F]%(_*[0-9a-fA-F])*%(_*[pP][-+]?[0-9]%(_*[0-9])*)?>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*_*[pP][-+]?[0-9]%(_*[0-9])*>" " Keyword definitions. These must be patterns instead of keywords " because otherwise they would match as keywords at the start of a
--- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -3,8 +3,8 @@ " Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net> " Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> " Repository: https://notabug.org/jorgesumle/vim-html-syntax -" Last Change: 2017 Sep 30 -" included patch from Christian Brabandt to make use of the strikethrough attributes +" Last Change: 2017 Dec 16 +" Included patch from Jorge Maldonado Ventura to add the dialog element " " Please check :help html.vim for some comments and a description of the options @@ -100,11 +100,11 @@ syn keyword htmlArg contained summary ta " html 5 arg names syn keyword htmlArg contained allowfullscreen async autocomplete autofocus syn keyword htmlArg contained autoplay challenge contenteditable contextmenu -syn keyword htmlArg contained controls crossorigin default dirname download -syn keyword htmlArg contained draggable dropzone form formaction formenctype -syn keyword htmlArg contained formmethod formnovalidate formtarget hidden -syn keyword htmlArg contained high icon inputmode keytype kind list loop low -syn keyword htmlArg contained max min minlength muted nonce novalidate open +syn keyword htmlArg contained controls crossorigin default dialog dirname +syn keyword htmlArg contained download draggable dropzone form formaction +syn keyword htmlArg contained formenctype formmethod formnovalidate formtarget +syn keyword htmlArg contained hidden high icon inputmode keytype kind list loop +syn keyword htmlArg contained low max min minlength muted nonce novalidate open syn keyword htmlArg contained optimum pattern placeholder poster preload syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate
--- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM> -" Last Change: Oct 12, 2017 -" Version: 105 +" Last Change: Dec 11, 2017 +" Version: 107 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -396,8 +396,8 @@ endif " Bad Math (mismatched): {{{1 if !exists("g:tex_no_math") && !s:tex_no_error - syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" - syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" + syn match texBadMath "\\end\s*{\s*\(array\|bBpvV]matrix\|split\|smallmatrix\)\s*}" + syn match texBadMath "\\end\s*{\s*\(displaymath\|equation\|eqnarray\|math\)\*\=\s*}" syn match texBadMath "\\[\])]" endif @@ -436,17 +436,10 @@ if !exists("g:tex_no_math") endfun " Standard Math Zones: {{{2 - call TexNewMathZone("A","align",1) - call TexNewMathZone("B","alignat",1) - call TexNewMathZone("C","displaymath",1) - call TexNewMathZone("D","eqnarray",1) - call TexNewMathZone("E","equation",1) - call TexNewMathZone("F","flalign",1) - call TexNewMathZone("G","gather",1) - call TexNewMathZone("H","math",1) - call TexNewMathZone("I","multline",1) - call TexNewMathZone("J","xalignat",1) - call TexNewMathZone("K","xxalignat",0) + call TexNewMathZone("A","displaymath",1) + call TexNewMathZone("B","eqnarray",1) + call TexNewMathZone("C","equation",1) + call TexNewMathZone("D","math",1) " Inline Math Zones: {{{2 if s:tex_fast =~# 'M'
--- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 8.0 script " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: November 03, 2017 -" Version: 8.0-04 +" Last Change: Dec 15, 2017 +" Version: 8.0-07 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Automatically generated keyword lists: {{{1 @@ -199,7 +199,7 @@ syn keyword vimFTOption contained detect " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. -syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue +syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimSetEqual,vimOption if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList else @@ -215,7 +215,8 @@ syn keyword vimAugroupKey contained aug[ " ========= syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile -syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "\(\<is\>\|\<isnot\>\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") @@ -559,7 +560,7 @@ syn match vimHiBang contained "!" skipwh syn match vimHiGroup contained "\i\+" syn case ignore -syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl +syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl syn keyword vimFgBgAttrib contained none bg background fg foreground syn case match syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib