diff options
-rw-r--r-- | runtime/doc/eval.txt | 15 | ||||
-rw-r--r-- | runtime/doc/help.txt | 2 | ||||
-rw-r--r-- | runtime/doc/helphelp.txt | 6 | ||||
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/pattern.txt | 6 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 2 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 50 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 9 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 40 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 5 | ||||
-rw-r--r-- | runtime/pack/dist/opt/vimball/autoload/vimball.vim | 32 | ||||
-rw-r--r-- | runtime/pack/dist/opt/vimball/plugin/vimballPlugin.vim | 29 | ||||
-rw-r--r-- | runtime/syntax/c.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/mysql.vim | 30 | ||||
-rw-r--r-- | runtime/syntax/sh.vim | 21 | ||||
-rw-r--r-- | runtime/syntax/tex.vim | 14 |
16 files changed, 170 insertions, 99 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3495f9c004..0ca41370e9 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 Mar 29 +*eval.txt* For Vim version 7.4. Last change: 2016 Apr 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -413,7 +413,8 @@ only appear once. Examples: > A key is always a String. You can use a Number, it will be converted to a String automatically. Thus the String '4' and the number 4 will find the same entry. Note that the String '04' and the Number 04 are different, since the -Number will be converted to the String '4'. +Number will be converted to the String '4'. The empty string can be used as a +key. A value can be any expression. Using a Dictionary for a value creates a nested Dictionary: > @@ -861,11 +862,12 @@ These three can be repeated and mixed. Examples: expr8 *expr8* ----- expr8[expr1] item of String or |List| *expr-[]* *E111* + *subscript* If expr8 is a Number or String this results in a String that contains the expr1'th single byte from expr8. expr8 is used as a String, expr1 as a Number. This doesn't recognize multi-byte encodings, see |byteidx()| for -an alternative. +an alternative, or use `split()` to turn the string into a list of characters. Index zero gives the first byte. This is like it works in C. Careful: text column numbers start with one! Example, to get the byte under the @@ -2155,6 +2157,7 @@ writefile({list}, {fname} [, {flags}]) Number write list of lines to file {fname} xor({expr}, {expr}) Number bitwise XOR + abs({expr}) *abs()* Return the absolute value of {expr}. When {expr} evaluates to a |Float| abs() returns a |Float|. When {expr} can be @@ -2779,6 +2782,7 @@ cursor({list}) When there is one argument {list} this is used as a |List| with two, three or four item: + [{lnum}, {col}] [{lnum}, {col}, {off}] [{lnum}, {col}, {off}, {curswant}] This is like the return value of |getpos()| or |getcurpos()|, @@ -3207,7 +3211,10 @@ feedkeys({string} [, {mode}]) *feedkeys()* similar to using ":normal!". You can call feedkeys() several times without 'x' and then one time with 'x' (possibly with an empty {string}) to execute all the - typeahead. + typeahead. Note that when Vim ends in Insert mode it + will behave as if <Esc> is typed, to avoid getting + stuck, waiting for a character to be typed before the + script continues. Return value is always 0. filereadable({file}) *filereadable()* diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 305eaea924..fc4816a6c8 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 Feb 27 +*help.txt* For Vim version 7.4. Last change: 2016 Mar 31 VIM - main help file k diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index 9654f249fa..ca341af200 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 7.4. Last change: 2016 Mar 28 +*helphelp.txt* For Vim version 7.4. Last change: 2016 Apr 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -313,6 +313,10 @@ aligned on a line. When referring to an existing help tag and to create a hot-link, place the name between two bars (|) eg. |help-writing|. +When referring to a Vim command and to create a hot-link, place the +name between two backticks, eg. inside `:filetype`. You will see this is +highlighted as a command, like a code block (see below). + When referring to a Vim option in the help file, place the option name between two single quotes, eg. 'statusline' diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 669f74186c..e00f27f9f0 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 Mar 24 +*options.txt* For Vim version 7.4. Last change: 2016 Apr 12 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 5897f756d8..0fe6106ec5 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.4. Last change: 2016 Jan 03 +*pattern.txt* For Vim version 7.4. Last change: 2016 Apr 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1096,8 +1096,8 @@ x A single character, with no special meaning, matches itself '/', alphabetic, numeric, '_' or '~'. These items only work for 8-bit characters, except [:lower:] and [:upper:] also work for multi-byte characters when using the new - regexp engine. In the future these items may work for multi-byte - characters. + regexp engine. See |two-engines|. In the future these items may + work for multi-byte characters. */[[=* *[==]* - An equivalence class. This means that characters are matched that have almost the same meaning, e.g., when ignoring accents. This diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index b6ab33dd16..fcfecc02a1 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.4. Last change: 2016 Feb 24 +*quickref.txt* For Vim version 7.4. Last change: 2016 Mar 30 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 5a2396669e..e84bbe5439 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 Mar 27 +*repeat.txt* For Vim version 7.4. Last change: 2016 Apr 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -70,8 +70,8 @@ examples. The global commands work by first scanning through the [range] lines and marking each line where a match occurs (for a multi-line pattern, only the start of the match matters). -In a second scan the [cmd] is executed for each marked line with its line -number prepended. For ":v" and ":g!" the command is executed for each not +In a second scan the [cmd] is executed for each marked line, as if the cursor +was in that line. For ":v" and ":g!" the command is executed for each not marked line. If a line is deleted its mark disappears. The default for [range] is the whole buffer (1,$). Use "CTRL-C" to interrupt the command. If an error message is given for a line, the command for that @@ -225,8 +225,11 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. there yet. Note that {name} is the directory name, not the name - of the .vim file. If the "{name}/plugin" directory - contains more than one file they are all sourced. + of the .vim file. All the files matching the pattern + pack/*/opt/{name}/plugin/**/*.vim ~ + will be sourced. This allows for using subdirectories + below "plugin", just like with plugins in + 'runtimepath'. If the filetype detection was not enabled yet (this is usually done with a "syntax enable" or "filetype @@ -242,15 +245,24 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. Also see |pack-add|. *:packl* *:packloadall* -:packloadall[!] Load all packages in the "start" directories under - 'packpath'. The directories found are added to - 'runtimepath'. +:packl[oadall][!] Load all packages in the "start" directory under each + entry in 'packpath'. + + First all the directories found are added to + 'runtimepath', then the plugins found in the + directories are sourced. This allows for a plugin to + depend on something of another plugin, e.g. an + "autoload" directory. See |packload-two-steps| for + how this can be useful. + This is normally done automatically during startup, after loading your .vimrc file. With this command it can be done earlier. + Packages will be loaded only once. After this command it won't happen again. When the optional ! is added this command will load packages even when done before. + An error only causes sourcing the script where it happens to be aborted, further plugins will be loaded. See |packages|. @@ -456,8 +468,9 @@ You would now have these files under ~/.local/share/nvim/site: pack/foo/opt/foodebug/plugin/debugger.vim When Vim starts up, after processing your .vimrc, it scans all directories in -'packpath' for plugins under the "pack/*/start" directory and loads them. The -directory is added to 'runtimepath'. +'packpath' for plugins under the "pack/*/start" directory. First all those +directories are added to 'runtimepath'. Then all the plugins are loaded. +See |packload-two-steps| for how these two steps can be useful. In the example Vim will find "pack/foo/start/foobar/plugin/foo.vim" and adds "~/.local/share/nvim/site/pack/foo/start/foobar" to 'runtimepath'. @@ -585,6 +598,23 @@ the command after changing the plugin help: > :helptags path/start/foobar/doc :helptags path/opt/fooextra/doc + +Dependencies between plugins ~ + *packload-two-steps* +Suppose you have a two plugins that depend on the same functionality. You can +put the common functionality in an autoload directory, so that it will be +found automatically. Your package would have these files: + + pack/foo/start/one/plugin/one.vim > + call foolib#getit() +< pack/foo/start/two/plugin/two.vim > + call foolib#getit() +< pack/foo/start/lib/autoload/foolib.vim > + func foolib#getit() + +This works, because loading packages will first add all found directories to +'runtimepath' before sourcing the plugins. + ============================================================================== 7. Debugging scripts *debug-scripts* diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 4829307706..236ed65f46 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 7.4. Last change: 2016 Mar 26 +*starting.txt* For Vim version 7.4. Last change: 2016 Apr 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -464,9 +464,10 @@ accordingly. Vim proceeds in this order: commands from the command line have not been executed yet. You can use "--cmd 'set noloadplugins'" |--cmd|. - Plugin packs are loaded. These are plugins, as above, but found in - 'packpath' "start" directories. Every plugin directory found is added - in 'runtimepath'. See |packages|. + Packages are loaded. These are plugins, as above, but found in the + "start" directory of each entry in 'packpath'. Every plugin directory + found is added in 'runtimepath' and then the plugins are sourced. See + |packages|. 7. Set 'shellpipe' and 'shellredir' The 'shellpipe' and 'shellredir' options are set according to the diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 9bec855190..491e5801c8 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 Mar 12 +*syntax.txt* For Vim version 7.4. Last change: 2016 Apr 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -936,26 +936,27 @@ To disable them use ":unlet". Example: > :unlet c_comment_strings Variable Highlight ~ -c_gnu GNU gcc specific items -c_comment_strings strings and numbers inside a comment -c_space_errors trailing white space and spaces before a <Tab> -c_no_trail_space_error ... but no trailing spaces -c_no_tab_space_error ... but no spaces before a <Tab> -c_no_bracket_error don't highlight {}; inside [] as errors -c_no_curly_error don't highlight {}; inside [] and () as errors; +*c_gnu* GNU gcc specific items +*c_comment_strings* strings and numbers inside a comment +*c_space_errors* trailing white space and spaces before a <Tab> +*c_no_trail_space_error* ... but no trailing spaces +*c_no_tab_space_error* ... but no spaces before a <Tab> +*c_no_bracket_error* don't highlight {}; inside [] as errors +*c_no_curly_error* don't highlight {}; inside [] and () as errors; except { and } in first column -c_curly_error highlight a missing }; this forces syncing from the +*c_curly_error* highlight a missing }; this forces syncing from the start of the file, can be slow -c_no_ansi don't do standard ANSI types and constants -c_ansi_typedefs ... but do standard ANSI types -c_ansi_constants ... but do standard ANSI constants -c_no_utf don't highlight \u and \U in strings -c_syntax_for_h for *.h files use C syntax instead of C++ and use objc +*c_no_ansi* don't do standard ANSI types and constants +*c_ansi_typedefs* ... but do standard ANSI types +*c_ansi_constants* ... but do standard ANSI constants +*c_no_utf* don't highlight \u and \U in strings +*c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc syntax instead of objcpp -c_no_if0 don't highlight "#if 0" blocks as comments -c_no_cformat don't highlight %-formats in strings -c_no_c99 don't highlight C99 standard items -c_no_c11 don't highlight C11 standard items +*c_no_if0* don't highlight "#if 0" blocks as comments +*c_no_cformat* don't highlight %-formats in strings +*c_no_c99* don't highlight C99 standard items +*c_no_c11* don't highlight C11 standard items +*c_no_bsd* don't highlight BSD specific types When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will become a fold. If you don't want comments to become a fold use: > @@ -5026,6 +5027,9 @@ defaults back: > :syntax reset +It is a bit of a wrong name, since it does not reset any syntax items, it only +affects the highlighting. + This doesn't change the colors for the 'highlight' option. Note that the syntax colors that you set in your vimrc file will also be reset diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index f00f03bae8..4d3ad49f1f 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.4. Last change: 2016 Mar 27 +*usr_41.txt* For Vim version 7.4. Last change: 2016 Apr 12 VIM USER MANUAL - by Bram Moolenaar @@ -768,6 +768,7 @@ Date and Time: *date-functions* *time-functions* strftime() convert time to a string reltime() get the current or elapsed time accurately reltimestr() convert reltime() result to a string + reltimefloat() convert reltime() result to a Float *buffer-functions* *window-functions* *arg-functions* Buffers, windows and the argument list: @@ -890,7 +891,9 @@ Mappings: *mapping-functions* Testing: *test-functions* assert_equal() assert that two expressions values are equal + assert_notequal() assert that two expressions values are not equal assert_match() assert that a pattern matches the value + assert_notmatch() assert that a pattern does not match the value assert_false() assert that an expression is false assert_true() assert that an expression is true assert_exception() assert that a command throws an exception diff --git a/runtime/pack/dist/opt/vimball/autoload/vimball.vim b/runtime/pack/dist/opt/vimball/autoload/vimball.vim index 9a5a73c3c1..1af6b19c88 100644 --- a/runtime/pack/dist/opt/vimball/autoload/vimball.vim +++ b/runtime/pack/dist/opt/vimball/autoload/vimball.vim @@ -1,9 +1,9 @@ " vimball.vim : construct a file containing both paths and files -" Author: Charles E. Campbell, Jr. -" Date: Jan 17, 2012 -" Version: 35 +" Author: Charles E. Campbell +" Date: Apr 11, 2016 +" Version: 37 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim -" Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. +" Copyright: (c) 2004-2011 by Charles E. Campbell " The VIM LICENSE applies to Vimball.vim, and Vimball.txt " (see |copyright|) except use "Vimball" instead of "Vim". " No warranty, express or implied. @@ -14,7 +14,7 @@ if &cp || exists("g:loaded_vimball") finish endif -let g:loaded_vimball = "v35" +let g:loaded_vimball = "v37" if v:version < 702 echohl WarningMsg echo "***warning*** this version of vimball needs vim 7.2" @@ -142,7 +142,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range let lastline= line("$") + 1 if lastline == 2 && getline("$") == "" - call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.') + call setline(1,'" Vimball Archiver by Charles E. Campbell') call setline(2,'UseVimball') call setline(3,'finish') let lastline= line("$") + 1 @@ -179,7 +179,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range " remove the evidence setlocal nomod bh=wipe exe "tabn ".curtabnr - exe "tabc ".vbtabnr + exe "tabc! ".vbtabnr " restore options call vimball#RestoreSettings() @@ -280,7 +280,7 @@ fun! vimball#Vimball(really,...) " when AsNeeded/filename is filereadable or was present in VimballRecord if fname =~ '\<plugin/' let anfname= substitute(fname,'\<plugin/','AsNeeded/','') - if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname) + if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~# anfname) " call Decho("using anfname<".anfname."> instead of <".fname.">") let fname= anfname endif @@ -379,10 +379,10 @@ fun! vimball#Vimball(really,...) call s:RecordInFile(home) " restore events, delete tab and buffer - exe "tabn ".vbtabnr + exe "sil! tabn ".vbtabnr setlocal nomod bh=wipe - exe "tabn ".curtabnr - exe "tabc ".vbtabnr + exe "sil! tabn ".curtabnr + exe "sil! tabc! ".vbtabnr call vimball#RestoreSettings() call s:ChgDir(curdir) @@ -555,7 +555,7 @@ fun! vimball#ShowMesg(level,msg) set noruler noshowcmd redraw! - if &fo =~ '[ta]' + if &fo =~# '[ta]' echomsg "***vimball*** ".a:msg else if a:level == s:WARNING || a:level == s:USAGE @@ -715,7 +715,7 @@ fun! vimball#SaveSettings() " call Dfunc("SaveSettings()") let s:makeep = getpos("'a") let s:regakeep= @a - if exists("&acd") + if exists("+acd") let s:acdkeep = &acd endif let s:eikeep = &ei @@ -728,7 +728,7 @@ fun! vimball#SaveSettings() let s:vekeep = &ve let s:ffkeep = &l:ff let s:swfkeep = &l:swf - if exists("&acd") + if exists("+acd") setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf else setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf @@ -743,7 +743,7 @@ endfun fun! vimball#RestoreSettings() " call Dfunc("RestoreSettings()") let @a = s:regakeep - if exists("&acd") + if exists("+acd") let &acd = s:acdkeep endif let &l:fen = s:fenkeep @@ -760,7 +760,7 @@ fun! vimball#RestoreSettings() " call Decho("restore mark-a: makeep=".string(makeep)) call setpos("'a",s:makeep) endif - if exists("&acd") + if exists("+acd") unlet s:acdkeep endif unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep diff --git a/runtime/pack/dist/opt/vimball/plugin/vimballPlugin.vim b/runtime/pack/dist/opt/vimball/plugin/vimballPlugin.vim index 59279774ca..d7473a0296 100644 --- a/runtime/pack/dist/opt/vimball/plugin/vimballPlugin.vim +++ b/runtime/pack/dist/opt/vimball/plugin/vimballPlugin.vim @@ -1,6 +1,6 @@ " vimballPlugin : construct a file containing both paths and files -" Author: Charles E. Campbell, Jr. -" Copyright: (c) 2004-2010 by Charles E. Campbell, Jr. +" Author: Charles E. Campbell +" Copyright: (c) 2004-2014 by Charles E. Campbell " The VIM LICENSE applies to Vimball.vim, and Vimball.txt " (see |copyright|) except use "Vimball" instead of "Vim". " No warranty, express or implied. @@ -16,22 +16,25 @@ if &cp || exists("g:loaded_vimballPlugin") finish endif -let g:loaded_vimballPlugin = "v35" +let g:loaded_vimballPlugin = "v37" let s:keepcpo = &cpo set cpo&vim " ------------------------------------------------------------------------------ " Public Interface: {{{1 -com! -ra -complete=file -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>) -com! -na=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>) -com! -na=0 VimballList call vimball#Vimball(0) -com! -na=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings() -au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") -au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif -au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif -au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") -au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif -au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif +com! -range -complete=file -nargs=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>) +com! -nargs=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>) +com! -nargs=0 VimballList call vimball#Vimball(0) +com! -nargs=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings() +augroup Vimball + au! + au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif + au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif + au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif + au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif + au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif + au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif +augroup END " ===================================================================== " Restoration And Modelines: {{{1 diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 32b63e09e4..3fe3256059 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2016 Feb 08 +" Last Change: 2016 Apr 10 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -248,6 +248,10 @@ if !exists("c_no_c99") " ISO C99 syn keyword cType _Bool bool _Complex complex _Imaginary imaginary syn keyword cType int8_t int16_t int32_t int64_t syn keyword cType uint8_t uint16_t uint32_t uint64_t + if !exists("c_no_bsd") + " These are BSD specific. + syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t + endif syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim index c01ecc192b..d7cf74710d 100644 --- a/runtime/syntax/mysql.vim +++ b/runtime/syntax/mysql.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: mysql " Maintainer: Kenneth J. Pronovici <pronovic@ieee.org> -" Last Change: $LastChangedDate: 2010-04-22 09:48:02 -0500 (Thu, 22 Apr 2010) $ +" Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $ " Filenames: *.mysql " URL: ftp://cedar-solutions.com/software/mysql.vim " Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 @@ -18,7 +18,7 @@ endif syn case ignore " General keywords which don't fall into other categories -syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg avg_row_length +syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg_row_length syn keyword mysqlKeyword both by syn keyword mysqlKeyword cascade change character check checksum column columns comment constraint create cross syn keyword mysqlKeyword current_date current_time current_timestamp @@ -30,7 +30,7 @@ syn keyword mysqlKeyword global grant grants group syn keyword mysqlKeyword having heap high_priority hosts hour hour_minute hour_second syn keyword mysqlKeyword identified ignore index infile inner insert insert_id into isam syn keyword mysqlKeyword join -syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long +syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long syn keyword mysqlKeyword low_priority syn keyword mysqlKeyword match max_rows middleint min_rows minute minute_second modify month myisam syn keyword mysqlKeyword natural no @@ -64,6 +64,9 @@ syn match mysqlNumber "\<0x[abcdefABCDEF0-9]*\>" " User variables syn match mysqlVariable "@\a*[A-Za-z0-9]*\([._]*[A-Za-z0-9]\)*" +" Escaped column names +syn match mysqlEscaped "`[^`]*`" + " Comments (c-style, mysql-style and modified sql-style) syn region mysqlComment start="/\*" end="\*/" syn match mysqlComment "#.*" @@ -84,14 +87,14 @@ syn sync ccomment mysqlComment " The second problem is that some of these keywords are included in " function names. For instance, year() is part of the name of the " dayofyear() function, and the dec keyword (no parenthesis) is part of -" the name of the decode() function. +" the name of the decode() function. -syn keyword mysqlType tinyint smallint mediumint int integer bigint -syn keyword mysqlType date datetime time bit bool +syn keyword mysqlType tinyint smallint mediumint int integer bigint +syn keyword mysqlType date datetime time bit bool syn keyword mysqlType tinytext mediumtext longtext text syn keyword mysqlType tinyblob mediumblob longblob blob -syn region mysqlType start="float\W" end="."me=s-1 -syn region mysqlType start="float$" end="."me=s-1 +syn region mysqlType start="float\W" end="."me=s-1 +syn region mysqlType start="float$" end="."me=s-1 syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="double\W" end="."me=s-1 syn region mysqlType start="double$" end="."me=s-1 @@ -139,12 +142,12 @@ syn region mysqlFlow start="if(" end=")" contains=ALL " " I'm leery of just defining keywords for functions, since according to the MySQL manual: " -" Function names do not clash with table or column names. For example, ABS is a -" valid column name. The only restriction is that for a function call, no spaces -" are allowed between the function name and the `(' that follows it. +" Function names do not clash with table or column names. For example, ABS is a +" valid column name. The only restriction is that for a function call, no spaces +" are allowed between the function name and the `(' that follows it. " -" This means that if I want to highlight function names properly, I have to use a -" region to define them, not just a keyword. This will probably cause the syntax file +" This means that if I want to highlight function names properly, I have to use a +" region to define them, not just a keyword. This will probably cause the syntax file " to load more slowly, but at least it will be 'correct'. syn region mysqlFunction start="abs(" end=")" contains=ALL @@ -154,6 +157,7 @@ syn region mysqlFunction start="ascii(" end=")" contains=ALL syn region mysqlFunction start="asin(" end=")" contains=ALL syn region mysqlFunction start="atan(" end=")" contains=ALL syn region mysqlFunction start="atan2(" end=")" contains=ALL +syn region mysqlFunction start="avg(" end=")" contains=ALL syn region mysqlFunction start="benchmark(" end=")" contains=ALL syn region mysqlFunction start="bin(" end=")" contains=ALL syn region mysqlFunction start="bit_and(" end=")" contains=ALL diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 8b0a91f674..6ef5bf0d16 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 <NdrOchipS@PcampbellAfamily.Mbiz> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> -" Last Change: Mar 12, 2016 -" Version: 146 +" Last Change: Apr 11, 2016 +" Version: 147 " 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) @@ -539,13 +539,20 @@ endif " Synchronization: {{{1 " ================ -if !exists("sh_minlines") - let sh_minlines = 200 +if !exists("g:sh_minlines") + let s:sh_minlines = 200 +else + let s:sh_minlines= g:sh_minlines endif -if !exists("sh_maxlines") - let sh_maxlines = 2 * sh_minlines +if !exists("g:sh_maxlines") + let s:sh_maxlines = 2*s:sh_minlines + if s:sh_maxlines < 25 + let s:sh_maxlines= 25 + endif +else + let s:sh_maxlines= g:sh_maxlines endif -exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines +exec "syn sync minlines=" . s:sh_minlines . " maxlines=" . s:sh_maxlines syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" syn sync match shDoSync grouphere shDo "\<do\>" diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 5af5882a56..d6d5dd81ee 100644 --- 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: Mar 07, 2016 -" Version: 93 +" Last Change: Apr 11, 2016 +" Version: 94 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -83,10 +83,14 @@ else let s:tex_conceal= g:tex_conceal endif if !exists("g:tex_superscripts") - let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]" + let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]" +else + let s:tex_superscripts= g:tex_superscripts endif if !exists("g:tex_subscripts") - let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]" + let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]" +else + let s:tex_subscripts= g:tex_subscripts endif " Determine whether or not to use "*.sty" mode {{{1 @@ -1049,7 +1053,7 @@ if has("conceal") && &enc == 'utf-8' 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 =~# s:tex_superscripts) || (a:leader == '_' && a:pat =~# s: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' |