diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 03:16:52 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 03:23:37 +0100 |
commit | 8c3377ee76e5cc4f5a4228f216bde1d03b496d69 (patch) | |
tree | e183185d55b8ff85aad5e305a7895109562159ee | |
parent | 1a3e54231ab8b2fc29f5a37931713061ac400faa (diff) | |
download | rneovim-8c3377ee76e5cc4f5a4228f216bde1d03b496d69.tar.gz rneovim-8c3377ee76e5cc4f5a4228f216bde1d03b496d69.tar.bz2 rneovim-8c3377ee76e5cc4f5a4228f216bde1d03b496d69.zip |
vim-patch:c572da5f67aa
Update runtime files
https://github.com/vim/vim/commit/c572da5f67aa5cdbbc127fc6f1d0a42e38468325
-rw-r--r-- | runtime/doc/editing.txt | 1 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 2 | ||||
-rw-r--r-- | runtime/doc/intro.txt | 4 | ||||
-rw-r--r-- | runtime/doc/options.txt | 7 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 10 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 7 | ||||
-rw-r--r-- | runtime/ftplugin/verilog.vim | 21 | ||||
-rw-r--r-- | runtime/indent/verilog.vim | 30 | ||||
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 35 | ||||
-rw-r--r-- | runtime/scripts.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/debcontrol.vim | 16 | ||||
-rw-r--r-- | runtime/syntax/murphi.vim | 38 | ||||
-rw-r--r-- | runtime/syntax/n1ql.vim | 434 | ||||
-rw-r--r-- | runtime/syntax/sas.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 2 |
15 files changed, 557 insertions, 58 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index eb6da45794..1b9a1b38fb 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1032,6 +1032,7 @@ The names can be in upper- or lowercase. window in the current tab page the current tab page is closed |tab-page|. Triggers the |QuitPre| autocommand event. + See |CTRL-W_q| for quitting another window. :conf[irm] q[uit] Quit, but give prompt when changes have been made, or the last file in the argument list has not been diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 7ba172c98f..6743ed4812 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5660,7 +5660,6 @@ mode([expr]) Return a string that indicates the current mode. i Insert R Replace |R| Rv Virtual Replace |gR| - t Terminal c Command-line cv Vim Ex mode |gQ| ce Normal Ex mode |Q| @@ -5668,6 +5667,7 @@ mode([expr]) Return a string that indicates the current mode. rm The -- more -- prompt r? A |:confirm| query of some sort ! Shell or external command is executing + t Terminal mode: keys go to the job This is useful in the 'statusline' option or when used with |remote_expr()| In most other places it always returns "c" or "n". diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 9c52b2cc66..7760df01e9 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -787,10 +787,12 @@ by Vim. ============================================================================== 8. Definitions *definitions* + buffer Contains lines of text, usually read from a file. screen The whole area that Vim uses to work in. This can be a terminal emulator window. Also called "the Vim window". - window A view on a buffer. + window A view on a buffer. There can be multiple windows for + one buffer. A screen contains one or more windows, separated by status lines and with the command line at the bottom. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 3479336a1a..340be2368c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -354,12 +354,13 @@ On Unix systems the form "${HOME}" can be used too. The name between {} can contain non-id characters then. Note that if you want to use this for the "gf" command, you need to add the '{' and '}' characters to 'isfname'. -On MS-Windows, if $HOME is not defined as an environment variable, then -at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. - NOTE: expanding environment variables and "~/" is only done with the ":set" command, not when assigning a value to an option with ":let". + *$HOME-windows* +On MS-Windows, if $HOME is not defined as an environment variable, then +at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. + Note the maximum length of an expanded option is limited. How much depends on the system, mostly it is something like 256 or 1024 characters. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index eb8cd1a58b..611274b8d8 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2108,6 +2108,16 @@ set "msql_minlines" to the value you desire. Example: > :let msql_minlines = 200 +N1QL *n1ql.vim* *ft-n1ql-syntax* + +N1QL is a SQL-like declarative language for manipulating JSON documents in +Couchbase Server databases. + +Vim syntax highlights N1QL statements, keywords, operators, types, comments, +and special values. Vim ignores syntactical elements specific to SQL or its +many dialects, like COLUMN or CHAR, that don't exist in N1QL. + + NCF *ncf.vim* *ft-ncf-syntax* There is one option for NCF syntax highlighting. diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 5b1608ed34..6f371c7bc8 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -311,8 +311,9 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* *:hide* :hid[e] :{count}hid[e] - Quit the current window, unless it is the last window on the - screen. For {count} see |:quit|. + Without {count}: Quit the current window, unless it is the + last window on the screen. + If {count} is given quit the {count} window. The buffer becomes hidden (unless there is another window editing it or 'bufhidden' is `unload`, `delete` or `wipe`). @@ -994,6 +995,8 @@ list of buffers. |unlisted-buffer| displayed in a window |hidden-buffer| - a buffer with 'modifiable' off = a readonly buffer + R a terminal buffer with a running job + F a terminal buffer with a finished job + a modified buffer x a buffer with read errors diff --git a/runtime/ftplugin/verilog.vim b/runtime/ftplugin/verilog.vim index 6594f2ea90..cbf30a3185 100644 --- a/runtime/ftplugin/verilog.vim +++ b/runtime/ftplugin/verilog.vim @@ -1,8 +1,12 @@ " Vim filetype plugin file " Language: Verilog HDL -" Maintainer: Chih-Tsun Huang <cthuang@larc.ee.nthu.edu.tw> -" Last Change: Wed Sep 3 15:24:49 CST 2008 -" URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim +" Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw> +" Last Change: 2017 Aug 25 by Chih-Tsun Huang +" URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim +" +" Credits: +" Suggestions for improvement, bug reports by +" Shao <shaominghai2005@163.com> " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -45,11 +49,16 @@ if exists("loaded_matchit") \ '\<begin\>:\<end\>,' . \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' . \ '\<module\>:\<endmodule\>,' . - \ '\<if\>:\<else\>,' . + \ '\<if\>:`\@<!\<else\>,' . \ '\<function\>:\<endfunction\>,' . - \ '`ifdef\>:`else\>:`endif\>,' . + \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' . \ '\<task\>:\<endtask\>,' . - \ '\<specify\>:\<endspecify\>' + \ '\<specify\>:\<endspecify\>,' . + \ '\<config\>:\<endconfig\>,' . + \ '\<generate\>:\<endgenerate\>,' . + \ '\<fork\>:\<join\>,' . + \ '\<primitive\>:\<endprimitive\>,' . + \ '\<table\>:\<endtable\>' endif " Reset 'cpoptions' back to the user's setting diff --git a/runtime/indent/verilog.vim b/runtime/indent/verilog.vim index 6222dc341f..ab3d0ba3e0 100644 --- a/runtime/indent/verilog.vim +++ b/runtime/indent/verilog.vim @@ -1,6 +1,6 @@ " Language: Verilog HDL " Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw> -" Last Change: 2017 Feb 24 by Chih-Tsun Huang +" Last Change: 2017 Aug 25 by Chih-Tsun Huang " URL: http://www.cs.nthu.edu.tw/~cthuang/vim/indent/verilog.vim " " Credits: @@ -25,7 +25,8 @@ let b:did_indent = 1 setlocal indentexpr=GetVerilogIndent() setlocal indentkeys=!^F,o,O,0),=begin,=end,=join,=endcase setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify -setlocal indentkeys+==`else,=`endif +setlocal indentkeys+==endconfig,=endgenerate,=endprimitive,=endtable +setlocal indentkeys+==`else,=`elsif,=`endif " Only define the function once. if exists("*GetVerilogIndent") @@ -84,7 +85,9 @@ function GetVerilogIndent() endif " Indent after if/else/for/case/always/initial/specify/fork blocks - elseif last_line =~ '`\@<!\<\(if\|else\)\>' || + " Note: We exclude '`if' or '`else' and consider 'end else' + " 'end if' is redundant here + elseif last_line =~ '^\s*\(end\)\=\s*`\@<!\<\(if\|else\)\>' || \ last_line =~ '^\s*\<\(for\|case\%[[zx]]\)\>' || \ last_line =~ '^\s*\<\(always\|initial\)\>' || \ last_line =~ '^\s*\<\(specify\|fork\)\>' @@ -93,8 +96,8 @@ function GetVerilogIndent() let ind = ind + offset if vverb | echo vverb_str "Indent after a block statement." | endif endif - " Indent after function/task blocks - elseif last_line =~ '^\s*\<\(function\|task\)\>' + " Indent after function/task/config/generate/primitive/table blocks + elseif last_line =~ '^\s*\<\(function\|task\|config\|generate\|primitive\|table\)\>' if last_line !~ '\<end\>\s*' . vlog_comment . '*$' || \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . vlog_comment . '*$' let ind = ind + offset @@ -161,11 +164,11 @@ function GetVerilogIndent() let ind = ind - offset if vverb | echo vverb_str "De-indent after a close statement." | endif - " `ifdef and `else - elseif last_line =~ '^\s*`\<\(ifdef\|else\)\>' + " `ifdef or `ifndef or `elsif or `else + elseif last_line =~ '^\s*`\<\(ifn\?def\|elsif\|else\)\>' let ind = ind + offset if vverb - echo vverb_str "Indent after a `ifdef or `else statement." + echo vverb_str "Indent after a `ifdef or `ifndef or `elsif or `else statement." endif endif @@ -175,7 +178,8 @@ function GetVerilogIndent() " De-indent on the end of the block " join/end/endcase/endfunction/endtask/endspecify if curr_line =~ '^\s*\<\(join\|end\|endcase\)\>' || - \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\)\>' + \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\)\>' || + \ curr_line =~ '^\s*\<\(endconfig\|endgenerate\|endprimitive\|endtable\)\>' let ind = ind - offset if vverb | echo vverb_str "De-indent the end of a block." | endif elseif curr_line =~ '^\s*\<endmodule\>' @@ -186,7 +190,7 @@ function GetVerilogIndent() " De-indent on a stand-alone 'begin' elseif curr_line =~ '^\s*\<begin\>' - if last_line !~ '^\s*\<\(function\|task\|specify\|module\)\>' && + if last_line !~ '^\s*\<\(function\|task\|specify\|module\|config\|generate\|primitive\|table\)\>' && \ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . vlog_comment . '*$' && \ ( last_line =~ \ '\<\(`\@<!if\|`\@<!else\|for\|case\%[[zx]]\|always\|initial\)\>' || @@ -208,10 +212,10 @@ function GetVerilogIndent() echo vverb_str "De-indent the end of a multiple statement." endif - " De-indent `else and `endif - elseif curr_line =~ '^\s*`\<\(else\|endif\)\>' + " De-indent `elsif or `else or `endif + elseif curr_line =~ '^\s*`\<\(elsif\|else\|endif\)\>' let ind = ind - offset - if vverb | echo vverb_str "De-indent `else and `endif statement." | endif + if vverb | echo vverb_str "De-indent `elsif or `else or `endif statement." | endif endif diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim new file mode 100644 index 0000000000..97fadf695a --- /dev/null +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -0,0 +1,35 @@ +" Debugger commands. +" +" WORK IN PROGRESS - much doesn't work yet +" +" Open two terminal windows: +" 1. run a pty, as with ":term NONE" +" 2. run gdb, passing the pty +" The current window is used to edit source code and follows gdb. +" +" Author: Bram Moolenaar +" Copyright: Vim license applies + +command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>) + +if !exists('debugger') + let debugger = 'gdb' +endif + +func s:StartDebug(cmd) + " Open a terminal window without a job, to run the debugged program + let s:ptybuf = term_start('NONE', {}) + let pty = job_info(term_getjob(s:ptybuf))['tty'] + + " Open a terminal window to run the debugger. + let cmd = [g:debugger, '-tty', pty, a:cmd] + echomsg 'executing "' . join(cmd) . '"' + let gdbbuf = term_start(cmd, { + \ 'exit_cb': function('s:EndDebug'), + \ 'term_finish': 'close' + \ }) +endfunc + +func s:EndDebug(job, status) + exe 'bwipe! ' . s:ptybuf +endfunc diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 3b6163f9c2..12c09b6a1c 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2017 Mar 04 +" Last change: 2017 Aug 27 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -297,7 +297,7 @@ else set ft=virata " Strace - elseif s:line1 =~ '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~ '^__libc_start_main' + elseif s:line1 =~# '[0-9:.]* *execve(' || s:line1 =~# '^__libc_start_main' set ft=strace " VSE JCL diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index b1bc9f8bfe..1131c9e12f 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -3,7 +3,7 @@ " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2016 Aug 30 +" Last Change: 2017 Aug 18 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim " Standard syntax initialization @@ -21,8 +21,8 @@ syn case match syn match debcontrolElse "^.*$" " Common seperators -syn match debControlComma ", *" -syn match debControlSpace " " +syn match debControlComma ",[ \t]*" +syn match debControlSpace "[ \t]" let s:kernels = '\%(linux\|hurd\|kfreebsd\|knetbsd\|kopensolaris\|netbsd\)' let s:archs = '\%(alpha\|amd64\|armeb\|armel\|armhf\|arm64\|avr32\|hppa\|i386' @@ -38,7 +38,7 @@ unlet s:kernels s:archs s:pairs syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)" syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" -syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" +syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java%(script)=|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" syn match debcontrolPackageType contained "u\?deb" syn match debcontrolVariable contained "\${.\{-}}" syn match debcontrolDmUpload contained "\cyes" @@ -60,7 +60,7 @@ syn match debcontrolComment "^#.*$" contains=@Spell syn case ignore " List of all legal keys -syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\): *" +syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\|\%(XS-\)\=Testsuite\): *" syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *" @@ -79,9 +79,9 @@ syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=deb syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline " Catch-all for the other legal fields -syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline -syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment -syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell +syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline +syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment +syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell " Associate our matches and regions with pretty colours hi def link debcontrolKey Keyword diff --git a/runtime/syntax/murphi.vim b/runtime/syntax/murphi.vim index 5620010f9a..b2faa8c119 100644 --- a/runtime/syntax/murphi.vim +++ b/runtime/syntax/murphi.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Murphi model checking language " Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com> -" Last Change: 2017 May 3 +" Last Change: 2017 Aug 27 " Version: 2 " Remark: Originally authored by Diego Ongaro <ongaro@cs.stanford.edu> @@ -105,23 +105,23 @@ syn region murphiComment start="--" end="$" contains=murphiTodo syn region murphiComment start="/\*" end="\*/" contains=murphiTodo " Link the rules to some groups. -highlight link murphiComment Comment -highlight link murphiString String -highlight link murphiNumber Number -highlight link murphiBoolean Boolean -highlight link murphiIdentifier Identifier -highlight link murphiFunction Function -highlight link murphiStatement Statement -highlight link murphiConditional Conditional -highlight link murphiRepeat Repeat -highlight link murphiLabel Label -highlight link murphiOperator Operator -highlight link murphiKeyword Keyword -highlight link murphiType Type -highlight link murphiStructure Structure -highlight link murphiSpecial Special -highlight link murphiDelimiter Delimiter -highlight link murphiError Error -highlight link murphiTodo Todo +hi def link murphiComment Comment +hi def link murphiString String +hi def link murphiNumber Number +hi def link murphiBoolean Boolean +hi def link murphiIdentifier Identifier +hi def link murphiFunction Function +hi def link murphiStatement Statement +hi def link murphiConditional Conditional +hi def link murphiRepeat Repeat +hi def link murphiLabel Label +hi def link murphiOperator Operator +hi def link murphiKeyword Keyword +hi def link murphiType Type +hi def link murphiStructure Structure +hi def link murphiSpecial Special +hi def link murphiDelimiter Delimiter +hi def link murphiError Error +hi def link murphiTodo Todo let b:current_syntax = "murphi" diff --git a/runtime/syntax/n1ql.vim b/runtime/syntax/n1ql.vim new file mode 100644 index 0000000000..bef65d8f64 --- /dev/null +++ b/runtime/syntax/n1ql.vim @@ -0,0 +1,434 @@ +" Vim syntax file +" Language: N1QL / Couchbase Server +" Maintainer: Eugene Ciurana <n1ql AT cime.net> +" Version: 1.0 +" Source: https://github.com/pr3d4t0r/n1ql-vim-syntax +" +" License: Vim is Charityware. n1ql.vim syntax is Charityware. +" (c) Copyright 2017 by Eugene Ciurana / pr3d4t0r. Licensed +" under the standard VIM LICENSE - Vim command :help uganda.txt +" for details. +" +" Questions, comments: <n1ql AT cime.net> +" https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r +" +" vim: set fileencoding=utf-8: + + +if exists("b:current_syntax") + finish +endif + + +syn case ignore + +syn keyword n1qlSpecial DATASTORES +syn keyword n1qlSpecial DUAL +syn keyword n1qlSpecial FALSE +syn keyword n1qlSpecial INDEXES +syn keyword n1qlSpecial KEYSPACES +syn keyword n1qlSpecial MISSING +syn keyword n1qlSpecial NAMESPACES +syn keyword n1qlSpecial NULL +syn keyword n1qlSpecial TRUE + + +" +" *** keywords *** +" +syn keyword n1qlKeyword ALL +syn keyword n1qlKeyword ANY +syn keyword n1qlKeyword ASC +syn keyword n1qlKeyword BEGIN +syn keyword n1qlKeyword BETWEEN +syn keyword n1qlKeyword BREAK +syn keyword n1qlKeyword BUCKET +syn keyword n1qlKeyword CALL +syn keyword n1qlKeyword CASE +syn keyword n1qlKeyword CAST +syn keyword n1qlKeyword CLUSTER +syn keyword n1qlKeyword COLLATE +syn keyword n1qlKeyword COLLECTION +syn keyword n1qlKeyword CONNECT +syn keyword n1qlKeyword CONTINUE +syn keyword n1qlKeyword CORRELATE +syn keyword n1qlKeyword COVER +syn keyword n1qlKeyword DATABASE +syn keyword n1qlKeyword DATASET +syn keyword n1qlKeyword DATASTORE +syn keyword n1qlKeyword DECLARE +syn keyword n1qlKeyword DECREMENT +syn keyword n1qlKeyword DERIVED +syn keyword n1qlKeyword DESC +syn keyword n1qlKeyword DESCRIBE +syn keyword n1qlKeyword DO +syn keyword n1qlKeyword EACH +syn keyword n1qlKeyword ELEMENT +syn keyword n1qlKeyword ELSE +syn keyword n1qlKeyword END +syn keyword n1qlKeyword EVERY +syn keyword n1qlKeyword EXCLUDE +syn keyword n1qlKeyword EXISTS +syn keyword n1qlKeyword FETCH +syn keyword n1qlKeyword FIRST +syn keyword n1qlKeyword FLATTEN +syn keyword n1qlKeyword FOR +syn keyword n1qlKeyword FORCE +syn keyword n1qlKeyword FROM +syn keyword n1qlKeyword FUNCTION +syn keyword n1qlKeyword GROUP +syn keyword n1qlKeyword GSI +syn keyword n1qlKeyword HAVING +syn keyword n1qlKeyword IF +syn keyword n1qlKeyword IGNORE +syn keyword n1qlKeyword INCLUDE +syn keyword n1qlKeyword INCREMENT +syn keyword n1qlKeyword INDEX +syn keyword n1qlKeyword INITIAL +syn keyword n1qlKeyword INLINE +syn keyword n1qlKeyword INNER +syn keyword n1qlKeyword INTO +syn keyword n1qlKeyword KEY +syn keyword n1qlKeyword KEYS +syn keyword n1qlKeyword KEYSPACE +syn keyword n1qlKeyword KNOWN +syn keyword n1qlKeyword LAST +syn keyword n1qlKeyword LET +syn keyword n1qlKeyword LETTING +syn keyword n1qlKeyword LIMIT +syn keyword n1qlKeyword LOOP +syn keyword n1qlKeyword LSM +syn keyword n1qlKeyword MAP +syn keyword n1qlKeyword MAPPING +syn keyword n1qlKeyword MATCHED +syn keyword n1qlKeyword MATERIALIZED +syn keyword n1qlKeyword MERGE +syn keyword n1qlKeyword NAMESPACE +syn keyword n1qlKeyword NEST +syn keyword n1qlKeyword OPTION +syn keyword n1qlKeyword ORDER +syn keyword n1qlKeyword OUTER +syn keyword n1qlKeyword OVER +syn keyword n1qlKeyword PARSE +syn keyword n1qlKeyword PARTITION +syn keyword n1qlKeyword PASSWORD +syn keyword n1qlKeyword PATH +syn keyword n1qlKeyword POOL +syn keyword n1qlKeyword PRIMARY +syn keyword n1qlKeyword PRIVATE +syn keyword n1qlKeyword PRIVILEGE +syn keyword n1qlKeyword PROCEDURE +syn keyword n1qlKeyword PUBLIC +syn keyword n1qlKeyword REALM +syn keyword n1qlKeyword REDUCE +syn keyword n1qlKeyword RETURN +syn keyword n1qlKeyword RETURNING +syn keyword n1qlKeyword ROLE +syn keyword n1qlKeyword SATISFIES +syn keyword n1qlKeyword SCHEMA +syn keyword n1qlKeyword SELF +syn keyword n1qlKeyword SEMI +syn keyword n1qlKeyword SHOW +syn keyword n1qlKeyword START +syn keyword n1qlKeyword STATISTICS +syn keyword n1qlKeyword SYSTEM +syn keyword n1qlKeyword THEN +syn keyword n1qlKeyword TRANSACTION +syn keyword n1qlKeyword TRIGGER +syn keyword n1qlKeyword UNDER +syn keyword n1qlKeyword UNKNOWN +syn keyword n1qlKeyword UNSET +syn keyword n1qlKeyword USE +syn keyword n1qlKeyword USER +syn keyword n1qlKeyword USING +syn keyword n1qlKeyword VALIDATE +syn keyword n1qlKeyword VALUE +syn keyword n1qlKeyword VALUED +syn keyword n1qlKeyword VALUES +syn keyword n1qlKeyword VIEW +syn keyword n1qlKeyword WHEN +syn keyword n1qlKeyword WHERE +syn keyword n1qlKeyword WHILE +syn keyword n1qlKeyword WITHIN +syn keyword n1qlKeyword WORK + + +" +" *** functions *** +" +syn keyword n1qlOperator ABS +syn keyword n1qlOperator ACOS +syn keyword n1qlOperator ARRAY_AGG +syn keyword n1qlOperator ARRAY_APPEND +syn keyword n1qlOperator ARRAY_AVG +syn keyword n1qlOperator ARRAY_CONCAT +syn keyword n1qlOperator ARRAY_CONTAINS +syn keyword n1qlOperator ARRAY_COUNT +syn keyword n1qlOperator ARRAY_DISTINCT +syn keyword n1qlOperator ARRAY_FLATTEN +syn keyword n1qlOperator ARRAY_IFNULL +syn keyword n1qlOperator ARRAY_INSERT +syn keyword n1qlOperator ARRAY_INTERSECT +syn keyword n1qlOperator ARRAY_LENGTH +syn keyword n1qlOperator ARRAY_MAX +syn keyword n1qlOperator ARRAY_MIN +syn keyword n1qlOperator ARRAY_POSITION +syn keyword n1qlOperator ARRAY_PREPEND +syn keyword n1qlOperator ARRAY_PUT +syn keyword n1qlOperator ARRAY_RANGE +syn keyword n1qlOperator ARRAY_REMOVE +syn keyword n1qlOperator ARRAY_REPEAT +syn keyword n1qlOperator ARRAY_REPLACE +syn keyword n1qlOperator ARRAY_REVERSE +syn keyword n1qlOperator ARRAY_SORT +syn keyword n1qlOperator ARRAY_START +syn keyword n1qlOperator ARRAY_SUM +syn keyword n1qlOperator ARRAY_SYMDIFF +syn keyword n1qlOperator ARRAY_UNION +syn keyword n1qlOperator ASIN +syn keyword n1qlOperator ATAN +syn keyword n1qlOperator ATAN2 +syn keyword n1qlOperator AVG +syn keyword n1qlOperator BASE64 +syn keyword n1qlOperator BASE64_DECODE +syn keyword n1qlOperator BASE64_ENCODE +syn keyword n1qlOperator CEIL +syn keyword n1qlOperator CLOCK_LOCAL +syn keyword n1qlOperator CLOCK_STR +syn keyword n1qlOperator CLOCK_TZ +syn keyword n1qlOperator CLOCK_UTC +syn keyword n1qlOperator CLOCL_MILLIS +syn keyword n1qlOperator CONTAINS +syn keyword n1qlOperator COS +syn keyword n1qlOperator COUNT +syn keyword n1qlOperator DATE_ADD_MILLIS +syn keyword n1qlOperator DATE_ADD_STR +syn keyword n1qlOperator DATE_DIFF_MILLIS +syn keyword n1qlOperator DATE_DIFF_STR +syn keyword n1qlOperator DATE_FORMAT_STR +syn keyword n1qlOperator DATE_PART_MILLIS +syn keyword n1qlOperator DATE_PART_STR +syn keyword n1qlOperator DATE_RANGE_MILLIS +syn keyword n1qlOperator DATE_RANGE_STR +syn keyword n1qlOperator DATE_TRUC_STR +syn keyword n1qlOperator DATE_TRUNC_MILLIS +syn keyword n1qlOperator DECODE_JSON +syn keyword n1qlOperator DEGREES +syn keyword n1qlOperator DURATION_TO_STR +syn keyword n1qlOperator E +syn keyword n1qlOperator ENCODED_SIZE +syn keyword n1qlOperator ENCODE_JSON +syn keyword n1qlOperator EXP +syn keyword n1qlOperator FLOOR +syn keyword n1qlOperator GREATEST +syn keyword n1qlOperator IFINF +syn keyword n1qlOperator IFMISSING +syn keyword n1qlOperator IFMISSINGORNULL +syn keyword n1qlOperator IFNAN +syn keyword n1qlOperator IFNANORINF +syn keyword n1qlOperator IFNULL +syn keyword n1qlOperator INITCAP +syn keyword n1qlOperator ISARRAY +syn keyword n1qlOperator ISATOM +syn keyword n1qlOperator ISBOOLEAN +syn keyword n1qlOperator ISNUMBER +syn keyword n1qlOperator ISOBJECT +syn keyword n1qlOperator ISSTRING +syn keyword n1qlOperator LEAST +syn keyword n1qlOperator LENGTH +syn keyword n1qlOperator LN +syn keyword n1qlOperator LOG +syn keyword n1qlOperator LOWER +syn keyword n1qlOperator LTRIM +syn keyword n1qlOperator MAX +syn keyword n1qlOperator META +syn keyword n1qlOperator MILLIS +syn keyword n1qlOperator MILLIS_TO_LOCAL +syn keyword n1qlOperator MILLIS_TO_STR +syn keyword n1qlOperator MILLIS_TO_TZ +syn keyword n1qlOperator MILLIS_TO_UTC +syn keyword n1qlOperator MILLIS_TO_ZONE_NAME +syn keyword n1qlOperator MIN +syn keyword n1qlOperator MISSINGIF +syn keyword n1qlOperator NANIF +syn keyword n1qlOperator NEGINFIF +syn keyword n1qlOperator NOW_LOCAL +syn keyword n1qlOperator NOW_MILLIS +syn keyword n1qlOperator NOW_STR +syn keyword n1qlOperator NOW_TZ +syn keyword n1qlOperator NOW_UTC +syn keyword n1qlOperator NULLIF +syn keyword n1qlOperator OBJECT_ADD +syn keyword n1qlOperator OBJECT_CONCAT +syn keyword n1qlOperator OBJECT_INNER_PAIRS +syn keyword n1qlOperator OBJECT_INNER_VALUES +syn keyword n1qlOperator OBJECT_LENGTH +syn keyword n1qlOperator OBJECT_NAMES +syn keyword n1qlOperator OBJECT_PAIRS +syn keyword n1qlOperator OBJECT_PUT +syn keyword n1qlOperator OBJECT_REMOVE +syn keyword n1qlOperator OBJECT_RENAME +syn keyword n1qlOperator OBJECT_REPLACE +syn keyword n1qlOperator OBJECT_UNWRAP +syn keyword n1qlOperator OBJECT_VALUES +syn keyword n1qlOperator PI +syn keyword n1qlOperator POLY_LENGTH +syn keyword n1qlOperator POSINIF +syn keyword n1qlOperator POSITION +syn keyword n1qlOperator POWER +syn keyword n1qlOperator RADIANS +syn keyword n1qlOperator RANDOM +syn keyword n1qlOperator REGEXP_CONTAINS +syn keyword n1qlOperator REGEXP_LIKE +syn keyword n1qlOperator REGEXP_POSITION +syn keyword n1qlOperator REGEXP_REPLACE +syn keyword n1qlOperator REPEAT +syn keyword n1qlOperator REPLACE +syn keyword n1qlOperator REVERSE +syn keyword n1qlOperator ROUND +syn keyword n1qlOperator RTRIM +syn keyword n1qlOperator SIGN +syn keyword n1qlOperator SIN +syn keyword n1qlOperator SPLIT +syn keyword n1qlOperator SQRT +syn keyword n1qlOperator STR_TO_DURATION +syn keyword n1qlOperator STR_TO_MILLIS +syn keyword n1qlOperator STR_TO_TZ +syn keyword n1qlOperator STR_TO_UTC +syn keyword n1qlOperator STR_TO_ZONE_NAME +syn keyword n1qlOperator SUBSTR +syn keyword n1qlOperator SUFFIXES +syn keyword n1qlOperator SUM +syn keyword n1qlOperator TAN +syn keyword n1qlOperator TITLE +syn keyword n1qlOperator TOARRAY +syn keyword n1qlOperator TOATOM +syn keyword n1qlOperator TOBOOLEAN +syn keyword n1qlOperator TOKENS +syn keyword n1qlOperator TONUMBER +syn keyword n1qlOperator TOOBJECT +syn keyword n1qlOperator TOSTRING +syn keyword n1qlOperator TRIM +syn keyword n1qlOperator TRUNC +syn keyword n1qlOperator TYPE +syn keyword n1qlOperator UPPER +syn keyword n1qlOperator UUID +syn keyword n1qlOperator WEEKDAY_MILLIS +syn keyword n1qlOperator WEEKDAY_STR + + +" +" *** operators *** +" +syn keyword n1qlOperator AND +syn keyword n1qlOperator AS +syn keyword n1qlOperator BY +syn keyword n1qlOperator DISTINCT +syn keyword n1qlOperator EXCEPT +syn keyword n1qlOperator ILIKE +syn keyword n1qlOperator IN +syn keyword n1qlOperator INTERSECT +syn keyword n1qlOperator IS +syn keyword n1qlOperator JOIN +syn keyword n1qlOperator LEFT +syn keyword n1qlOperator LIKE +syn keyword n1qlOperator MINUS +syn keyword n1qlOperator NEST +syn keyword n1qlOperator NESTING +syn keyword n1qlOperator NOT +syn keyword n1qlOperator OFFSET +syn keyword n1qlOperator ON +syn keyword n1qlOperator OR +syn keyword n1qlOperator OUT +syn keyword n1qlOperator RIGHT +syn keyword n1qlOperator SOME +syn keyword n1qlOperator TO +syn keyword n1qlOperator UNION +syn keyword n1qlOperator UNIQUE +syn keyword n1qlOperator UNNEST +syn keyword n1qlOperator VIA +syn keyword n1qlOperator WITH +syn keyword n1qlOperator XOR + + +" +" *** statements *** +" +syn keyword n1qlStatement ALTER +syn keyword n1qlStatement ANALYZE +syn keyword n1qlStatement BUILD +syn keyword n1qlStatement COMMIT +syn keyword n1qlStatement CREATE +syn keyword n1qlStatement DELETE +syn keyword n1qlStatement DROP +syn keyword n1qlStatement EXECUTE +syn keyword n1qlStatement EXPLAIN +syn keyword n1qlStatement GRANT +syn keyword n1qlStatement INFER +syn keyword n1qlStatement INSERT +syn keyword n1qlStatement MERGE +syn keyword n1qlStatement PREPARE +syn keyword n1qlStatement RENAME +syn keyword n1qlStatement REVOKE +syn keyword n1qlStatement ROLLBACK +syn keyword n1qlStatement SELECT +syn keyword n1qlStatement SET +syn keyword n1qlStatement TRUNCATE +syn keyword n1qlStatement UPDATE +syn keyword n1qlStatement UPSERT + + +" +" *** types *** +" +syn keyword n1qlType ARRAY +syn keyword n1qlType BINARY +syn keyword n1qlType BOOLEAN +syn keyword n1qlType NUMBER +syn keyword n1qlType OBJECT +syn keyword n1qlType RAW +syn keyword n1qlType STRING + + +" +" *** strings and characters *** +" +syn region n1qlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region n1qlString start=+'+ skip=+\\\\\|\\'+ end=+'+ +syn region n1qlBucketSpec start=+`+ skip=+\\\\\|\\'+ end=+`+ + + +" +" *** numbers *** +" +syn match n1qlNumber "-\=\<\d*\.\=[0-9_]\>" + + +" +" *** comments *** +" +syn region n1qlComment start="/\*" end="\*/" contains=n1qlTODO +syn match n1qlComment "--.*$" contains=n1qlTODO +syn sync ccomment n1qlComment + + +" +" *** TODO *** +" +syn keyword n1qlTODO contained TODO FIXME XXX DEBUG NOTE + + +" +" *** enable *** +" +hi def link n1qlBucketSpec Underlined +hi def link n1qlComment Comment +hi def link n1qlKeyword Macro +hi def link n1qlOperator Function +hi def link n1qlSpecial Special +hi def link n1qlStatement Statement +hi def link n1qlString String +hi def link n1qlTODO Todo +hi def link n1qlType Type + +let b:current_syntax = "n1ql" diff --git a/runtime/syntax/sas.vim b/runtime/syntax/sas.vim index 82ffe605ce..fad6066737 100644 --- a/runtime/syntax/sas.vim +++ b/runtime/syntax/sas.vim @@ -3,7 +3,7 @@ " Maintainer: Zhen-Huan Hu <wildkeny@gmail.com> " Original Maintainer: James Kidd <james.kidd@covance.com> " Version: 3.0.0 -" Last Change: Mar 10, 2017 +" Last Change: Aug 26, 2017 " " 2017 Mar 7 " @@ -120,7 +120,7 @@ syn match sasDataStepStatement '\v%(^|;)\s*\zs%(dcl|declare)>' display contained syn match sasDataStepStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn match sasDataStepStatement '\v%(^|;)\s*\zs%(format|informat|input|put)>' display contained contains=sasDataStepStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty syn match sasDataStepStatement '\v%(^|;)\s*\zs%(cards|datalines|lines)4=\s*;' display contained contains=sasDataStepStatementKeyword nextgroup=sasDataLine skipwhite skipnl skipempty -syn region sasDataLine start='^' end='^;'me=s-1 contained +syn region sasDataLine start='^' end='^\s*;'me=s-1 contained syn region sasDataStep matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsdata>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,@sasDataStepSyntax syn cluster sasDataStepSyntax contains=sasDataStepFunction,sasDataStepHashOperator,sasDataStepHashAttribute,sasDataStepHashMethod,sasDataStepControl,sasDataStepStatement diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 26eea03a3c..9a7afeedfa 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -538,7 +538,7 @@ syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster 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 reverse standout underline undercurl nocombine syn keyword vimFgBgAttrib contained none bg background fg foreground syn case match syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib |