diff --git a/appveyor.yml b/appveyor.yml index ab379f9fd9..7f6a40a6ea 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,18 @@ version: "{build}" skip_tags: true +environment: + matrix: + - FEATURE: HUGE + - FEATURE: NORMAL +# disabled +# - FEATURE: TINY +# - FEATURE: SMALL +# - FEATURE: BIG + +matrix: + fast_finish: true + before_build: - '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release' # Work around for Python 2.7.11's bug @@ -9,12 +21,14 @@ before_build: - reg copy HKLM\SOFTWARE\Python\PythonCore\2.7 HKLM\SOFTWARE\Python\PythonCore\2.7-32 /s /reg:64 build_script: - - cd src - - sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak - - nmake -f Make_mvc2.mak CPU=AMD64 GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=34 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python34-x64 - - .\gvim -u NONE -c "redir @a | ver | 0put a | wq!" ver.txt - - type ver.txt + - src/appveyor.bat test_script: - - cd testdir + - cd src/testdir + # Testing with MSVC gvim - nmake -f Make_dos.mak VIMPROG=..\gvim + - nmake -f Make_dos.mak clean + # Testing with MingW console version + - nmake -f Make_dos.mak VIMPROG=..\vim + +# vim: sw=2 sts=2 et ts=2 sr diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index aa31816fcb..0f329648a3 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -1,4 +1,4 @@ -*channel.txt* For Vim version 7.4. Last change: 2016 Feb 21 +*channel.txt* For Vim version 7.4. Last change: 2016 Feb 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -160,9 +160,13 @@ Use |ch_status()| to see if the channel could be opened. func MyCloseHandler(channel) < *waittime* "waittime" The time to wait for the connection to be made in - milliseconds. The default is zero, don't wait, which is - useful if the server is supposed to be running already. A - negative number waits forever. + milliseconds. A negative number waits forever. + + The default is zero, don't wait, which is useful if a local + server is supposed to be running already. On Unix Vim + actually uses a 1 msec timeout, that is required on many + systems. Use a larger value for a remote server, e.g. 10 + msec at least. "timeout" The time to wait for a request when blocking, E.g. when using ch_sendexpr(). In milliseconds. The default is 2000 (2 @@ -253,7 +257,8 @@ Then channel handler will then get {response} converted to Vim types. If the channel does not have a handler the message is dropped. On read error or ch_close(), when using a socket, the string "DETACH" is sent, -if still possible. The channel will then be inactive. +if still possible. The channel will then be inactive. For a JSON and JS mode +channel quotes are used around DETACH, otherwise there are no quotes. It is also possible to use ch_sendraw() on a JSON or JS channel. The caller is then completely responsible for correct encoding and decoding. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 34c6204982..23ab91f1cd 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2016 Feb 21 +*eval.txt* For Vim version 7.4. Last change: 2016 Feb 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1961,6 +1961,7 @@ insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}] invert( {expr}) Number bitwise invert isdirectory( {directory}) Number TRUE if {directory} is a directory islocked( {expr}) Number TRUE if {expr} is locked +isnan( {expr}) Number TRUE if {expr} is NaN items( {dict}) List key-value pairs in {dict} job_getchannel( {job}) Channel get the channel handle for {job} job_setoptions( {job}, {options}) none set options for {job} @@ -4397,6 +4398,13 @@ islocked({expr}) *islocked()* *E786* < When {expr} is a variable that does not exist you get an error message. Use |exists()| to check for existence. +isnan({expr}) *isnan()* + Return non-zero if {expr} is a float with value NaN. > + echo isnan(0.0 / 0.0) +< 1 ~ + + {only available when compiled with the |+float| feature} + items({dict}) *items()* Return a |List| with all the key-value pairs of {dict}. Each |List| item is a list with two items: the key of a {dict} diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index f87cb3bf61..8331d36a57 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 7.4. Last change: 2016 Jan 10 +*help.txt* For Vim version 7.4. Last change: 2016 Feb 22 VIM - main help file k @@ -155,7 +155,6 @@ Special issues ~ GUI ~ |gui.txt| Graphical User Interface (GUI) -|gui_w16.txt| Windows 3.1 GUI |gui_w32.txt| Win32 GUI |gui_x11.txt| X11 GUI |gui_mac.txt| MacVim GUI diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 4c04be951e..f86f79ac00 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 7.4. Last change: 2016 Jan 19 +*index.txt* For Vim version 7.4. Last change: 2016 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1324,6 +1324,7 @@ tag command action ~ |:lnfile| :lnf[ile] go to first location in next file |:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode |:loadkeymap| :loadk[eymap] load the following keymaps until EOF +|:loadplugin| :loadp[lugin] load a plugin from 'packpath' |:loadview| :lo[adview] load view for current window from a file |:lockmarks| :loc[kmarks] following command keeps marks where they are |:lockvar| :lockv[ar] lock variables diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index d0d882330d..bc4b5a9395 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.4. Last change: 2016 Feb 21 +*options.txt* For Vim version 7.4. Last change: 2016 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1216,10 +1216,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'bioskey' 'biosk' boolean (default on) global {not in Vi} {only for MS-DOS} - When on the BIOS is called to obtain a keyboard character. This works - better to detect CTRL-C, but only works for the console. When using a - terminal over a serial port reset this option. - Also see |'conskey'|. + This was for MS-DOS and is no longer supported. *'blurradius'* *'blur'* 'blurradius' 'blur' number (default 0) @@ -1959,13 +1956,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'conskey' 'consk' boolean (default off) global {not in Vi} {only for MS-DOS} - When on direct console I/O is used to obtain a keyboard character. - This should work in most cases. Also see |'bioskey'|. Together, - three methods of console input are available: - 'conskey' 'bioskey' action ~ - on on or off direct console input - off on BIOS - off off STDIN + This was for MS-DOS and is no longer supported. *'copyindent'* *'ci'* *'nocopyindent'* *'noci'* 'copyindent' 'ci' boolean (default off) @@ -5548,7 +5539,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'packpath'* *'pp'* 'packpath' 'pp' string (default: see 'runtimepath') {not in Vi} - {not available without the |+packages| feature} Directories used to find packages. See |packages|. diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index f929e30ed5..d7e815f714 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.4. Last change: 2015 Nov 10 +*quickref.txt* For Vim version 7.4. Last change: 2016 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -815,7 +815,8 @@ Short explanation of each option: *option-list* 'omnifunc' 'ofu' function for filetype-specific completion 'opendevice' 'odev' allow reading/writing devices on MS-Windows 'operatorfunc' 'opfunc' function to be called for |g@| operator -'osfiletype' 'oft' no longer supported +'osfiletype' 'oft' no longer supported +'packpath' 'pp' list of directories used for packages 'paragraphs' 'para' nroff macros that separate paragraphs 'paste' allow pasting text 'pastetoggle' 'pt' key code that causes 'paste' to toggle diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 1ea72536fd..db1ec9bad0 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 7.4. Last change: 2016 Feb 21 +*repeat.txt* For Vim version 7.4. Last change: 2016 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -227,8 +227,6 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. Also see |load-plugin|. - {not available without the |+packages| feature} - :scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167* Specify the character encoding used in the script. The following lines will be converted from [encoding] diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index e31934b210..b6d52721b7 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.4. Last change: 2016 Jan 28 +*syntax.txt* For Vim version 7.4. Last change: 2016 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3361,6 +3361,13 @@ Note that schemas are not actually limited to plain scalars, but this is the only difference between schemas defined in YAML specification and the only difference defined in the syntax file. + +ZSH *zsh.vim* *ft-zsh-syntax* + +The syntax script for zsh allows for syntax-based folding: > + + :let g:zsh_fold_enable = 1 + ============================================================================== 5. Defining a syntax *:syn-define* *E410* diff --git a/runtime/doc/tags b/runtime/doc/tags index 672e3b8a64..42e1e244b9 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2465,6 +2465,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* :lo starting.txt /*:lo* :loadk mbyte.txt /*:loadk* :loadkeymap mbyte.txt /*:loadkeymap* +:loadp repeat.txt /*:loadp* +:loadplugin repeat.txt /*:loadplugin* :loadview starting.txt /*:loadview* :loc motion.txt /*:loc* :lockmarks motion.txt /*:lockmarks* @@ -6094,6 +6096,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-zsh-syntax syntax.txt /*ft-zsh-syntax* ft_ada.txt ft_ada.txt /*ft_ada.txt* ft_sql.txt ft_sql.txt /*ft_sql.txt* ftdetect filetype.txt /*ftdetect* @@ -6888,6 +6891,7 @@ iquote motion.txt /*iquote* is motion.txt /*is* isdirectory() eval.txt /*isdirectory()* islocked() eval.txt /*islocked()* +isnan() eval.txt /*isnan()* it motion.txt /*it* italic syntax.txt /*italic* items() eval.txt /*items()* @@ -7009,6 +7013,7 @@ list-repeat windows.txt /*list-repeat* lite.vim syntax.txt /*lite.vim* literal-string eval.txt /*literal-string* lnum-variable eval.txt /*lnum-variable* +load-plugin repeat.txt /*load-plugin* load-plugins starting.txt /*load-plugins* load-vim-script repeat.txt /*load-vim-script* local-additions help.txt /*local-additions* @@ -9288,6 +9293,7 @@ zn fold.txt /*zn* zo fold.txt /*zo* zr fold.txt /*zr* zs scroll.txt /*zs* +zsh.vim syntax.txt /*zsh.vim* zt scroll.txt /*zt* zuG spell.txt /*zuG* zuW spell.txt /*zuW* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index aece38c271..f8f9104d8c 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.4. Last change: 2016 Feb 20 +*todo.txt* For Vim version 7.4. Last change: 2016 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,41 +35,35 @@ not be repeated below, unless there is extra information. -------------------- Known bugs and current work ----------------------- +channel: -- channel needs both stdout and stderr (GUI implementation, queues) - - ch_read() for stderr -- implement TODO items in ":help channel": - - implement ch_setoptions(handle, {options}) - - job_setoptions(job, {options}) - - ch_close() closes stdin/stdout/stderr - - out-cb - - err-cb - - exit-cb move code from mch_clear_job() - - job argument: killonexit - - ch_getjob(handle) - - ch_read(handle [, timeout]) - - ch_readall(handle [, timeout]) - - job_info() should remove usable info: process ID, run/dead, etc. - - job_maystart() - - job_gethandle(), job_sethandle() - - add ch_status(): Whether channel is open. Perhaps also mode, timeout. - - When channel closes invoke "close-cb". -- Add "call" to call a function with a list of arguments. (Damien) - merge "expr" and "eval", send something back if there is a third arg? +- don't free channel if there are callbacks. + netbeans channel leaks? +- job_stop() on MS-Windows: "term" should probably do the same as "kill". +- Make JSON encode and decode NaN and Infinity. - A callback on ch_sendraw() should be put at the end of the list of callback handlers. When a message arrives invoke the first one and remove it. -- Support channel without socket support. Useful for starting a job with - pipes. Need another feature, +socket ? +- implement TODO items in ":help channel": + - job_start() options: + term + in-io + in-file + out-io + out-file + out-buffer + err-io + err-file + err-buffer + existing channel to use + - job_maystart() + - add job_info(): process ID, run/dead, etc. + - add ch_info(): in/out/err mode, timeout, callbacks, etc. - Move more details from eval.txt to channel.txt. Add tags in eval.txt. - When receiving malformed json starting with a quote it doesn't get discarded. -- When message in queue but there is no callback, drop it after a while? -- Crash when closing channel after ch_sendexpr() with callback and outstanding - request (Christian Robinson). -- cleanup on exit? in mch_getout() and getout(). -- On Mac a 1 msec waittime is needed in ch_open(), why? -- Add more log calls, basically at every branch, before every callback, etc. -- Add timestamp to queued messages and callbacks with ID, remove after a +- When a message in the queue but there is no callback, drop it after a while? + Add timestamp to queued messages and callbacks with ID, remove after a minute. +- cleanup on exit? in mch_getout() and getout(). +- Add more log calls, basically at every branch, before every callback, etc. - add remark about undo sync, is there a way to force it? - When starting a job, have an option to open the server socket, so we know the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz, @@ -82,6 +76,8 @@ not be repeated below, unless there is extra information. - For connection to server, a "keep open" flag would be useful. Retry connecting in the main loop with zero timeout. +Remove the sniff interface? Looks like it's dead. + More plugin support: - Have a way to install a callback from the main loop. Called every second or so. @@ -94,9 +90,8 @@ More plugin support: gettabnr({id}) tab page nr of {id} or -1 if not open gotowin({id}) Make it so that the window ID can be used where currently a window nr is used - -Patch on #608: (Ken Takata) -https://bitbucket.org/k_takata/vim-ktakata-mq/src/479934b94fd56b064c9e4bd8737585c5df69d56a/fix-gvimext-loadlibrary.patch?fileviewer=file-view-default + Patch from Anton Lindqvist, 2016 Feb 21, to make bufwinnr() return a list. + Perhaps add bufwinid() instead. This difference is unexpected: echo v:true == 1 @@ -109,25 +104,11 @@ Compiler warnings. (John Marriott, Feb 17) Compiler warnings in if_ole.cpp. Patch by Ken Takata, Feb 18. -Add "runtime/bundles" ? - runtime/bundles/netrw/spec.vim - runtime/bundles/netrw/autoload/netrw.vim - runtime/bundles/netrw/syntax/netrw.vim - etc. -Need an alternative for 'runtimepath' that tells where bundles are to be -found. 'bundlepath' ? -The plugins under 'bundlepath' would always be loaded. Also have a path for -optional plugins? 'optbundlepath'? Or have directories "bundlesdef" and -"bundlesopt"? -Then use a command "loadplugin" to find a plugin in "optional". -"bundles" is used by some plugin managers, need another name. "packages"? -Add a "requires" / "provides" mechanism? - if my_feature_enabled - require +python - endif - require my_other_plugin -~/vim/packages/netrw/def/netrw/plugin/netrw.vim -~/vim/packages/netrw/opt/nwdebug/plugin/nwdebug.vim +When running "make install" don't overwrite the doc/tags file, generate it +elsewhere, so that the distributed file doesn't change. + +Fix to support --nofork for Windows batch files. (Kevin Cantú, 2016 Feb 23, +#658) Patch to add GTK 3 support. (Kazunobu Kuriyama, 2016 Feb 13) @@ -199,6 +180,14 @@ Patch for test86 and test87. (Roland Puntaier, #622) Patch for Python: #622. (Roland Puntaier, 2016 Feb 2) What does it change? +Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12) +More tests May 14. Update May 29. Update Aug 10. +Now part of large file patches. (Ken Takata, 2016 Feb 1) +Two patches now? New update Feb 24. + +Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21) +Also in update of Feb 24? + Need to try out instructions in INSSTALLpc.txt about how to install all interfaces and how to build Vim with them. Appveyor build with self-installing executable, includes getting most @@ -251,12 +240,7 @@ directory exists. (Sergio Gallelli, 2013 Dec 29) Patch to avoid redrawing tabline when the popup menu is visible. (Christian Brabandt, 2016 Jan 28) -Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12) -More tests May 14. Update May 29. Update Aug 10. -Now part of large file patches. (Ken Takata, 2016 Feb 1) -Two patches now? - -Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21) +Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24) 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 diff --git a/runtime/ftplugin/eiffel.vim b/runtime/ftplugin/eiffel.vim new file mode 100644 index 0000000000..216fdde162 --- /dev/null +++ b/runtime/ftplugin/eiffel.vim @@ -0,0 +1,96 @@ +" Vim filetype plugin +" Language: Eiffel +" Maintainer: Doug Kearns +" Last Change: 2010 Aug 29 + +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=:-- +setlocal commentstring=--\ %s + +setlocal formatoptions-=t formatoptions+=croql + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Eiffel Source Files (*.e)\t*.e\n" . + \ "Eiffel Control Files (*.ecf, *.ace, *.xace)\t*.ecf;*.ace;*.xace\n" . + \ "All Files (*.*)\t*.*\n" +endif + +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_ignorecase = 0 + " Silly \%^ trick to match note at head of pair and in middle prevents + " 'g%' wrapping from 'note' to 'end' + let b:match_words = '\%^:' . + \ '\<\%(^note\|indexing\|class\|^obsolete\|inherit\|insert\|^create\|convert\|feature\|^invariant\)\>:' . + \ '^end\>,' . + \ '\<\%(do\|deferred\|external\|once\%(\s\+"\)\@!\|check\|debug\|if\|inspect\|from\|across\)\>:' . + \ '\%(\%(^\s\+\)\@<=\%(then\|until\|loop\)\|\%(then\|until\|loop\)\s\+[^ -]\|' . + \ '\<\%(ensure\%(\s\+then\)\=\|rescue\|_then\|elseif\|else\|when\|\s\@<=invariant\|_until\|_loop\|variant\|_as\|alias\)\>\):' . + \ '\s\@<=end\>' + let b:match_skip = 's:\' + noremap [% + noremap ]% + vnoremap a% +endif + +let b:undo_ftplugin = "setl fo< com< cms<" . + \ "| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip" + +if !exists("g:no_plugin_maps") && !exists("g:no_eiffel_maps") + function! s:DoMotion(pattern, count, flags) abort + normal! m' + for i in range(a:count) + call search(a:pattern, a:flags) + endfor + endfunction + + let sections = '^\%(note\|indexing\|' . + \ '\%(\%(deferred\|expanded\|external\|frozen\)\s\+\)*class\|' . + \ 'obsolete\|inherit\|insert\|create\|convert\|feature\|' . + \ 'invariant\|end\)\>' + + nnoremap ]] :call DoMotion(sections, v:count1, 'W') + xnoremap ]] :exe "normal! gv"call DoMotion(sections, v:count1, 'W') + nnoremap [[ :call DoMotion(sections, v:count1, 'Wb') + xnoremap [[ :exe "normal! gv"call DoMotion(sections, v:count1, 'Wb') + + function! s:DoFeatureMotion(count, flags) + let view = winsaveview() + call cursor(1, 1) + let [features_start, _] = searchpos('^feature\>') + call search('^\s\+\a') " find the first feature + let spaces = indent(line('.')) + let [features_end, _] = searchpos('^\%(invariant\|note\|end\)\>') + call winrestview(view) + call s:DoMotion('\%>' . features_start . 'l\%<' . features_end . 'l^\s*\%' . (spaces + 1) . 'v\zs\a', a:count, a:flags) + endfunction + + nnoremap ]m :call DoFeatureMotion(v:count1, 'W') + xnoremap ]m :exe "normal! gv"call DoFeatureMotion(v:count1, 'W') + nnoremap [m :call DoFeatureMotion(v:count1, 'Wb') + xnoremap [m :exe "normal! gv"call DoFeatureMotion(v:count1, 'Wb') + + let comment_block_start = '^\%(\s\+--.*\n\)\@ ]- :call DoMotion(comment_block_start, 1, 'W') + xnoremap ]- :exe "normal! gv"call DoMotion(comment_block_start, 1, 'W') + nnoremap [- :call DoMotion(comment_block_end, 1, 'Wb') + xnoremap [- :exe "normal! gv"call DoMotion(comment_block_end, 1, 'Wb') + + let b:undo_ftplugin = b:undo_ftplugin . + \ "| silent! execute 'unmap [[' | silent! execute 'unmap ]]'" . + \ "| silent! execute 'unmap [m' | silent! execute 'unmap ]m'" . + \ "| silent! execute 'unmap [-' | silent! execute 'unmap ]-'" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim index 2d603b0afa..d05bb3770f 100644 --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -3,7 +3,7 @@ " Maintainer: Christian Brabandt " Previous Maintainer: Peter Aronoff " Original Author: Nikolai Weibull -" Latest Revision: 2016-01-15 +" Latest Revision: 2016-02-15 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent @@ -12,14 +12,14 @@ if exists("b:did_indent") endif let b:did_indent = 1 -let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' - setlocal indentexpr=GetShIndent() setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,0=end,),0=;;,0=;& setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix setlocal indentkeys-=:,0# setlocal nosmartindent +let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' + if exists("*GetShIndent") finish endif @@ -67,7 +67,7 @@ function! GetShIndent() if !s:is_case_ended(line) let ind += s:indent_value('case-statements') endif - elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' + elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' || line =~ '^\s*function\s*\w\S\+\s*\%(()\)\?\s*{' if line !~ '}\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 15a00eb516..3fc236f033 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell " Previous Maintainer: Lennart Schultz -" Last Change: Feb 16, 2016 -" Version: 144 +" Last Change: Feb 18, 2016 +" Version: 145 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 40013b5b99..cef28d65ed 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Jan 20, 2016 -" Version: 91 +" Last Change: Feb 18, 2016 +" Version: 92 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -200,7 +200,7 @@ if !exists("g:tex_no_math") endif " Try to flag {} and () mismatches: {{{1 -if s:tex_fast =~ 'm' +if s:tex_fast =~# 'm' if !s:tex_no_error syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell @@ -217,7 +217,7 @@ endif if !s:tex_no_error syn match texError "[}\])]" endif -if s:tex_fast =~ 'M' +if s:tex_fast =~# 'M' if !exists("g:tex_no_math") if !s:tex_no_error syn match texMathError "}" contained @@ -260,14 +260,14 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" " \begin{}/\end{} section markers: {{{1 syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName -if s:tex_fast =~ 'm' +if s:tex_fast =~# 'm' syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell endif " \documentclass, \documentstyle, \usepackage: {{{1 syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs -if s:tex_fast =~ 'm' +if s:tex_fast =~# 'm' syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell endif @@ -281,7 +281,7 @@ syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatemen syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt syn match texInputCurlies "[{}]" contained -if s:tex_fast =~ 'm' +if s:tex_fast =~# 'm' syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment endif @@ -349,7 +349,7 @@ syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup= syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained " Sections, subsections, etc: {{{1 -if s:tex_fast =~ 'p' +if s:tex_fast =~# 'p' if !s:tex_nospell TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell @@ -376,8 +376,8 @@ if s:tex_fast =~ 'p' endif " particular support for bold and italic {{{1 -if s:tex_fast =~ 'b' - if s:tex_conceal =~ 'b' +if s:tex_fast =~# 'b' + if s:tex_conceal =~# 'b' if !exists("g:tex_nospell") || !g:tex_nospell syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell @@ -414,7 +414,7 @@ if !exists("g:tex_no_math") let foldcmd= "" endif exe "syn cluster texMathZones add=".grpname - if s:tex_fast =~ 'M' + if s:tex_fast =~# 'M' exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' @@ -424,7 +424,7 @@ if !exists("g:tex_no_math") let grpname = "texMathZone".a:sfx.'S' let syncname = "texSyncMathZone".a:sfx.'S' exe "syn cluster texMathZones add=".grpname - if s:tex_fast =~ 'M' + if s:tex_fast =~# 'M' exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' @@ -448,8 +448,8 @@ if !exists("g:tex_no_math") call TexNewMathZone("L","xxalignat",0) " Inline Math Zones: {{{2 - if s:tex_fast =~ 'M' - if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd' + if s:tex_fast =~# 'M' + if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'd' syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup @@ -466,7 +466,7 @@ if !exists("g:tex_no_math") syn match texMathOper "[_^=]" contained " Text Inside Math Zones: {{{2 - if s:tex_fast =~ 'M' + if s:tex_fast =~# 'M' if !exists("g:tex_nospell") || !g:tex_nospell syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell else @@ -476,7 +476,7 @@ if !exists("g:tex_no_math") " \left..something.. and \right..something.. support: {{{2 syn match texMathDelimBad contained "\S" - if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'm' + if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm' syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={ syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=} let s:texMathDelimList=[ @@ -568,13 +568,13 @@ else " allows syntax-folding of 2 or more contiguous comment lines " single-line comments are not folded syn match texComment "%.*$" contains=@texCommentGroup - if s:tex_fast =~ 'c' + if s:tex_fast =~# 'c' TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' contains=@texCommentGroup TexFold syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell endif else syn match texComment "%.*$" contains=@texCommentGroup - if s:tex_fast =~ 'c' + if s:tex_fast =~# 'c' syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell endif endif @@ -583,7 +583,7 @@ endif " Separate lines used for verb` and verb# so that the end conditions {{{1 " will appropriately terminate. " If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there. -if s:tex_fast =~ 'v' +if s:tex_fast =~# 'v' if exists("g:tex_verbspell") && g:tex_verbspell syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell " listings package: @@ -614,7 +614,7 @@ if s:tex_fast =~ 'v' endif " Tex Reference Zones: {{{1 -if s:tex_fast =~ 'r' +if s:tex_fast =~# 'r' syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup @@ -628,13 +628,13 @@ syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite " Handle newcommand, newenvironment : {{{1 syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl -if s:tex_fast =~ 'V' +if s:tex_fast =~# 'V' syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup endif syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl -if s:tex_fast =~ 'V' +if s:tex_fast =~# 'V' syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup @@ -660,11 +660,11 @@ syn match texString "\(``\|''\|,,\)" " makeatletter -- makeatother sections if !s:tex_no_error - if s:tex_fast =~ 'S' + if s:tex_fast =~# 'S' syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained endif syn match texStyleStatement "\\[a-zA-Z@]\+" contained - if s:tex_fast =~ 'S' + if s:tex_fast =~# 'S' syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained endif @@ -675,7 +675,7 @@ if has("conceal") && &enc == 'utf-8' " Math Symbols {{{2 " (many of these symbols were contributed by Björn Winckler) - if s:tex_conceal =~ 'm' + if s:tex_conceal =~# 'm' let s:texMathList=[ \ ['|' , '‖'], \ ['aleph' , 'ℵ'], @@ -956,7 +956,7 @@ if has("conceal") && &enc == 'utf-8' " \ ['uminus' , 'X'] " \ ['uplus' , 'X'] for texmath in s:texMathList - if texmath[0] =~ '\w$' + if texmath[0] =~# '\w$' exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] else exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1] @@ -995,7 +995,7 @@ if has("conceal") && &enc == 'utf-8' endif " Greek {{{2 - if s:tex_conceal =~ 'g' + if s:tex_conceal =~# 'g' fun! s:Greek(group,pat,cchar) exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar endfun @@ -1042,14 +1042,14 @@ if has("conceal") && &enc == 'utf-8' endif " Superscripts/Subscripts {{{2 - if s:tex_conceal =~ 's' - if s:tex_fast =~ 's' + if s:tex_conceal =~# 's' + if s:tex_fast =~# 's' syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher endif " s:SuperSub: fun! s:SuperSub(group,leader,pat,cchar) - if a:pat =~ '^\\' || (a:leader == '\^' && a:pat =~ g:tex_superscripts) || (a:leader == '_' && a:pat =~ g:tex_subscripts) + if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# g:tex_superscripts) || (a:leader == '_' && a:pat =~# g:tex_subscripts) " call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">") exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' @@ -1154,7 +1154,7 @@ if has("conceal") && &enc == 'utf-8' endif " Accented characters: {{{2 - if s:tex_conceal =~ 'a' + if s:tex_conceal =~# 'a' if b:tex_stylish syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 @@ -1169,7 +1169,7 @@ if has("conceal") && &enc == 'utf-8' let i= i + 1 continue endif - if accent =~ '\a' + if accent =~# '\a' exe "syn match texAccent '".'\\'.accent.'\(\s*{'.a:chr.'}\|\s\+'.a:chr.'\)'."' conceal cchar=".a:{i} else exe "syn match texAccent '".'\\'.accent.'\s*\({'.a:chr.'}\|'.a:chr.'\)'."' conceal cchar=".a:{i} diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 9928051c26..0206a61e78 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim 7.4 script " Maintainer: Charles E. Campbell " Last Change: February 17, 2016 -" Version: 7.4-43 +" Version: 7.4-44 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -83,43 +83,43 @@ syn keyword vimFuncName contained add append arglistid assert_equal assert_false " Special Vim Highlighting (not automatic) {{{1 " Set up folding commands -if exists("g:vimsyn_folding") && g:vimsyn_folding =~ '[aflmpPrt]' - if g:vimsyn_folding =~ 'a' +if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[aflmpPrt]' + if g:vimsyn_folding =~# 'a' com! -nargs=* VimFolda fold else com! -nargs=* VimFolda endif - if g:vimsyn_folding =~ 'f' + if g:vimsyn_folding =~# 'f' com! -nargs=* VimFoldf fold else com! -nargs=* VimFoldf endif - if g:vimsyn_folding =~ 'l' + if g:vimsyn_folding =~# 'l' com! -nargs=* VimFoldl fold else com! -nargs=* VimFoldl endif - if g:vimsyn_folding =~ 'm' + if g:vimsyn_folding =~# 'm' com! -nargs=* VimFoldm fold else com! -nargs=* VimFoldm endif - if g:vimsyn_folding =~ 'p' + if g:vimsyn_folding =~# 'p' com! -nargs=* VimFoldp fold else com! -nargs=* VimFoldp endif - if g:vimsyn_folding =~ 'P' + if g:vimsyn_folding =~# 'P' com! -nargs=* VimFoldP fold else com! -nargs=* VimFoldP endif - if g:vimsyn_folding =~ 'r' + if g:vimsyn_folding =~# 'r' com! -nargs=* VimFoldr fold else com! -nargs=* VimFoldr endif - if g:vimsyn_folding =~ 't' + if g:vimsyn_folding =~# 't' com! -nargs=* VimFoldt fold else com! -nargs=* VimFoldt @@ -190,7 +190,7 @@ syn keyword vimFTOption contained detect indent off on plugin " 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 -if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a' +if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' syn region vimAugroup fold matchgroup=vimAugroupKey start="\\ze\s\+\K\k*" end="\\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList else syn region vimAugroup matchgroup=vimAugroupKey start="\\ze\s\+\K\k*" end="\\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList @@ -218,7 +218,7 @@ syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimF syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand syn match vimFunction "\\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody -if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f' +if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList else syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList @@ -611,12 +611,12 @@ syn region vimGlobal matchgroup=Statement start='\ " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2016-01-25 +" Latest Revision: 2016-02-15 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh @@ -13,20 +13,29 @@ endif let s:cpo_save = &cpo set cpo&vim -setlocal iskeyword+=- -setlocal foldmethod=syntax +if v:version > 704 || (v:version == 704 && has("patch1142")) + syn iskeyword @,48-57,_,192-255,#,- +else + setlocal iskeyword+=- +endif +if get(g:, 'zsh_fold_enable', 0) + setlocal foldmethod=syntax +endif syn keyword zshTodo contained TODO FIXME XXX NOTE syn region zshComment oneline start='\%(^\|\s*\)#' end='$' - \ contains=zshTodo,@Spell + \ contains=zshTodo,@Spell fold + +syn region zshComment start='^\s*#' end='^\%(\s*#\)\@!' + \ contains=zshTodo,@Spell fold syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$' syn match zshQuoted '\\.' syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+ - \ contains=zshQuoted,@zshDerefs,@zshSubst -syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ + \ contains=zshQuoted,@zshDerefs,@zshSubst fold +syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold " XXX: This should probably be more precise, but Zsh seems a bit confused about it itself syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+ \ end=+'+ contains=zshQuoted @@ -46,7 +55,7 @@ syn keyword zshException always syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite -syn match zshKSHFunction contained '\k\+' +syn match zshKSHFunction contained '\w\S\+' syn match zshFunction '^\s*\k\+\ze\s*()' syn match zshOperator '||\|&&\|;\|&!\=' @@ -317,6 +326,8 @@ syn region zshMathSubst matchgroup=zshSubstDelim transparent \ @zshDerefs,zshString keepend fold syn region zshBrackets contained transparent start='{' skip='\\}' \ end='}' fold +syn region zshBrackets transparent start='{' skip='\\}' + \ end='}' contains=TOP fold syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}' \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ diff --git a/src/appveyor.bat b/src/appveyor.bat new file mode 100644 index 0000000000..b2e406ea13 --- /dev/null +++ b/src/appveyor.bat @@ -0,0 +1,46 @@ +@echo off +:: Batch file for building/testing Vim on AppVeyor + +setlocal ENABLEDELAYEDEXPANSION +cd %APPVEYOR_BUILD_FOLDER% + +cd src +echo "Building MinGW 32bit console version" +set PATH=c:\msys64\mingw32\bin;%PATH% +mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1 +:: Save vim.exe before Make clean, moved back below. +copy vim.exe testdir +mingw32-make.exe -f Make_ming.mak clean + +:: Build Mingw huge version with python and channel support, or +:: with specified features without python. +echo "Building MinGW 32bit GUI version" +if "%FEATURE%" == "HUGE" ( + mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=34 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python34 FEATURES=%FEATURE% || exit 1 +) ELSE ( + mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1 +) +.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt + +echo "Building MSVC 64bit console Version" +sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak +nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1 +nmake -f Make_mvc2.mak clean + +:: build MSVC huge version with python and channel support +:: GUI needs to be last, so that testing works +echo "Building MSVC 64bit GUI Version" +if "%FEATURE%" == "HUGE" ( + nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=34 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python34-x64 FEATURES=%FEATURE% || exit 1 +) ELSE ( + nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1 +) +.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt + +:: Restore vim.exe, tests will run with this. +move /Y testdir\vim.exe . +echo "version output MinGW" +type ver_ming.txt +echo "version output MVC" +type ver_msvc.txt +cd .. diff --git a/src/channel.c b/src/channel.c index 912be3b1f1..484459815a 100644 --- a/src/channel.c +++ b/src/channel.c @@ -315,7 +315,7 @@ add_channel(void) void channel_free(channel_T *channel) { - channel_close(channel); + channel_close(channel, TRUE); if (channel->ch_next != NULL) channel->ch_next->ch_prev = channel->ch_prev; if (channel->ch_prev == NULL) @@ -1485,7 +1485,7 @@ channel_status(channel_T *channel) * This does not trigger the close callback. */ void -channel_close(channel_T *channel) +channel_close(channel_T *channel, int invoke_close_cb) { ch_log(channel, "Closing channel"); @@ -1516,7 +1516,7 @@ channel_close(channel_T *channel) } #endif - if (channel->ch_close_cb != NULL) + if (invoke_close_cb && channel->ch_close_cb != NULL) { typval_T argv[1]; typval_T rettv; @@ -1776,7 +1776,7 @@ channel_read(channel_T *channel, int part, char *func) /* TODO: When reading from stdout is not possible, should we try to * keep stdin and stderr open? Probably not, assume the other side * has died. */ - channel_close(channel); + channel_close(channel, TRUE); if (channel->ch_nb_close_cb != NULL) (*channel->ch_nb_close_cb)(); diff --git a/src/eval.c b/src/eval.c index 1d78daa56a..be0270929b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -10213,7 +10213,7 @@ f_ch_close(typval_T *argvars, typval_T *rettv UNUSED) channel_T *channel = get_channel_arg(&argvars[0]); if (channel != NULL) - channel_close(channel); + channel_close(channel, FALSE); } # ifdef FEAT_JOB diff --git a/src/farsi.c b/src/farsi.c index 28f86f46c8..4921604d1a 100644 --- a/src/farsi.c +++ b/src/farsi.c @@ -764,8 +764,8 @@ fkmap(int c) if (!p_ri) dec_cursor(); - chg_c_toX_orX (); - chg_l_toXor_X (); + chg_c_toX_orX (); + chg_l_toXor_X (); if (!p_ri) inc_cursor(); @@ -1243,7 +1243,7 @@ fkmap(int c) if (!p_ri) dec_cursor(); - tempc = LA; + tempc = LA; } else { diff --git a/src/netbeans.c b/src/netbeans.c index 33b5571397..0703a56515 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -100,7 +100,7 @@ netbeans_close(void) netbeans_send_disconnect(); if (nb_channel != NULL) /* Close the socket and remove the input handlers. */ - channel_close(nb_channel); + channel_close(nb_channel, TRUE); nb_channel = NULL; } diff --git a/src/proto/channel.pro b/src/proto/channel.pro index 81935bf9a5..96b51b9773 100644 --- a/src/proto/channel.pro +++ b/src/proto/channel.pro @@ -17,7 +17,7 @@ int channel_collapse(channel_T *channel, int part); int channel_can_write_to(channel_T *channel); int channel_is_open(channel_T *channel); char *channel_status(channel_T *channel); -void channel_close(channel_T *channel); +void channel_close(channel_T *channel, int invoke_close_cb); char_u *channel_peek(channel_T *channel, int part); void channel_clear(channel_T *channel); void channel_free_all(void); diff --git a/src/version.c b/src/version.c index ca1600f4b2..941a880351 100644 --- a/src/version.c +++ b/src/version.c @@ -763,6 +763,14 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1415, +/**/ + 1414, +/**/ + 1413, +/**/ + 1412, /**/ 1411, /**/