diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-30 23:26:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-30 23:26:57 +0200 |
commit | 89bcfda6834aba724d12554a34b9ed49f5789fd5 (patch) | |
tree | 2ffddcadaae9d061e38e17a09b2635ec199eb1dd /runtime | |
parent | 4792255eff03760dca0fd014616532e6d47db364 (diff) | |
download | vim-git-89bcfda6834aba724d12554a34b9ed49f5789fd5.tar.gz |
Updated runtime files. Remove version checks for Vim older than 6.0.
Diffstat (limited to 'runtime')
426 files changed, 9966 insertions, 13616 deletions
diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index e1064c8a5..440dfd42e 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -93,7 +93,7 @@ function! s:GetBufferRubyEntity( name, type, ... ) let stopline = 1 - let crex = '^\s*\<' . a:type . '\>\s*\<' . a:name . '\>\s*\(<\s*.*\s*\)\?' + let crex = '^\s*\<' . a:type . '\>\s*\<' . escape(a:name, '*') . '\>\s*\(<\s*.*\s*\)\?' let [lnum,lcol] = searchpos( crex, 'w' ) "let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' ) @@ -149,7 +149,7 @@ function! s:GetRubyVarType(v) let ctors = ctors.'\)' let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)' - let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr + let sstr = ''.escape(a:v, '*').'\>\s*[+\-*/]*'.fstr let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 let str = matchstr(getline(lnum),fstr,lcol) @@ -266,6 +266,28 @@ class VimRubyCompletion end end + def load_gems + fpath = VIM::evaluate("get(g:, 'rubycomplete_gemfile_path', 'Gemfile')") + return unless File.file?(fpath) && File.readable?(fpath) + want_bundler = VIM::evaluate("get(g:, 'rubycomplete_use_bundler')") + parse_file = !want_bundler + begin + require 'bundler' + Bundler.setup + Bundler.require + rescue Exception + parse_file = true + end + if parse_file + File.new(fpath).each_line do |line| + begin + require $1 if /\s*gem\s*['"]([^'"]+)/.match(line) + rescue Exception + end + end + end + end + def load_buffer_class(name) dprint "load_buffer_class(%s) START" % name classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') @@ -588,6 +610,10 @@ class VimRubyCompletion load_rails end + want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')") + load_gems unless want_gems.to_i.zero? + + input = VIM::Buffer.current.line cpos = VIM::Window.current.cursor[1] - 1 input = input[0..cpos] @@ -678,7 +704,9 @@ class VimRubyCompletion cv = eval("self.class.constants") vartype = get_var_type( receiver ) dprint "vartype: %s" % vartype - if vartype != '' + + invalid_vartype = ['', "gets"] + if !invalid_vartype.include?(vartype) load_buffer_class( vartype ) begin @@ -706,7 +734,7 @@ class VimRubyCompletion methods.concat m.instance_methods(false) } end - variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0 + variables += add_rails_columns( "#{vartype}" ) if vartype && !invalid_vartype.include?(vartype) when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ message = $1 diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim index c020be6e3..17ce3627c 100644 --- a/runtime/compiler/cucumber.vim +++ b/runtime/compiler/cucumber.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 Aug 09 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber CompilerSet errorformat= \%W%m\ (Cucumber::Undefined), - \%E%m\ (%.%#), + \%E%m\ (%\\S%#), \%Z%f:%l, \%Z%f:%l:%.%# diff --git a/runtime/compiler/haml.vim b/runtime/compiler/haml.vim index b06a672df..9464c3dc8 100644 --- a/runtime/compiler/haml.vim +++ b/runtime/compiler/haml.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=haml\ -c +CompilerSet makeprg=haml CompilerSet errorformat= \Haml\ %trror\ on\ line\ %l:\ %m, diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim index 3bd9da0da..8490f2a9e 100644 --- a/runtime/compiler/rake.vim +++ b/runtime/compiler/rake.vim @@ -27,7 +27,11 @@ CompilerSet errorformat= \%\\s%#[%f:%l:\ %#%m, \%\\s%#%f:%l:\ %#%m, \%\\s%#%f:%l:, - \%m\ [%f:%l]: + \%m\ [%f:%l]:, + \%+Erake\ aborted!, + \%+EDon't\ know\ how\ to\ build\ task\ %.%#, + \%+Einvalid\ option:%.%#, + \%+Irake\ %\\S%\\+%\\s%\\+#\ %.%# let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim index 7c340bab1..c77bd70da 100644 --- a/runtime/compiler/rspec.vim +++ b/runtime/compiler/rspec.vim @@ -22,9 +22,10 @@ CompilerSet errorformat= \%f:%l:\ %tarning:\ %m, \%E%.%#:in\ `load':\ %f:%l:%m, \%E%f:%l:in\ `%*[^']':\ %m, - \%-Z\ \ \ \ \ \#\ %f:%l:%.%#, + \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#, \%E\ \ %\\d%\\+)%.%#, \%C\ \ \ \ \ %m, + \%C%\\s%#, \%-G%.%# let &cpo = s:cpo_save diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim index 93a0c8e65..ed0639b58 100644 --- a/runtime/compiler/rubyunit.vim +++ b/runtime/compiler/rubyunit.vim @@ -17,6 +17,8 @@ let s:cpo_save = &cpo set cpo-=C CompilerSet makeprg=testrb +" CompilerSet makeprg=ruby\ -Itest +" CompilerSet makeprg=m CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:, \%C%m\ [%f:%l]:, diff --git a/runtime/compiler/sass.vim b/runtime/compiler/sass.vim index 376a52b30..9c540ac44 100644 --- a/runtime/compiler/sass.vim +++ b/runtime/compiler/sass.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=sass\ -c +CompilerSet makeprg=sass CompilerSet errorformat= \%f:%l:%m\ (Sass::Syntax%trror), diff --git a/runtime/defaults.vim b/runtime/defaults.vim index 0ff834a2a..2460fd8c3 100644 --- a/runtime/defaults.vim +++ b/runtime/defaults.vim @@ -31,7 +31,8 @@ set ttimeoutlen=100 " wait up to 100ms after Esc for special key " Show @@@ in the last line if it is truncated. set display=truncate -" Show a few lines of context around the cursor. +" Show a few lines of context around the cursor. Note that this makes the +" text scroll if you mouse-click near the start or end of the window. set scrolloff=5 " Do incremental searching when it's possible to timeout. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index aa32839a0..d449a60d6 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 Aug 29 +*eval.txt* For Vim version 7.4. Last change: 2016 Aug 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -643,13 +643,17 @@ It's possible to form a variable name with curly braces, see Expression syntax summary, from least to most significant: -|expr1| expr2 ? expr1 : expr1 if-then-else +|expr1| expr2 + expr2 ? expr1 : expr1 if-then-else -|expr2| expr3 || expr3 .. logical OR +|expr2| expr3 + expr3 || expr3 .. logical OR -|expr3| expr4 && expr4 .. logical AND +|expr3| expr4 + expr4 && expr4 .. logical AND -|expr4| expr5 == expr5 equal +|expr4| expr5 + expr5 == expr5 equal expr5 != expr5 not equal expr5 > expr5 greater than expr5 >= expr5 greater than or equal @@ -666,24 +670,28 @@ Expression syntax summary, from least to most significant: expr5 is expr5 same |List| instance expr5 isnot expr5 different |List| instance -|expr5| expr6 + expr6 .. number addition or list concatenation +|expr5| expr6 + expr6 + expr6 .. number addition or list concatenation expr6 - expr6 .. number subtraction expr6 . expr6 .. string concatenation -|expr6| expr7 * expr7 .. number multiplication +|expr6| expr7 + expr7 * expr7 .. number multiplication expr7 / expr7 .. number division expr7 % expr7 .. number modulo -|expr7| ! expr7 logical NOT +|expr7| expr8 + ! expr7 logical NOT - expr7 unary minus + expr7 unary plus -|expr8| expr8[expr1] byte of a String or item of a |List| +|expr8| expr9 + expr8[expr1] byte of a String or item of a |List| expr8[expr1 : expr1] substring of a String or sublist of a |List| expr8.name entry in a |Dictionary| expr8(expr1, ...) function call with |Funcref| variable -|expr9| number number constant +|expr9| number number constant "string" string constant, backslash is special 'string' string constant, ' is doubled [expr1, ...] |List| diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index f60cb0383..0d7d77b52 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 7.4. Last change: 2016 Mar 05 +*os_win32.txt* For Vim version 7.4. Last change: 2016 Aug 28 VIM REFERENCE MANUAL by George Reilly @@ -144,29 +144,8 @@ the console. 5. Running under Windows 3.1 *win32-win3.1* *win32s* *windows-3.1* -There is a special version of Gvim that runs under Windows 3.1 and 3.11. You -need the gvim.exe that was compiled with Visual C++ 4.1. - -To run the Win32 version under Windows 3.1, you need to install Win32s. You -might have it already from another Win32 application which you have installed. -If Vim doesn't seem to be running properly, get the latest version: 1.30c. -You can find it at: - - http://support.microsoft.com/download/support/mslfiles/pw1118.exe - -(Microsoft moved it again, we don't know where it is now :-( ). - -The reason for having two versions of gvim.exe is that the Win32s version was -compiled with VC++ 4.1. This is the last version of VC++ that supports Win32s -programs. VC++ 5.0 is better, so that one was used for the Win32 version. -Apart from that, there is no difference between the programs. If you are in a -mixed environment, you can use the gvim.exe for Win32s on both. - -The Win32s version works the same way as the Win32 version under 95/NT. When -running under Win32s the following differences apply: -- You cannot use long file names, because Windows 3.1 doesn't support them! -- When executing an external command, it doesn't return an exit code. After - doing ":make" you have to do ":cn" yourself. +There was a special version of Gvim that runs under Windows 3.1 and 3.11. +Support was removed in patch 7.4.1363. ============================================================================== 6. Win32 mini FAQ *win32-faq* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index e8f6048e3..ea025d646 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 Aug 27 +*todo.txt* For Vim version 7.4. Last change: 2016 Aug 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -37,6 +37,25 @@ not be repeated below, unless there is extra information. Make ":filter" work with more commands. Search for: msg_putchar('\n') +Try building with $SHADOWDIR + +Test_sign_completion() fails on MS-Windows (console and GUI) Completion +doesn't have both tb_paste.xpm and tb_print.xpm but "tb_p". Different default +options? + +Test_nb_basic() fails on MS-Windows GUI. line 12: Expected 2 but got 1. +line 13: Expected 20 but got 1. + +Figure out building with Ruby on MS-Windows. + +:cexpr doesn't trigger QuickFixCmdPost. (Mathias Stearn, 2016 Aug 29, #1021) +Needs documentation. (Yegappan) + +Patch to convert test_marks to new style. (Yegappan, 2016 Aug 28, 2 msg) + +Patch to make it possible to define a test but skip it, by throwing an +exception. (Christian Brabandt, 2016 Aug 30) + +channel: - Implement |job-term| ? - Channel test fails with Motif. Sometimes kills the X11 server. @@ -186,6 +205,9 @@ Ramel Eshed: system() is much slower than job_start(), why? (Aug 26) Patch for Python: #622. (Roland Puntaier, 2016 Feb 2) What does it change? +Patch to make gd and gD work better for non-K&R code and with comments. +(Anton Lindqvist, 2016 Aug 29) + When generating the Unicode tables with runtime/tools/unicode.vim the emoji_width table has only one entry. diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt index 28c675f52..61299fb35 100644 --- a/runtime/doc/version8.txt +++ b/runtime/doc/version8.txt @@ -211,7 +211,7 @@ Ex commands: ~ |:cfdo| execute command in each file in error list |:chistory| display quickfix list stack |:clearjumps| clear the jump list -:filter only output lines that (do not) match a pattern +|:filter| only output lines that (do not) match a pattern |:helpclose| close one help window |:lbottom| scroll to the bottom of the location window |:ldo| execute command in valid location list entries @@ -12742,8 +12742,8 @@ Files: src/fileio.c, src/window.c, src/vim.h, src/testdir/test_autocmd.vim, runtime/doc/autocmd.txt Patch 7.4.2078 -Problem: Running checks in po diretory fails. -Solution: Add colors used in syntax.c to the builtiin color table. +Problem: Running checks in po directory fails. +Solution: Add colors used in syntax.c to the builtin color table. Files: src/term.c Patch 7.4.2079 diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim index 2ec1a5976..f4848d1c6 100644 --- a/runtime/ftplugin/cucumber.vim +++ b/runtime/ftplugin/cucumber.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 Jun 01 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -19,27 +19,23 @@ setlocal omnifunc=CucumberComplete let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') +if !exists("b:cucumber_steps_glob") + let b:cucumber_steps_glob = b:cucumber_root.'/**/*.rb' +endif if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") - nnoremap <silent><buffer> <C-]> :<C-U>exe <SID>jump('edit',v:count)<CR> - nnoremap <silent><buffer> [<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR> - nnoremap <silent><buffer> ]<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR> - nnoremap <silent><buffer> <C-W>] :<C-U>exe <SID>jump('split',v:count)<CR> - nnoremap <silent><buffer> <C-W><C-]> :<C-U>exe <SID>jump('split',v:count)<CR> - nnoremap <silent><buffer> <C-W>d :<C-U>exe <SID>jump('split',v:count)<CR> - nnoremap <silent><buffer> <C-W><C-D> :<C-U>exe <SID>jump('split',v:count)<CR> - nnoremap <silent><buffer> <C-W>} :<C-U>exe <SID>jump('pedit',v:count)<CR> - nnoremap <silent><buffer> [d :<C-U>exe <SID>jump('pedit',v:count)<CR> - nnoremap <silent><buffer> ]d :<C-U>exe <SID>jump('pedit',v:count)<CR> + cnoremap <SID>foldopen <Bar>if &foldopen =~# 'tag'<Bar>exe 'norm! zv'<Bar>endif + nnoremap <silent> <script> <buffer> [<C-D> :<C-U>exe <SID>jump('edit',v:count)<SID>foldopen<CR> + nnoremap <silent> <script> <buffer> ]<C-D> :<C-U>exe <SID>jump('edit',v:count)<SID>foldopen<CR> + nnoremap <silent> <script> <buffer> <C-W>d :<C-U>exe <SID>jump('split',v:count)<SID>foldopen<CR> + nnoremap <silent> <script> <buffer> <C-W><C-D> :<C-U>exe <SID>jump('split',v:count)<SID>foldopen<CR> + nnoremap <silent> <script> <buffer> [d :<C-U>exe <SID>jump('pedit',v:count)<CR> + nnoremap <silent> <script> <buffer> ]d :<C-U>exe <SID>jump('pedit',v:count)<CR> let b:undo_ftplugin .= - \ "|sil! nunmap <buffer> <C-]>" . \ "|sil! nunmap <buffer> [<C-D>" . \ "|sil! nunmap <buffer> ]<C-D>" . - \ "|sil! nunmap <buffer> <C-W>]" . - \ "|sil! nunmap <buffer> <C-W><C-]>" . \ "|sil! nunmap <buffer> <C-W>d" . \ "|sil! nunmap <buffer> <C-W><C-D>" . - \ "|sil! nunmap <buffer> <C-W>}" . \ "|sil! nunmap <buffer> [d" . \ "|sil! nunmap <buffer> ]d" endif @@ -59,7 +55,7 @@ endfunction function! s:allsteps() let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' let steps = [] - for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n") + for file in split(glob(b:cucumber_steps_glob),"\n") let lines = readfile(file) let num = 0 for line in lines diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim index 9bb8e86ff..32f3fb868 100644 --- a/runtime/ftplugin/eruby.vim +++ b/runtime/ftplugin/eruby.vim @@ -27,7 +27,7 @@ elseif !exists("b:eruby_subtype") let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim index 5fe5b2b0c..b3d5cff80 100644 --- a/runtime/ftplugin/git.vim +++ b/runtime/ftplugin/git.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: generic git output " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -12,6 +12,8 @@ let b:did_ftplugin = 1 if !exists('b:git_dir') if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' " Stay out of the way + elseif expand('%:p') =~# '[\/]\.git[\/]worktrees' + let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>') elseif expand('%:p') =~# '\.git\>' let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') elseif $GIT_DIR != '' diff --git a/runtime/ftplugin/gitcommit.vim b/runtime/ftplugin/gitcommit.vim index e8619004b..6767ff719 100644 --- a/runtime/ftplugin/gitcommit.vim +++ b/runtime/ftplugin/gitcommit.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: git commit file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -11,15 +11,10 @@ endif runtime! ftplugin/git.vim let b:did_ftplugin = 1 -setlocal nomodeline tabstop=8 formatoptions-=croq formatoptions+=tl - -let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions<' - -if &textwidth == 0 - " make sure that log messages play nice with git-log on standard terminals - setlocal textwidth=72 - let b:undo_ftplugin .= "|setl tw<" -endif +setlocal comments=:# commentstring=#\ %s +setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72 +setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q +let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<' if exists("g:no_gitcommit_commands") || v:version < 700 finish @@ -31,6 +26,8 @@ endif command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>) +let b:undo_ftplugin = b:undo_ftplugin . "|delc DiffGitCached" + function! s:diffcomplete(A,L,P) let args = "" if a:P <= match(a:L." -- "," -- ")+3 diff --git a/runtime/ftplugin/gitrebase.vim b/runtime/ftplugin/gitrebase.vim index 0200ba1ac..6f73b5c49 100644 --- a/runtime/ftplugin/gitrebase.vim +++ b/runtime/ftplugin/gitrebase.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: git rebase --interactive " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 May 21 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -12,10 +12,11 @@ runtime! ftplugin/git.vim let b:did_ftplugin = 1 setlocal comments=:# commentstring=#\ %s formatoptions-=t +setlocal nomodeline if !exists("b:undo_ftplugin") let b:undo_ftplugin = "" endif -let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo<" +let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<" function! s:choose(word) s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e diff --git a/runtime/ftplugin/haml.vim b/runtime/ftplugin/haml.vim index 654f1fca9..e74530b55 100644 --- a/runtime/ftplugin/haml.vim +++ b/runtime/ftplugin/haml.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 Jun 01 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") diff --git a/runtime/ftplugin/markdown.vim b/runtime/ftplugin/markdown.vim index 5d6ebecd8..277ba94e8 100644 --- a/runtime/ftplugin/markdown.vim +++ b/runtime/ftplugin/markdown.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Markdown " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:did_ftplugin") finish @@ -11,7 +11,7 @@ runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o -setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+ +setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]: if exists('b:undo_ftplugin') let b:undo_ftplugin .= "|setl cms< com< fo< flp<" @@ -19,4 +19,32 @@ else let b:undo_ftplugin = "setl cms< com< fo< flp<" endif +function! MarkdownFold() + let line = getline(v:lnum) + + " Regular headers + let depth = match(line, '\(^#\+\)\@<=\( .*$\)\@=') + if depth > 0 + return ">" . depth + endif + + " Setext style headings + let nextline = getline(v:lnum + 1) + if (line =~ '^.\+$') && (nextline =~ '^=\+$') + return ">1" + endif + + if (line =~ '^.\+$') && (nextline =~ '^-\+$') + return ">2" + endif + + return "=" +endfunction + +if has("folding") && exists("g:markdown_folding") + setlocal foldexpr=MarkdownFold() + setlocal foldmethod=expr + let b:undo_ftplugin .= " foldexpr< foldmethod<" +endif + " vim:set sw=2: diff --git a/runtime/ftplugin/ruby.vim b/runtime/ftplugin/ruby.vim index 9630a940a..84fb9930a 100644 --- a/runtime/ftplugin/ruby.vim +++ b/runtime/ftplugin/ruby.vim @@ -28,12 +28,13 @@ if exists("loaded_matchit") && !exists("b:match_words") \ ':' . \ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' . \ ':' . - \ '\<end\>' . + \ '\%(^\|[^.\:@$]\)\@<=\<end\:\@!\>' . \ ',{:},\[:\],(:)' let b:match_skip = \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" . \ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Escape\\|" . + \ "Regexp\\|RegexpDelimiter\\|" . \ "Interpolation\\|NoInterpolation\\|Comment\\|Documentation\\|" . \ "ConditionalModifier\\|RepeatModifier\\|OptionalDo\\|" . \ "Function\\|BlockArgument\\|KeywordAsMethod\\|ClassVariable\\|" . @@ -43,7 +44,7 @@ endif setlocal formatoptions-=t formatoptions+=croql setlocal include=^\\s*\\<\\(load\\>\\\|require\\>\\\|autoload\\s*:\\=[\"']\\=\\h\\w*[\"']\\=,\\) -setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','') +setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'\%(\.rb\)\=$','.rb','') setlocal suffixesadd=.rb if exists("&ofu") && has("ruby") @@ -66,32 +67,32 @@ if !exists('g:ruby_version_paths') let g:ruby_version_paths = {} endif -function! s:query_path(root) +function! s:query_path(root) abort let code = "print $:.join %q{,}" - if &shell =~# 'sh' && $PATH !~# '\s' - let prefix = 'env PATH='.$PATH.' ' + if &shell =~# 'sh' + let prefix = 'env PATH='.shellescape($PATH).' ' else let prefix = '' endif if &shellxquote == "'" - let path_check = prefix.'ruby -e "' . code . '"' + let path_check = prefix.'ruby --disable-gems -e "' . code . '"' else - let path_check = prefix."ruby -e '" . code . "'" + let path_check = prefix."ruby --disable-gems -e '" . code . "'" endif let cd = haslocaldir() ? 'lcd' : 'cd' - let cwd = getcwd() + let cwd = fnameescape(getcwd()) try exe cd fnameescape(a:root) let path = split(system(path_check),',') - exe cd fnameescape(cwd) + exe cd cwd return path finally - exe cd fnameescape(cwd) + exe cd cwd endtry endfunction -function! s:build_path(path) +function! s:build_path(path) abort let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',') if &g:path !~# '\v^\.%(,/%(usr|emx)/include)=,,$' let path = substitute(&g:path,',,$',',','') . ',' . path @@ -101,7 +102,7 @@ endfunction if !exists('b:ruby_version') && !exists('g:ruby_path') && isdirectory(expand('%:p:h')) let s:version_file = findfile('.ruby-version', '.;') - if !empty(s:version_file) + if !empty(s:version_file) && filereadable(s:version_file) let b:ruby_version = get(readfile(s:version_file, '', 1), '') if !has_key(g:ruby_version_paths, b:ruby_version) let g:ruby_version_paths[b:ruby_version] = s:query_path(fnamemodify(s:version_file, ':p:h')) @@ -135,7 +136,7 @@ if exists('s:ruby_paths') && stridx(&l:tags, join(map(copy(s:ruby_paths),'v:val. let &l:tags = &tags . ',' . join(map(copy(s:ruby_paths),'v:val."/tags"'),',') endif -if has("gui_win32") && !exists("b:browsefilter") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" . \ "All Files (*.*)\t*.*\n" endif @@ -145,7 +146,22 @@ let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< tags< kp<" \."| if exists('&ofu') && has('ruby') | setl ofu< | endif" \."| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif" +function! s:map(mode, flags, map) abort + let from = matchstr(a:map, '\S\+') + if empty(mapcheck(from, a:mode)) + exe a:mode.'map' '<buffer>'.(a:0 ? a:1 : '') a:map + let b:undo_ftplugin .= '|sil! '.a:mode.'unmap <buffer> '.from + endif +endfunction + +cmap <buffer><script><expr> <Plug><cword> substitute(RubyCursorIdentifier(),'^$',"\022\027",'') +cmap <buffer><script><expr> <Plug><cfile> substitute(RubyCursorFile(),'^$',"\022\006",'') +let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><cword>| sil! cunmap <buffer> <Plug><cfile>" + if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") + nmap <buffer><script> <SID>: :<C-U> + nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR> + nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','n')<CR> nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','n')<CR> nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','n')<CR> @@ -168,7 +184,7 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") \."| sil! exe 'unmap <buffer> [[' | sil! exe 'unmap <buffer> ]]' | sil! exe 'unmap <buffer> []' | sil! exe 'unmap <buffer> ]['" \."| sil! exe 'unmap <buffer> [m' | sil! exe 'unmap <buffer> ]m' | sil! exe 'unmap <buffer> [M' | sil! exe 'unmap <buffer> ]M'" - if maparg('im','n') == '' + if maparg('im','x') == '' && maparg('im','o') == '' && maparg('am','x') == '' && maparg('am','o') == '' onoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR> onoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR> xnoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR> @@ -178,7 +194,7 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") \."| sil! exe 'xunmap <buffer> im' | sil! exe 'xunmap <buffer> am'" endif - if maparg('iM','n') == '' + if maparg('iM','x') == '' && maparg('iM','o') == '' && maparg('aM','x') == '' && maparg('aM','o') == '' onoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR> onoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR> xnoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR> @@ -188,33 +204,24 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") \."| sil! exe 'xunmap <buffer> iM' | sil! exe 'xunmap <buffer> aM'" endif - if maparg("\<C-]>",'n') == '' - nnoremap <silent> <buffer> <C-]> :<C-U>exe v:count1."tag <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> g<C-]> :<C-U>exe "tjump <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> g] :<C-U>exe "tselect <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> <C-W>] :<C-U>exe v:count1."stag <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> <C-W><C-]> :<C-U>exe v:count1."stag <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> <C-W>g<C-]> :<C-U>exe "stjump <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> <C-W>g] :<C-U>exe "stselect <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> <C-W>} :<C-U>exe "ptag <C-R>=RubyCursorIdentifier()<CR>"<CR> - nnoremap <silent> <buffer> <C-W>g} :<C-U>exe "ptjump <C-R>=RubyCursorIdentifier()<CR>"<CR> - let b:undo_ftplugin = b:undo_ftplugin - \."| sil! exe 'nunmap <buffer> <C-]>'| sil! exe 'nunmap <buffer> g<C-]>'| sil! exe 'nunmap <buffer> g]'" - \."| sil! exe 'nunmap <buffer> <C-W>]'| sil! exe 'nunmap <buffer> <C-W><C-]>'" - \."| sil! exe 'nunmap <buffer> <C-W>g<C-]>'| sil! exe 'nunmap <buffer> <C-W>g]'" - \."| sil! exe 'nunmap <buffer> <C-W>}'| sil! exe 'nunmap <buffer> <C-W>g}'" - endif - - if maparg("gf",'n') == '' - " By using findfile() rather than gf's normal behavior, we prevent - " erroneously editing a directory. - nnoremap <silent> <buffer> gf :<C-U>exe <SID>gf(v:count1,"gf",'edit')<CR> - nnoremap <silent> <buffer> <C-W>f :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>f",'split')<CR> - nnoremap <silent> <buffer> <C-W><C-F> :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>\<Lt>C-F>",'split')<CR> - nnoremap <silent> <buffer> <C-W>gf :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>gf",'tabedit')<CR> - let b:undo_ftplugin = b:undo_ftplugin - \."| sil! exe 'nunmap <buffer> gf' | sil! exe 'nunmap <buffer> <C-W>f' | sil! exe 'nunmap <buffer> <C-W><C-F>' | sil! exe 'nunmap <buffer> <C-W>gf'" - endif + call s:map('c', '', '<C-R><C-W> <Plug><cword>') + call s:map('c', '', '<C-R><C-F> <Plug><cfile>') + + cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : '' + call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><cword>"<SID>tagzv<CR>') + call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><cword>"<SID>tagzv<CR>') + call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><cword>"<SID>tagzv<CR>') + call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>') + call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>') + call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><cword>"<SID>tagzv<CR>') + call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><cword>"<SID>tagzv<CR>') + call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><cword>"<CR>') + call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><cword>"<CR>') + + call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>') + call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>') + call s:map('n', '<silent>', '<C-W><C-F> <SID>c:sfind <Plug><cfile><CR>') + call s:map('n', '<silent>', '<C-W>gf <SID>c:tabfind <Plug><cfile><CR>') endif let &cpo = s:cpo_save @@ -225,7 +232,7 @@ if exists("g:did_ruby_ftplugin_functions") endif let g:did_ruby_ftplugin_functions = 1 -function! RubyBalloonexpr() +function! RubyBalloonexpr() abort if !exists('s:ri_found') let s:ri_found = executable('ri') endif @@ -274,13 +281,13 @@ function! RubyBalloonexpr() endif endfunction -function! s:searchsyn(pattern,syn,flags,mode) +function! s:searchsyn(pattern, syn, flags, mode) abort + let cnt = v:count1 norm! m' if a:mode ==# 'v' norm! gv endif let i = 0 - let cnt = v:count ? v:count : 1 while i < cnt let i = i + 1 let line = line('.') @@ -296,11 +303,11 @@ function! s:searchsyn(pattern,syn,flags,mode) endwhile endfunction -function! s:synname() +function! s:synname() abort return synIDattr(synID(line('.'),col('.'),0),'name') endfunction -function! s:wrap_i(back,forward) +function! s:wrap_i(back,forward) abort execute 'norm k'.a:forward let line = line('.') execute 'norm '.a:back @@ -310,7 +317,7 @@ function! s:wrap_i(back,forward) execute 'norm jV'.a:forward.'k' endfunction -function! s:wrap_a(back,forward) +function! s:wrap_a(back,forward) abort execute 'norm '.a:forward if line('.') < line('$') && getline(line('.')+1) ==# '' let after = 1 @@ -328,37 +335,55 @@ function! s:wrap_a(back,forward) endif endfunction -function! RubyCursorIdentifier() +function! RubyCursorIdentifier() abort let asciicode = '\%(\w\|[]})\"'."'".']\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)' let number = '\%(\%(\w\|[]})\"'."'".']\s*\)\@<!-\)\=\%(\<[[:digit:]_]\+\%(\.[[:digit:]_]\+\)\=\%([Ee][[:digit:]_]\+\)\=\>\|\<0[xXbBoOdD][[:xdigit:]_]\+\>\)\|'.asciicode let operator = '\%(\[\]\|<<\|<=>\|[!<>]=\=\|===\=\|[!=]\~\|>>\|\*\*\|\.\.\.\=\|=>\|[~^&|*/%+-]\)' - let method = '\%(\<[_a-zA-Z]\w*\>\%([?!]\|\s*=>\@!\)\=\)' + let method = '\%(\.[_a-zA-Z]\w*\s*=>\@!\|\<[_a-zA-Z]\w*\>[?!]\=\)' let global = '$\%([!$&"'."'".'*+,./:;<=>?@\`~]\|-\=\w\+\>\)' let symbolizable = '\%(\%(@@\=\)\w\+\>\|'.global.'\|'.method.'\|'.operator.'\)' let pattern = '\C\s*\%('.number.'\|\%(:\@<!:\)\='.symbolizable.'\)' let [lnum, col] = searchpos(pattern,'bcn',line('.')) let raw = matchstr(getline('.')[col-1 : ],pattern) - let stripped = substitute(substitute(raw,'\s\+=$','=',''),'^\s*:\=','','') + let stripped = substitute(substitute(raw,'\s\+=$','=',''),'^\s*[:.]\=','','') return stripped == '' ? expand("<cword>") : stripped endfunction -function! s:gf(count,map,edit) abort - if getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$' - let target = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') - return a:edit.' %:h/'.target.'.rb' - elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$' - let target = matchstr(getline('.'),'\(["'']\)\.\./\zs.\{-\}\ze\1') - return a:edit.' %:h/'.target.'.rb' +function! RubyCursorFile() abort + let isfname = &isfname + try + set isfname+=: + let cfile = expand('<cfile>') + finally + let isfname = &isfname + endtry + let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!') + let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*') + let ext = getline('.') =~# '^\s*\%(require\%(_relative\)\=\|autoload\)\>' && cfile !~# '\.rb$' ? '.rb' : '' + if s:synname() ==# 'rubyConstant' + let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','') + let cfile = substitute(cfile,'::','/','g') + let cfile = substitute(cfile,'\(\u\+\)\(\u\l\)','\1_\2', 'g') + let cfile = substitute(cfile,'\(\l\|\d\)\(\u\)','\1_\2', 'g') + return tolower(cfile) . '.rb' + elseif getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$' + let cfile = expand('%:p:h') . '/' . matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext + elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$' + let target = matchstr(getline('.'),'\(["'']\)\.\.\zs/.\{-\}\ze\1') + let cfile = expand('%:p:h') . target . ext elseif getline('.') =~# '^\s*\%(require \|load \|autoload :\w\+,\)\s*\(["'']\).*\1\s*$' - let target = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') + let cfile = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext + elseif pre.post =~# '\<File.expand_path[( ].*[''"]\{2\}, *__FILE__\>' && cfile =~# '^\.\.' + let cfile = expand('%:p:h') . strpart(cfile, 2) else - let target = expand('<cfile>') + return substitute(cfile, '\C\v^(.*):(\d+)%(:in)=$', '+\2 \1', '') endif - let found = findfile(target, &path, a:count) - if found ==# '' - return 'norm! '.a:count.a:map + let cwdpat = '^\M' . substitute(getcwd(), '[\/]', '\\[\\/]', 'g').'\ze\[\/]' + let cfile = substitute(cfile, cwdpat, '.', '') + if fnameescape(cfile) !=# cfile + return '+ '.fnameescape(cfile) else - return a:edit.' '.fnameescape(found) + return cfile endif endfunction diff --git a/runtime/ftplugin/sass.vim b/runtime/ftplugin/sass.vim index 64232a089..d6909e7ad 100644 --- a/runtime/ftplugin/sass.vim +++ b/runtime/ftplugin/sass.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 Jul 26 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -9,8 +9,9 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<" +let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<" +setlocal comments=:// setlocal commentstring=//\ %s setlocal define=^\\s*\\%(@mixin\\\|=\\) setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','') diff --git a/runtime/ftplugin/scss.vim b/runtime/ftplugin/scss.vim index 981fb1b88..287d298f4 100644 --- a/runtime/ftplugin/scss.vim +++ b/runtime/ftplugin/scss.vim @@ -1,12 +1,13 @@ " Vim filetype plugin " Language: SCSS " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 Jul 26 +" Last Change: 2016 Aug 29 if exists("b:did_ftplugin") finish endif runtime! ftplugin/sass.vim +setlocal comments=s1:/*,mb:*,ex:*/,:// " vim:set sw=2: diff --git a/runtime/indent/cucumber.vim b/runtime/indent/cucumber.vim index 965c7786e..999b8d6a7 100644 --- a/runtime/indent/cucumber.vim +++ b/runtime/indent/cucumber.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:did_indent") finish @@ -27,6 +27,7 @@ function! GetCucumberIndent() let line = getline(prevnonblank(v:lnum-1)) let cline = getline(v:lnum) let nline = getline(nextnonblank(v:lnum+1)) + let sw = exists('*shiftwidth') ? shiftwidth() : &sw let syn = s:syn(prevnonblank(v:lnum-1)) let csyn = s:syn(v:lnum) let nsyn = s:syn(nextnonblank(v:lnum+1)) @@ -35,38 +36,38 @@ function! GetCucumberIndent() return 0 elseif csyn ==# 'cucumberExamples' || cline =~# '^\s*\%(Examples\|Scenarios\):' " examples heading - return 2 * &sw + return 2 * sw elseif csyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || cline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' " background, scenario or outline heading - return &sw + return sw elseif syn ==# 'cucumberFeature' || line =~# '^\s*Feature:' " line after feature heading - return &sw + return sw elseif syn ==# 'cucumberExamples' || line =~# '^\s*\%(Examples\|Scenarios\):' " line after examples heading - return 3 * &sw + return 3 * sw elseif syn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || line =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' " line after background, scenario or outline heading - return 2 * &sw + return 2 * sw elseif cline =~# '^\s*[@#]' && (nsyn == 'cucumberFeature' || nline =~# '^\s*Feature:' || indent(prevnonblank(v:lnum-1)) <= 0) " tag or comment before a feature heading return 0 elseif cline =~# '^\s*@' " other tags - return &sw + return sw elseif cline =~# '^\s*[#|]' && line =~# '^\s*|' " mid-table " preserve indent return indent(prevnonblank(v:lnum-1)) elseif cline =~# '^\s*|' && line =~# '^\s*[^|]' " first line of a table, relative indent - return indent(prevnonblank(v:lnum-1)) + &sw + return indent(prevnonblank(v:lnum-1)) + sw elseif cline =~# '^\s*[^|]' && line =~# '^\s*|' " line after a table, relative unindent - return indent(prevnonblank(v:lnum-1)) - &sw + return indent(prevnonblank(v:lnum-1)) - sw elseif cline =~# '^\s*#' && getline(v:lnum-1) =~ '^\s*$' && (nsyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || nline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):') " comments on scenarios - return &sw + return sw endif return indent(prevnonblank(v:lnum-1)) endfunction diff --git a/runtime/indent/eruby.vim b/runtime/indent/eruby.vim index 80cab7000..afabd4fe5 100644 --- a/runtime/indent/eruby.vim +++ b/runtime/indent/eruby.vim @@ -19,6 +19,9 @@ else endif unlet! b:did_indent +" Force HTML indent to not keep state. +let b:html_indent_usestate = 0 + if &l:indentexpr == '' if &l:cindent let &l:indentexpr = 'cindent(v:lnum)' @@ -38,7 +41,18 @@ if exists("*GetErubyIndent") finish endif +" this file uses line continuations +let s:cpo_sav = &cpo +set cpo&vim + function! GetErubyIndent(...) + " The value of a single shift-width + if exists('*shiftwidth') + let sw = shiftwidth() + else + let sw = &sw + endif + if a:0 && a:1 == '.' let v:lnum = line('.') elseif a:0 && a:1 =~ '^\d' @@ -52,31 +66,44 @@ function! GetErubyIndent(...) let ind = GetRubyIndent(v:lnum) else exe "let ind = ".b:eruby_subtype_indentexpr + + " Workaround for Andy Wokula's HTML indent. This should be removed after + " some time, since the newest version is fixed in a different way. + if b:eruby_subtype_indentexpr =~# '^HtmlIndent(' + \ && exists('b:indent') + \ && type(b:indent) == type({}) + \ && has_key(b:indent, 'lnum') + " Force HTML indent to not keep state + let b:indent.lnum = -1 + endif endif let lnum = prevnonblank(v:lnum-1) let line = getline(lnum) let cline = getline(v:lnum) if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)' - let ind = ind - &sw + let ind = ind - sw endif if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)' - let ind = ind - &sw + let ind = ind - sw endif if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*[-=]\=%>' - let ind = ind + &sw + let ind = ind + sw elseif line =~# '<%[-=]\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>' - let ind = ind + &sw + let ind = ind + sw endif if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>' - let ind = ind + &sw + let ind = ind + sw endif - if line !~# '^\s*<%' && line =~# '%>\s*$' - let ind = ind - &sw + if line !~# '^\s*<%' && line =~# '%>\s*$' && line !~# '^\s*end\>' + let ind = ind - sw endif if cline =~# '^\s*[-=]\=%>\s*$' - let ind = ind - &sw + let ind = ind - sw endif return ind endfunction +let &cpo = s:cpo_sav +unlet! s:cpo_sav + " vim:set sw=2 sts=2 ts=8 noet: diff --git a/runtime/indent/fortran.vim b/runtime/indent/fortran.vim index be2f0866d..00cced4c9 100644 --- a/runtime/indent/fortran.vim +++ b/runtime/indent/fortran.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) " Version: 0.45 -" Last Change: 2016 Aug. 18 +" Last Change: 2016 Aug. 29 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-indent from Vim " Credits: @@ -152,9 +152,6 @@ function FortranGetIndent(lnum) if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$' let ind = ind + shiftwidth() endif - if prevstat =~ '&\s*$' && prevstat =~ '\<else\s*if\>' - let ind = ind - shiftwidth() - endif "Line after last continuation line if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' && prevstat !~? '\<then\>' let ind = ind - shiftwidth() diff --git a/runtime/indent/gitconfig.vim b/runtime/indent/gitconfig.vim index 7d5d44b77..480c96d1b 100644 --- a/runtime/indent/gitconfig.vim +++ b/runtime/indent/gitconfig.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: git config file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:did_indent") finish @@ -20,17 +20,18 @@ if exists("*GetGitconfigIndent") endif function! GetGitconfigIndent() + let sw = exists('*shiftwidth') ? shiftwidth() : &sw let line = getline(prevnonblank(v:lnum-1)) let cline = getline(v:lnum) if line =~ '\\\@<!\%(\\\\\)*\\$' " odd number of slashes, in a line continuation - return 2 * &sw + return 2 * sw elseif cline =~ '^\s*\[' return 0 elseif cline =~ '^\s*\a' - return &sw + return sw elseif cline == '' && line =~ '^\[' - return &sw + return sw else return -1 endif diff --git a/runtime/indent/haml.vim b/runtime/indent/haml.vim index c47a8a59c..c3935af9e 100644 --- a/runtime/indent/haml.vim +++ b/runtime/indent/haml.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:did_indent") finish @@ -37,10 +37,11 @@ function! GetHamlIndent() let line = substitute(line,'^\s\+','','') let indent = indent(lnum) let cindent = indent(v:lnum) + let sw = exists('*shiftwidth') ? shiftwidth() : &sw if cline =~# '\v^-\s*%(elsif|else|when)>' - let indent = cindent < indent ? cindent : indent - &sw + let indent = cindent < indent ? cindent : indent - sw endif - let increase = indent + &sw + let increase = indent + sw if indent == indent(lnum) let indent = cindent <= indent ? -1 : increase endif diff --git a/runtime/indent/liquid.vim b/runtime/indent/liquid.vim index 01e722369..f8e1c8307 100644 --- a/runtime/indent/liquid.vim +++ b/runtime/indent/liquid.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Liquid " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists('b:did_indent') finish @@ -54,9 +54,10 @@ function! GetLiquidIndent(...) let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+') let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') - let ind += &sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>') - let ind -= &sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>') - let ind -= &sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>') - let ind -= &sw * s:count(cline,'{%\s*end\w*$') + let sw = exists('*shiftwidth') ? shiftwidth() : &sw + let ind += sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>') + let ind -= sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>') + let ind -= sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>') + let ind -= sw * s:count(cline,'{%\s*end\w*$') return ind endfunction diff --git a/runtime/indent/ruby.vim b/runtime/indent/ruby.vim index 095b3a43c..4f87ec782 100644 --- a/runtime/indent/ruby.vim +++ b/runtime/indent/ruby.vim @@ -13,12 +13,23 @@ if exists("b:did_indent") endif let b:did_indent = 1 +if !exists('g:ruby_indent_access_modifier_style') + " Possible values: "normal", "indent", "outdent" + let g:ruby_indent_access_modifier_style = 'normal' +endif + +if !exists('g:ruby_indent_block_style') + " Possible values: "expression", "do" + let g:ruby_indent_block_style = 'expression' +endif + setlocal nosmartindent " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetRubyIndent(v:lnum) -setlocal indentkeys=0{,0},0),0],!^F,o,O,e +setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,. setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end +setlocal indentkeys+==private,=protected,=public " Only define the function once. if exists("*GetRubyIndent") @@ -34,7 +45,7 @@ set cpo&vim " Regex of syntax group names that are or delimit strings/symbols or are comments. let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' . \ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' . - \ '\|Interpolation\|NoInterpolation\|Comment\|Documentation\)\>' + \ '\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|Comment\|Documentation\)\>' " Regex of syntax group names that are strings. let s:syng_string = @@ -49,9 +60,10 @@ let s:skip_expr = \ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" " Regex used for words that, at the start of a line, add a level of indent. -let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' . - \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' . - \ '\|rescue\):\@!\>' . +let s:ruby_indent_keywords = + \ '^\s*\zs\<\%(module\|class\|if\|for' . + \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' . + \ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' . \ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' @@ -64,7 +76,8 @@ let s:ruby_deindent_keywords = " TODO: the do here should be restricted somewhat (only at end of line)? let s:end_start_regex = \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' . - \ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' . + \ '\<\%(module\|class\|if\|for\|while\|until\|case\|unless\|begin' . + \ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' . \ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>' " Regex that defines the middle-match for the 'end' keyword. @@ -82,16 +95,35 @@ let s:end_skip_expr = s:skip_expr . let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' " Regex that defines continuation lines. -" TODO: this needs to deal with if ...: and so on let s:continuation_regex = \ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' +" Regex that defines continuable keywords +let s:continuable_regex = + \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' . + \ '\<\%(if\|for\|while\|until\|unless\):\@!\>' + " Regex that defines bracket continuations let s:bracket_continuation_regex = '%\@<!\%([({[]\)\s*\%(#.*\)\=$' +" Regex that defines dot continuations +let s:dot_continuation_regex = '%\@<!\.\s*\%(#.*\)\=$' + +" Regex that defines backslash continuations +let s:backslash_continuation_regex = '%\@<!\\\s*$' + +" Regex that defines end of bracket continuation followed by another continuation +let s:bracket_switch_continuation_regex = '^\([^(]\+\zs).\+\)\+'.s:continuation_regex + " Regex that defines the first part of a splat pattern let s:splat_regex = '[[,(]\s*\*\s*\%(#.*\)\=$' +" Regex that describes all indent access modifiers +let s:access_modifier_regex = '\C^\s*\%(public\|protected\|private\)\s*\%(#.*\)\=$' + +" Regex that describes the indent access modifiers (excludes public) +let s:indent_access_modifier_regex = '\C^\s*\%(protected\|private\)\s*\%(#.*\)\=$' + " Regex that defines blocks. " " Note that there's a slight problem with this regex and s:continuation_regex. @@ -102,10 +134,13 @@ let s:splat_regex = '[[,(]\s*\*\s*\%(#.*\)\=$' " The reason is that the pipe matches a hanging "|" operator. " let s:block_regex = - \ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|\s*(*\s*\%([*@&]\=\h\w*,\=\s*\)\%(,\s*(*\s*[*@&]\=\h\w*\s*)*\s*\)*|\)\=\s*\%(#.*\)\=$' + \ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|[^|]*|\)\=\s*\%(#.*\)\=$' let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex +" Regex that describes a leading operator (only a method call's dot for now) +let s:leading_operator_regex = '^\s*[.]' + " 2. Auxiliary Functions {{{1 " ====================== @@ -165,7 +200,21 @@ function s:GetMSL(lnum) " Otherwise, terminate search as we have found our MSL already. let line = getline(lnum) - if s:Match(lnum, s:splat_regex) + if !s:Match(msl, s:backslash_continuation_regex) && + \ s:Match(lnum, s:backslash_continuation_regex) + " If the current line doesn't end in a backslash, but the previous one + " does, look for that line's msl + " + " Example: + " foo = "bar" \ + " "baz" + " + let msl = lnum + elseif s:Match(msl, s:leading_operator_regex) + " If the current line starts with a leading operator, keep its indent + " and keep looking for an MSL. + let msl = lnum + elseif s:Match(lnum, s:splat_regex) " If the above line looks like the "*" of a splat, use the current one's " indentation. " @@ -175,7 +224,7 @@ function s:GetMSL(lnum) " something " return msl - elseif s:Match(line, s:non_bracket_continuation_regex) && + elseif s:Match(lnum, s:non_bracket_continuation_regex) && \ s:Match(msl, s:non_bracket_continuation_regex) " If the current line is a non-bracket continuation and so is the " previous one, keep its indent and continue looking for an MSL. @@ -186,6 +235,18 @@ function s:GetMSL(lnum) " three " let msl = lnum + elseif s:Match(lnum, s:dot_continuation_regex) && + \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) + " If the current line is a bracket continuation or a block-starter, but + " the previous is a dot, keep going to see if the previous line is the + " start of another continuation. + " + " Example: + " parent. + " method_call { + " three + " + let msl = lnum elseif s:Match(lnum, s:non_bracket_continuation_regex) && \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) " If the current line is a bracket continuation or a block-starter, but @@ -299,18 +360,39 @@ function s:ExtraBrackets(lnum) endfunction function s:Match(lnum, regex) - let col = match(getline(a:lnum), '\C'.a:regex) + 1 - return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 -endfunction + let line = getline(a:lnum) + let offset = match(line, '\C'.a:regex) + let col = offset + 1 -function s:MatchLast(lnum, regex) - let line = getline(a:lnum) - let col = match(line, '.*\zs' . a:regex) - while col != -1 && s:IsInStringOrComment(a:lnum, col) - let line = strpart(line, 0, col) - let col = match(line, '.*' . a:regex) + while offset > -1 && s:IsInStringOrComment(a:lnum, col) + let offset = match(line, '\C'.a:regex, offset + 1) + let col = offset + 1 endwhile - return col + 1 + + if offset > -1 + return col + else + return 0 + endif +endfunction + +" Locates the containing class/module's definition line, ignoring nested classes +" along the way. +" +function! s:FindContainingClass() + let saved_position = getpos('.') + + while searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW', + \ s:end_skip_expr) > 0 + if expand('<cword>') =~# '\<class\|module\>' + let found_lnum = line('.') + call setpos('.', saved_position) + return found_lnum + endif + endif + + call setpos('.', saved_position) + return 0 endfunction " 3. GetRubyIndent Function {{{1 @@ -320,6 +402,13 @@ function GetRubyIndent(...) " 3.1. Setup {{{2 " ---------- + " The value of a single shift-width + if exists('*shiftwidth') + let sw = shiftwidth() + else + let sw = &sw + endif + " For the current line, use the first argument if given, else v:lnum let clnum = a:0 ? a:1 : v:lnum @@ -333,6 +422,24 @@ function GetRubyIndent(...) let line = getline(clnum) let ind = -1 + " If this line is an access modifier keyword, align according to the closest + " class declaration. + if g:ruby_indent_access_modifier_style == 'indent' + if s:Match(clnum, s:access_modifier_regex) + let class_line = s:FindContainingClass() + if class_line > 0 + return indent(class_line) + sw + endif + endif + elseif g:ruby_indent_access_modifier_style == 'outdent' + if s:Match(clnum, s:access_modifier_regex) + let class_line = s:FindContainingClass() + if class_line > 0 + return indent(class_line) + endif + endif + endif + " If we got a closing bracket on an empty line, find its match and indent " according to it. For parentheses we indent to its column - 1, for the " others we indent to the containing line's MSL's level. Return -1 if fail. @@ -343,7 +450,9 @@ function GetRubyIndent(...) if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 if line[col-1]==')' && col('.') != col('$') - 1 let ind = virtcol('.') - 1 - else + elseif g:ruby_indent_block_style == 'do' + let ind = indent(line('.')) + else " g:ruby_indent_block_style == 'expression' let ind = indent(s:GetMSL(line('.'))) endif endif @@ -366,10 +475,17 @@ function GetRubyIndent(...) if strpart(line, 0, col('.') - 1) =~ '=\s*$' && \ strpart(line, col('.') - 1, 2) !~ 'do' + " assignment to case/begin/etc, on the same line, hanging indent let ind = virtcol('.') - 1 + elseif g:ruby_indent_block_style == 'do' + " align to line of the "do", not to the MSL + let ind = indent(line('.')) elseif getline(msl) =~ '=\s*\(#.*\)\=$' + " in the case of assignment to the MSL, align to the starting line, + " not to the MSL let ind = indent(line('.')) else + " align to the MSL let ind = indent(msl) endif endif @@ -389,6 +505,11 @@ function GetRubyIndent(...) return 0 endif + " If the current line starts with a leading operator, add a level of indent. + if s:Match(clnum, s:leading_operator_regex) + return indent(s:GetMSL(clnum)) + sw + endif + " 3.3. Work on the previous line. {{{2 " ------------------------------- @@ -409,14 +530,50 @@ function GetRubyIndent(...) let line = getline(lnum) let ind = indent(lnum) + if g:ruby_indent_access_modifier_style == 'indent' + " If the previous line was a private/protected keyword, add a + " level of indent. + if s:Match(lnum, s:indent_access_modifier_regex) + return indent(lnum) + sw + endif + elseif g:ruby_indent_access_modifier_style == 'outdent' + " If the previous line was a private/protected/public keyword, add + " a level of indent, since the keyword has been out-dented. + if s:Match(lnum, s:access_modifier_regex) + return indent(lnum) + sw + endif + endif + + if s:Match(lnum, s:continuable_regex) && s:Match(lnum, s:continuation_regex) + return indent(s:GetMSL(lnum)) + sw + sw + endif + " If the previous line ended with a block opening, add a level of indent. if s:Match(lnum, s:block_regex) - return indent(s:GetMSL(lnum)) + &sw + let msl = s:GetMSL(lnum) + + if g:ruby_indent_block_style == 'do' + " don't align to the msl, align to the "do" + let ind = indent(lnum) + sw + elseif getline(msl) =~ '=\s*\(#.*\)\=$' + " in the case of assignment to the msl, align to the starting line, + " not to the msl + let ind = indent(lnum) + sw + else + let ind = indent(msl) + sw + endif + return ind + endif + + " If the previous line started with a leading operator, use its MSL's level + " of indent + if s:Match(lnum, s:leading_operator_regex) + return indent(s:GetMSL(lnum)) endif " If the previous line ended with the "*" of a splat, add a level of indent if line =~ s:splat_regex - return indent(lnum) + &sw + return indent(lnum) + sw endif " If the previous line contained unclosed opening brackets and we are still @@ -431,22 +588,22 @@ function GetRubyIndent(...) if opening.pos != -1 if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 if col('.') + 1 == col('$') - return ind + &sw + return ind + sw else return virtcol('.') endif else let nonspace = matchend(line, '\S', opening.pos + 1) - 1 - return nonspace > 0 ? nonspace : ind + &sw + return nonspace > 0 ? nonspace : ind + sw endif elseif closing.pos != -1 call cursor(lnum, closing.pos + 1) normal! % if s:Match(line('.'), s:ruby_indent_keywords) - return indent('.') + &sw + return indent('.') + sw else - return indent('.') + return indent(s:GetMSL(line('.'))) endif else call cursor(clnum, vcol) @@ -473,7 +630,7 @@ function GetRubyIndent(...) let col = s:Match(lnum, s:ruby_indent_keywords) if col > 0 call cursor(lnum, col) - let ind = virtcol('.') - 1 + &sw + let ind = virtcol('.') - 1 + sw " TODO: make this better (we need to count them) (or, if a searchpair " fails, we know that something is lacking an end and thus we indent a " level @@ -490,10 +647,14 @@ function GetRubyIndent(...) let p_lnum = lnum let lnum = s:GetMSL(lnum) - " If the previous line wasn't a MSL and is continuation return its indent. - " TODO: the || s:IsInString() thing worries me a bit. + " If the previous line wasn't a MSL. if p_lnum != lnum - if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line)) + " If previous line ends bracket and begins non-bracket continuation decrease indent by 1. + if s:Match(p_lnum, s:bracket_switch_continuation_regex) + return ind - 1 + " If previous line is a continuation return its indent. + " TODO: the || s:IsInString() thing worries me a bit. + elseif s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line)) return ind endif endif @@ -506,9 +667,9 @@ function GetRubyIndent(...) " TODO: this does not take into account contrived things such as " module Foo; class Bar; end if s:Match(lnum, s:ruby_indent_keywords) - let ind = msl_ind + &sw + let ind = msl_ind + sw if s:Match(lnum, s:end_end_regex) - let ind = ind - &sw + let ind = ind - sw endif return ind endif @@ -517,7 +678,7 @@ function GetRubyIndent(...) " closing bracket, indent one extra level. if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)') if lnum == p_lnum - let ind = msl_ind + &sw + let ind = msl_ind + sw else let ind = msl_ind endif diff --git a/runtime/indent/sass.vim b/runtime/indent/sass.vim index b6e2e66e8..d87b371fd 100644 --- a/runtime/indent/sass.vim +++ b/runtime/indent/sass.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:did_indent") finish @@ -29,9 +29,7 @@ function! GetSassIndent() let indent = indent(lnum) let cindent = indent(v:lnum) if line !~ s:property && line !~ s:extend && cline =~ s:property - return indent + &sw - "elseif line =~ s:property && cline !~ s:property - "return indent - &sw + return indent + (exists('*shiftwidth') ? shiftwidth() : &sw) else return -1 endif diff --git a/runtime/syntax/a65.vim b/runtime/syntax/a65.vim index 94198e6a4..5ade809a1 100644 --- a/runtime/syntax/a65.vim +++ b/runtime/syntax/a65.vim @@ -3,11 +3,8 @@ " Maintainer: Clemens Kirchgatterer <clemens@1541.org> " Last Change: 2014 Jan 05 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -138,29 +135,21 @@ syn match a65End excludenl /end$/ contained syn match a65Continue "\\$" contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_a65_syntax_inits") - if version < 508 - let did_a65_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink a65Section Special - HiLink a65Address Special - HiLink a65Comment Comment - HiLink a65PreProc PreProc - HiLink a65Number Number - HiLink a65String String - HiLink a65Type Statement - HiLink a65Opcode Type - HiLink a65PC Error - HiLink a65Todo Todo - HiLink a65HiLo Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink a65Section Special +HiLink a65Address Special +HiLink a65Comment Comment +HiLink a65PreProc PreProc +HiLink a65Number Number +HiLink a65String String +HiLink a65Type Statement +HiLink a65Opcode Type +HiLink a65PC Error +HiLink a65Todo Todo +HiLink a65HiLo Number + +delcommand HiLink let b:current_syntax = "a65" diff --git a/runtime/syntax/abap.vim b/runtime/syntax/abap.vim index 1d1f6afd0..ac5504a95 100644 --- a/runtime/syntax/abap.vim +++ b/runtime/syntax/abap.vim @@ -5,11 +5,8 @@ " Last Change: 2013 Jun 13 " Comment: Thanks to EPI-USE Labs for all your assistance. :) -" For version < 6.0: Clear all syntax items -" For version >= 6.0: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -43,11 +40,7 @@ syn match abapStringEscape contained "``" syn match abapNumber "\-\=\<\d\+\>" syn region abapHex matchgroup=abapHex start="X'" end="'" -if version >= 600 - setlocal iskeyword=48-57,_,A-Z,a-z,/ -else - set iskeyword=48-57,_,A-Z,a-z,/ -endif +setlocal iskeyword=48-57,_,A-Z,a-z,/ syn match abapNamespace "\</\w\+/" @@ -175,38 +168,30 @@ syn keyword abapTodo contained TODO NOTE syn match abapTodo "\#EC\W\+\w\+" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_abap_syntax_inits") - if version < 508 - let did_abap_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink abapError Error - HiLink abapComment Comment - HiLink abapInclude Include - HiLink abapStatement Statement - HiLink abapComplexStatement Statement - HiLink abapSpecial Special - HiLink abapNamespace Special - HiLink abapSpecialTables Special - HiLink abapSymbolOperator abapOperator - HiLink abapOperator Operator - HiLink abapCharString String - HiLink abapString String - HiLink abapFloat Float - HiLink abapTypes Type - HiLink abapSymbol Structure - HiLink abapStructure Structure - HiLink abapField Variable - HiLink abapNumber Number - HiLink abapHex Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink abapError Error +HiLink abapComment Comment +HiLink abapInclude Include +HiLink abapStatement Statement +HiLink abapComplexStatement Statement +HiLink abapSpecial Special +HiLink abapNamespace Special +HiLink abapSpecialTables Special +HiLink abapSymbolOperator abapOperator +HiLink abapOperator Operator +HiLink abapCharString String +HiLink abapString String +HiLink abapFloat Float +HiLink abapTypes Type +HiLink abapSymbol Structure +HiLink abapStructure Structure +HiLink abapField Variable +HiLink abapNumber Number +HiLink abapHex Number + +delcommand HiLink let b:current_syntax = "abap" diff --git a/runtime/syntax/abaqus.vim b/runtime/syntax/abaqus.vim index cf4b0828f..ddf025584 100644 --- a/runtime/syntax/abaqus.vim +++ b/runtime/syntax/abaqus.vim @@ -4,11 +4,8 @@ " Last Change: 2002 Feb 24 " Remark: Huge improvement in folding performance--see filetype plugin -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -25,24 +22,16 @@ syn match abaqusValue "=\s*[^,]*"lc=1 contained display syn match abaqusBadLine "^\s\+\*.*" display " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_abaqus_syn_inits") - if version < 508 - let did_abaqus_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink abaqusComment Comment - HiLink abaqusKeyword Statement - HiLink abaqusParameter Identifier - HiLink abaqusValue Constant - HiLink abaqusBadLine Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink abaqusComment Comment +HiLink abaqusKeyword Statement +HiLink abaqusParameter Identifier +HiLink abaqusValue Constant +HiLink abaqusBadLine Error + +delcommand HiLink let b:current_syntax = "abaqus" diff --git a/runtime/syntax/abc.vim b/runtime/syntax/abc.vim index 3dc098e73..68f0cf16f 100644 --- a/runtime/syntax/abc.vim +++ b/runtime/syntax/abc.vim @@ -4,11 +4,8 @@ " URL: http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim " Last Change: 27th April 2001 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -36,28 +33,20 @@ syn match abcComment "%.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_abc_syn_inits") - if version < 508 - let did_abc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink abcComment Comment - HiLink abcHeadField Type - HiLink abcBodyField Special - HiLink abcBar Statement - HiLink abcTuple Statement - HiLink abcBroken Statement - HiLink abcTie Statement - HiLink abcGuitarChord Identifier - HiLink abcNote Constant - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink abcComment Comment +HiLink abcHeadField Type +HiLink abcBodyField Special +HiLink abcBar Statement +HiLink abcTuple Statement +HiLink abcBroken Statement +HiLink abcTie Statement +HiLink abcGuitarChord Identifier +HiLink abcNote Constant + +delcommand HiLink let b:current_syntax = "abc" diff --git a/runtime/syntax/abel.vim b/runtime/syntax/abel.vim index 05e8dac91..dfa872f42 100644 --- a/runtime/syntax/abel.vim +++ b/runtime/syntax/abel.vim @@ -3,11 +3,8 @@ " Maintainer: John Cook <johncook3@gmail.com> " Last Change: 2011 Dec 27 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -123,48 +120,40 @@ endif syn sync minlines=1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_abel_syn_inits") - if version < 508 - let did_abel_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink abelHeader abelStatement - HiLink abelSection abelStatement - HiLink abelDeclaration abelStatement - HiLink abelLogicalOperator abelOperator - HiLink abelRangeOperator abelOperator - HiLink abelAlternateOperator abelOperator - HiLink abelArithmeticOperator abelOperator - HiLink abelRelationalOperator abelOperator - HiLink abelAssignmentOperator abelOperator - HiLink abelTruthTableOperator abelOperator - HiLink abelSpecifier abelStatement - HiLink abelOperator abelStatement - HiLink abelStatement Statement - HiLink abelIdentifier Identifier - HiLink abelTypeId abelType - HiLink abelTypeIdChar abelType - HiLink abelType Type - HiLink abelNumber abelString - HiLink abelString String - HiLink abelConstant Constant - HiLink abelComment Comment - HiLink abelExtension abelSpecial - HiLink abelSpecialChar abelSpecial - HiLink abelTypeIdEnd abelSpecial - HiLink abelSpecial Special - HiLink abelDirective PreProc - HiLink abelTodo Todo - HiLink abelError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default highlighting. +HiLink abelHeader abelStatement +HiLink abelSection abelStatement +HiLink abelDeclaration abelStatement +HiLink abelLogicalOperator abelOperator +HiLink abelRangeOperator abelOperator +HiLink abelAlternateOperator abelOperator +HiLink abelArithmeticOperator abelOperator +HiLink abelRelationalOperator abelOperator +HiLink abelAssignmentOperator abelOperator +HiLink abelTruthTableOperator abelOperator +HiLink abelSpecifier abelStatement +HiLink abelOperator abelStatement +HiLink abelStatement Statement +HiLink abelIdentifier Identifier +HiLink abelTypeId abelType +HiLink abelTypeIdChar abelType +HiLink abelType Type +HiLink abelNumber abelString +HiLink abelString String +HiLink abelConstant Constant +HiLink abelComment Comment +HiLink abelExtension abelSpecial +HiLink abelSpecialChar abelSpecial +HiLink abelTypeIdEnd abelSpecial +HiLink abelSpecial Special +HiLink abelDirective PreProc +HiLink abelTodo Todo +HiLink abelError Error + +delcommand HiLink let b:current_syntax = "abel" diff --git a/runtime/syntax/acedb.vim b/runtime/syntax/acedb.vim index 114e4aba9..43cec3ac2 100644 --- a/runtime/syntax/acedb.vim +++ b/runtime/syntax/acedb.vim @@ -7,11 +7,8 @@ " Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm " AceDB software is available from http://www.acedb.org -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -86,35 +83,27 @@ syn region acedbString start=/"/ end=/"/ skip=/\\"/ oneline " Rest of syntax highlighting rules start here " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_acedb_syn_inits") - if version < 508 - let did_acedb_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink acedbMagic Special - HiLink acedbHyb Special - HiLink acedbType Type - HiLink acedbOption Type - HiLink acedbSubclass Type - HiLink acedbSubtag Include - HiLink acedbFlag Include - HiLink acedbTag Include - HiLink acedbClass Todo - HiLink acedbHelp Todo - HiLink acedbXref Identifier - HiLink acedbModifier Label - HiLink acedbComment Comment - HiLink acedbBlock ModeMsg - HiLink acedbNumber Number - HiLink acedbString String +HiLink acedbMagic Special +HiLink acedbHyb Special +HiLink acedbType Type +HiLink acedbOption Type +HiLink acedbSubclass Type +HiLink acedbSubtag Include +HiLink acedbFlag Include +HiLink acedbTag Include +HiLink acedbClass Todo +HiLink acedbHelp Todo +HiLink acedbXref Identifier +HiLink acedbModifier Label +HiLink acedbComment Comment +HiLink acedbBlock ModeMsg +HiLink acedbNumber Number +HiLink acedbString String - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "acedb" diff --git a/runtime/syntax/aflex.vim b/runtime/syntax/aflex.vim index 592c98e4f..21b78d0d8 100644 --- a/runtime/syntax/aflex.vim +++ b/runtime/syntax/aflex.vim @@ -7,21 +7,14 @@ " Comment: Replaced sourcing c.vim file by ada.vim and rename lex* " in aflex* -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the Ada syntax to start with -if version < 600 - so <sfile>:p:h/ada.vim -else - runtime! syntax/ada.vim - unlet b:current_syntax -endif +runtime! syntax/ada.vim +unlet b:current_syntax " --- AfLex stuff --- @@ -69,31 +62,22 @@ syn sync match aflexSyncPat groupthere aflexPatBlock "^<$" syn sync match aflexSyncPat groupthere aflexPatBlock "^%%$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet - -if version >= 508 || !exists("did_aflex_syntax_inits") - if version < 508 - let did_aflex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink aflexSlashQuote aflexPat - HiLink aflexBrace aflexPat - HiLink aflexAbbrvComment aflexPatComment - - HiLink aflexAbbrv SpecialChar - HiLink aflexAbbrvRegExp Macro - HiLink aflexCFunctions Function - HiLink aflexMorePat SpecialChar - HiLink aflexPat Function - HiLink aflexPatComment Comment - HiLink aflexPatString Function - HiLink aflexPatTag Special - HiLink aflexSep Delimiter - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink aflexSlashQuote aflexPat +HiLink aflexBrace aflexPat +HiLink aflexAbbrvComment aflexPatComment + +HiLink aflexAbbrv SpecialChar +HiLink aflexAbbrvRegExp Macro +HiLink aflexCFunctions Function +HiLink aflexMorePat SpecialChar +HiLink aflexPat Function +HiLink aflexPatComment Comment +HiLink aflexPatString Function +HiLink aflexPatTag Special +HiLink aflexSep Delimiter +delcommand HiLink let b:current_syntax = "aflex" diff --git a/runtime/syntax/ahdl.vim b/runtime/syntax/ahdl.vim index b1417c374..82f3918de 100644 --- a/runtime/syntax/ahdl.vim +++ b/runtime/syntax/ahdl.vim @@ -3,11 +3,8 @@ " Maintainer: John Cook <john.cook@kla-tencor.com> " Last Change: 2001 Apr 25 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -66,29 +63,21 @@ syn match ahdlSpecialChar "[\[\]().,;]" syn sync minlines=1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ahdl_syn_inits") - if version < 508 - let did_ahdl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink ahdlNumber ahdlString - HiLink ahdlMegafunction ahdlIdentifier - HiLink ahdlSpecialChar SpecialChar - HiLink ahdlKeyword Statement - HiLink ahdlString String - HiLink ahdlComment Comment - HiLink ahdlIdentifier Identifier - HiLink ahdlOperator Operator - HiLink ahdlTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default highlighting. +HiLink ahdlNumber ahdlString +HiLink ahdlMegafunction ahdlIdentifier +HiLink ahdlSpecialChar SpecialChar +HiLink ahdlKeyword Statement +HiLink ahdlString String +HiLink ahdlComment Comment +HiLink ahdlIdentifier Identifier +HiLink ahdlOperator Operator +HiLink ahdlTodo Todo + +delcommand HiLink let b:current_syntax = "ahdl" " vim:ts=8 diff --git a/runtime/syntax/amiga.vim b/runtime/syntax/amiga.vim index 4ccab1950..e094cfc74 100644 --- a/runtime/syntax/amiga.vim +++ b/runtime/syntax/amiga.vim @@ -5,11 +5,8 @@ " Version: 7 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -72,29 +69,21 @@ syn match amiComment ";.*$" contains=amiCommentGroup syn sync lines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_amiga_syn_inits") - if version < 508 - let did_amiga_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink amiAlias Type - HiLink amiComment Comment - HiLink amiDev Type - HiLink amiEcho String - HiLink amiElse Statement - HiLink amiError Error - HiLink amiKey Statement - HiLink amiNumber Number - HiLink amiString String - HiLink amiTest Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink amiAlias Type +HiLink amiComment Comment +HiLink amiDev Type +HiLink amiEcho String +HiLink amiElse Statement +HiLink amiError Error +HiLink amiKey Statement +HiLink amiNumber Number +HiLink amiString String +HiLink amiTest Special + +delcommand HiLink let b:current_syntax = "amiga" diff --git a/runtime/syntax/aml.vim b/runtime/syntax/aml.vim index 7cb16f1c1..1b975ccab 100644 --- a/runtime/syntax/aml.vim +++ b/runtime/syntax/aml.vim @@ -9,11 +9,8 @@ " of [], in order to avoid -read highlighted, " or [quote] strings highlighted -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -123,35 +120,27 @@ syn region amlSkip matchgroup=amlOutput start="&typ" end="$" contains=amlVar syn region amlSkip matchgroup=amlOutput start="&type" end="$" contains=amlVar " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_aml_syntax_inits") - if version < 508 - let did_aml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink amlComment Comment - HiLink amlNumber Number - HiLink amlQuote String - HiLink amlVar Identifier - HiLink amlVar2 Identifier - HiLink amlFunction PreProc - HiLink amlDir Statement - HiLink amlDir2 Statement - HiLink amlDirSym Statement - HiLink amlOutput Statement - HiLink amlArcCmd ModeMsg - HiLink amlFormedCmd amlArcCmd - HiLink amlTabCmd amlArcCmd - HiLink amlInfoCmd amlArcCmd - HiLink amlVtrCmd amlArcCmd - HiLink amlFormed amlArcCmd - HiLink amlTab amlArcCmd - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink amlComment Comment +HiLink amlNumber Number +HiLink amlQuote String +HiLink amlVar Identifier +HiLink amlVar2 Identifier +HiLink amlFunction PreProc +HiLink amlDir Statement +HiLink amlDir2 Statement +HiLink amlDirSym Statement +HiLink amlOutput Statement +HiLink amlArcCmd ModeMsg +HiLink amlFormedCmd amlArcCmd +HiLink amlTabCmd amlArcCmd +HiLink amlInfoCmd amlArcCmd +HiLink amlVtrCmd amlArcCmd +HiLink amlFormed amlArcCmd +HiLink amlTab amlArcCmd + +delcommand HiLink let b:current_syntax = "aml" diff --git a/runtime/syntax/ampl.vim b/runtime/syntax/ampl.vim index 7f4dfa994..99a683a0f 100644 --- a/runtime/syntax/ampl.vim +++ b/runtime/syntax/ampl.vim @@ -3,9 +3,8 @@ " Last Change: 2003 May 11 -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -115,33 +114,26 @@ syn keyword amplTodo contained TODO FIXME XXX -if version >= 508 || !exists("did_ampl_syntax_inits") - if version < 508 - let did_ampl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - " The default methods for highlighting. Can be overridden later. - HiLink amplEntityKeyword Keyword - HiLink amplType Type - HiLink amplStatement Statement - HiLink amplOperators Operator - HiLink amplBasicOperators Operator - HiLink amplConditional Conditional - HiLink amplRepeat Repeat - HiLink amplStrings String - HiLink amplNumerics Number - HiLink amplSetFunction Function - HiLink amplBuiltInFunction Function - HiLink amplRandomGenerator Function - HiLink amplComment Comment - HiLink amplDotSuffix Special - HiLink amplPiecewise Special +" The default methods for highlighting. Can be overridden later. +HiLink amplEntityKeyword Keyword +HiLink amplType Type +HiLink amplStatement Statement +HiLink amplOperators Operator +HiLink amplBasicOperators Operator +HiLink amplConditional Conditional +HiLink amplRepeat Repeat +HiLink amplStrings String +HiLink amplNumerics Number +HiLink amplSetFunction Function +HiLink amplBuiltInFunction Function +HiLink amplRandomGenerator Function +HiLink amplComment Comment +HiLink amplDotSuffix Special +HiLink amplPiecewise Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "ampl" diff --git a/runtime/syntax/antlr.vim b/runtime/syntax/antlr.vim index 19000293f..2ac38d774 100644 --- a/runtime/syntax/antlr.vim +++ b/runtime/syntax/antlr.vim @@ -4,11 +4,8 @@ " LastChange: 02 May 2001 " Original: Comes from JavaCC.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -18,12 +15,8 @@ endif " Those files usually have the extension *.jj " source the java.vim file -if version < 600 - so <sfile>:p:h/java.vim -else - runtime! syntax/java.vim - unlet b:current_syntax -endif +runtime! syntax/java.vim +unlet b:current_syntax "remove catching errors caused by wrong parenthesis (does not work in antlr "files) (first define them in case they have not been defined in java) @@ -53,17 +46,10 @@ syn match antlrSep "[|:]\|\.\." syn keyword antlrActionToken TOKEN SKIP MORE SPECIAL_TOKEN syn keyword antlrError DEBUG IGNORE_IN_BNF -if version >= 508 || !exists("did_antlr_syntax_inits") - if version < 508 - let did_antlr_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink antlrSep Statement - HiLink antlrPackages Statement - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> +HiLink antlrSep Statement +HiLink antlrPackages Statement +delcommand HiLink let b:current_syntax = "antlr" diff --git a/runtime/syntax/apache.vim b/runtime/syntax/apache.vim index 85cda4095..b556fa350 100644 --- a/runtime/syntax/apache.vim +++ b/runtime/syntax/apache.vim @@ -9,13 +9,9 @@ " make it really linewise? " + add `display' where appropriate -" Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case ignore @@ -178,37 +174,30 @@ syn match apacheSection "<\/\=\(<IfVersion\)[^>]*>" contains=apacheAnything syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP " Define the default highlighting -if version >= 508 || !exists("did_apache_syntax_inits") - if version < 508 - let did_apache_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink apacheAllowOverride apacheDeclaration - HiLink apacheAllowOverrideValue apacheOption - HiLink apacheAuthType apacheDeclaration - HiLink apacheAuthTypeValue apacheOption - HiLink apacheOptionOption apacheOption - HiLink apacheDeclaration Function - HiLink apacheAnything apacheOption - HiLink apacheOption Number - HiLink apacheComment Comment - HiLink apacheFixme Todo - HiLink apacheLimitSectionKeyword apacheLimitSection - HiLink apacheLimitSection apacheSection - HiLink apacheSection Label - HiLink apacheMethodOption Type - HiLink apacheAllowDeny Include - HiLink apacheAllowDenyValue Identifier - HiLink apacheOrder Special - HiLink apacheOrderValue String - HiLink apacheString String - HiLink apacheError Error - HiLink apacheUserID Number +HiLink apacheAllowOverride apacheDeclaration +HiLink apacheAllowOverrideValue apacheOption +HiLink apacheAuthType apacheDeclaration +HiLink apacheAuthTypeValue apacheOption +HiLink apacheOptionOption apacheOption +HiLink apacheDeclaration Function +HiLink apacheAnything apacheOption +HiLink apacheOption Number +HiLink apacheComment Comment +HiLink apacheFixme Todo +HiLink apacheLimitSectionKeyword apacheLimitSection +HiLink apacheLimitSection apacheSection +HiLink apacheSection Label +HiLink apacheMethodOption Type +HiLink apacheAllowDeny Include +HiLink apacheAllowDenyValue Identifier +HiLink apacheOrder Special +HiLink apacheOrderValue String +HiLink apacheString String +HiLink apacheError Error +HiLink apacheUserID Number - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "apache" diff --git a/runtime/syntax/apachestyle.vim b/runtime/syntax/apachestyle.vim index 375fc70a9..53d5907b9 100644 --- a/runtime/syntax/apachestyle.vim +++ b/runtime/syntax/apachestyle.vim @@ -20,11 +20,8 @@ " </SubSection> " </Section> -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -41,25 +38,17 @@ syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1 syn match apTagError contained /[^>]</ms=s+1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_apachestyle_syn_inits") - if version < 508 - let did_apachestyle_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink apComment Comment - HiLink apOption Keyword - "HiLink apLastValue Identifier ugly? - HiLink apTag Special - HiLink apTagOption Identifier - HiLink apTagError Error +HiLink apComment Comment +HiLink apOption Keyword +"HiLink apLastValue Identifier ugly? +HiLink apTag Special +HiLink apTagOption Identifier +HiLink apTagError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "apachestyle" " vim: ts=8 diff --git a/runtime/syntax/aptconf.vim b/runtime/syntax/aptconf.vim index 7a31b2d15..8cb14321e 100644 --- a/runtime/syntax/aptconf.vim +++ b/runtime/syntax/aptconf.vim @@ -3,12 +3,9 @@ " Maintainer: Yann Amar <quidame@poivron.org> " Last Change: 2015 Dec 22 -" For version 5.x: Clear all syntax items -" For version 6.x and 7.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif let main_syntax = 'aptconf' diff --git a/runtime/syntax/arduino.vim b/runtime/syntax/arduino.vim index 14299a441..4a4ef8207 100644 --- a/runtime/syntax/arduino.vim +++ b/runtime/syntax/arduino.vim @@ -10,20 +10,13 @@ " Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback! -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim -endif +runtime! syntax/cpp.vim syn keyword arduinoConstant HIGH LOW INPUT OUTPUT syn keyword arduinoConstant DEC BIN HEX OCT BYTE diff --git a/runtime/syntax/asm.vim b/runtime/syntax/asm.vim index e5f16c5bd..501f5f087 100644 --- a/runtime/syntax/asm.vim +++ b/runtime/syntax/asm.vim @@ -7,11 +7,8 @@ " Thanks to Ori Avtalion for feedback on the comment markers! -" For version 5.x: Clear all syntax items -" For version 6.0 and later: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -103,37 +100,29 @@ syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*" syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_asm_syntax_inits") - if version < 508 - let did_asm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink asmSection Special - HiLink asmLabel Label - HiLink asmComment Comment - HiLink asmTodo Todo - HiLink asmDirective Statement - - HiLink asmInclude Include - HiLink asmCond PreCondit - HiLink asmMacro Macro - - HiLink hexNumber Number - HiLink decNumber Number - HiLink octNumber Number - HiLink binNumber Number - - HiLink asmIdentifier Identifier - HiLink asmType Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink asmSection Special +HiLink asmLabel Label +HiLink asmComment Comment +HiLink asmTodo Todo +HiLink asmDirective Statement + +HiLink asmInclude Include +HiLink asmCond PreCondit +HiLink asmMacro Macro + +HiLink hexNumber Number +HiLink decNumber Number +HiLink octNumber Number +HiLink binNumber Number + +HiLink asmIdentifier Identifier +HiLink asmType Type + +delcommand HiLink let b:current_syntax = "asm" diff --git a/runtime/syntax/asm68k.vim b/runtime/syntax/asm68k.vim index 8463e487e..4f057a909 100644 --- a/runtime/syntax/asm68k.vim +++ b/runtime/syntax/asm68k.vim @@ -8,11 +8,8 @@ " Feel free to contribute... " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -328,63 +325,55 @@ syn match asm68kDirective "\<XREF\(\.S\)\=\s" syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_asm68k_syntax_inits") - if version < 508 - let did_asm68k_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - " Comment Constant Error Identifier PreProc Special Statement Todo Type - " - " Constant Boolean Character Number String - " Identifier Function - " PreProc Define Include Macro PreCondit - " Special Debug Delimiter SpecialChar SpecialComment Tag - " Statement Conditional Exception Keyword Label Operator Repeat - " Type StorageClass Structure Typedef - - HiLink asm68kComment Comment - HiLink asm68kTodo Todo - - HiLink hexNumber Number " Constant - HiLink octNumber Number " Constant - HiLink binNumber Number " Constant - HiLink decNumber Number " Constant - HiLink floatNumber Number " Constant - HiLink floatExponent Number " Constant - HiLink floatE SpecialChar " Statement - "HiLink floatE Number " Constant - - HiLink asm68kImmediate SpecialChar " Statement - "HiLink asm68kSymbol Constant - - HiLink asm68kString String " Constant - HiLink asm68kCharError Error - HiLink asm68kStringError Error - - HiLink asm68kReg Identifier - HiLink asm68kOperator Identifier - - HiLink asm68kInclude Include " PreProc - HiLink asm68kMacro Macro " PreProc - HiLink asm68kMacroParam Keyword " Statement - - HiLink asm68kDirective Special - HiLink asm68kPreCond Special - - - HiLink asm68kOpcode Statement - HiLink asm68kCond Conditional " Statement - HiLink asm68kRepeat Repeat " Statement - - HiLink asm68kLabel Type - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +" Comment Constant Error Identifier PreProc Special Statement Todo Type +" +" Constant Boolean Character Number String +" Identifier Function +" PreProc Define Include Macro PreCondit +" Special Debug Delimiter SpecialChar SpecialComment Tag +" Statement Conditional Exception Keyword Label Operator Repeat +" Type StorageClass Structure Typedef + +HiLink asm68kComment Comment +HiLink asm68kTodo Todo + +HiLink hexNumber Number " Constant +HiLink octNumber Number " Constant +HiLink binNumber Number " Constant +HiLink decNumber Number " Constant +HiLink floatNumber Number " Constant +HiLink floatExponent Number " Constant +HiLink floatE SpecialChar " Statement +"HiLink floatE Number " Constant + +HiLink asm68kImmediate SpecialChar " Statement +"HiLink asm68kSymbol Constant + +HiLink asm68kString String " Constant +HiLink asm68kCharError Error +HiLink asm68kStringError Error + +HiLink asm68kReg Identifier +HiLink asm68kOperator Identifier + +HiLink asm68kInclude Include " PreProc +HiLink asm68kMacro Macro " PreProc +HiLink asm68kMacroParam Keyword " Statement + +HiLink asm68kDirective Special +HiLink asm68kPreCond Special + + +HiLink asm68kOpcode Statement +HiLink asm68kCond Conditional " Statement +HiLink asm68kRepeat Repeat " Statement + +HiLink asm68kLabel Type +delcommand HiLink let b:current_syntax = "asm68k" diff --git a/runtime/syntax/asmh8300.vim b/runtime/syntax/asmh8300.vim index 48699d89c..5134c512e 100644 --- a/runtime/syntax/asmh8300.vim +++ b/runtime/syntax/asmh8300.vim @@ -3,11 +3,8 @@ " Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com> " Last Change: 2002 Sep 19 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -52,33 +49,21 @@ syn case match " Read the general asm syntax -if version < 600 - source <sfile>:p:h/asm.vim -else - runtime! syntax/asm.vim -endif +runtime! syntax/asm.vim " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_hitachi_syntax_inits") - if version < 508 - let did_hitachi_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink asmOpcode Statement - HiLink asmRegister Identifier +HiLink asmOpcode Statement +HiLink asmRegister Identifier - " My default-color overrides: - "hi asmOpcode ctermfg=yellow - "hi asmReg ctermfg=lightmagenta +" My default-color overrides: +"hi asmOpcode ctermfg=yellow +"hi asmReg ctermfg=lightmagenta - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "asmh8300" diff --git a/runtime/syntax/asn.vim b/runtime/syntax/asn.vim index 28c8efba9..8b553e884 100644 --- a/runtime/syntax/asn.vim +++ b/runtime/syntax/asn.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/asn.vim " Last Change: 2012 Oct 05 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -50,34 +47,26 @@ syn match asnBraces "[{}]" syn sync ccomment asnComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_asn_syn_inits") - if version < 508 - let did_asn_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink asnDefinition Function - HiLink asnBraces Function - HiLink asnStructure Statement - HiLink asnBoolValue Boolean - HiLink asnSpecial Special - HiLink asnString String - HiLink asnCharacter Character - HiLink asnSpecialCharacter asnSpecial - HiLink asnNumber asnValue - HiLink asnComment Comment - HiLink asnLineComment asnComment - HiLink asnType Type - HiLink asnTypeInfo PreProc - HiLink asnValue Number - HiLink asnExternal Include - HiLink asnTagModifier Function - HiLink asnFieldOption Type - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink asnDefinition Function +HiLink asnBraces Function +HiLink asnStructure Statement +HiLink asnBoolValue Boolean +HiLink asnSpecial Special +HiLink asnString String +HiLink asnCharacter Character +HiLink asnSpecialCharacter asnSpecial +HiLink asnNumber asnValue +HiLink asnComment Comment +HiLink asnLineComment asnComment +HiLink asnType Type +HiLink asnTypeInfo PreProc +HiLink asnValue Number +HiLink asnExternal Include +HiLink asnTagModifier Function +HiLink asnFieldOption Type +delcommand HiLink let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/aspperl.vim b/runtime/syntax/aspperl.vim index 0f7ef4687..5a9abedb1 100644 --- a/runtime/syntax/aspperl.vim +++ b/runtime/syntax/aspperl.vim @@ -4,11 +4,8 @@ " URL: http://nim.dhs.org/~edh/aspperl.vim " Last Change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -16,14 +13,9 @@ if !exists("main_syntax") let main_syntax = 'perlscript' endif -if version < 600 - so <sfile>:p:h/html.vim - syn include @AspPerlScript <sfile>:p:h/perl.vim -else - runtime! syntax/html.vim - unlet b:current_syntax - syn include @AspPerlScript syntax/perl.vim -endif +runtime! syntax/html.vim +unlet b:current_syntax +syn include @AspPerlScript syntax/perl.vim syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags diff --git a/runtime/syntax/aspvbs.vim b/runtime/syntax/aspvbs.vim index 07c129e46..ff5521a37 100644 --- a/runtime/syntax/aspvbs.vim +++ b/runtime/syntax/aspvbs.vim @@ -11,10 +11,8 @@ " Thanks to Dean Hall <hall@apt7.com> for testing the use of classes in " VBScripts which I've been too scared to do. -" Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -22,11 +20,7 @@ if !exists("main_syntax") let main_syntax = 'aspvbs' endif -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags @@ -163,31 +157,23 @@ syn sync match htmlHighlight grouphere htmlTag "%>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_aspvbs_syn_inits") - if version < 508 - let did_aspvbs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - "HiLink AspVBScript Special - HiLink AspVBSLineNumber Comment - HiLink AspVBSNumber Number - HiLink AspVBSError Error - HiLink AspVBSStatement Statement - HiLink AspVBSString String - HiLink AspVBSComment Comment - HiLink AspVBSTodo Todo - HiLink AspVBSFunction Identifier - HiLink AspVBSMethods PreProc - HiLink AspVBSEvents Special - HiLink AspVBSTypeSpecifier Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +"HiLink AspVBScript Special +HiLink AspVBSLineNumber Comment +HiLink AspVBSNumber Number +HiLink AspVBSError Error +HiLink AspVBSStatement Statement +HiLink AspVBSString String +HiLink AspVBSComment Comment +HiLink AspVBSTodo Todo +HiLink AspVBSFunction Identifier +HiLink AspVBSMethods PreProc +HiLink AspVBSEvents Special +HiLink AspVBSTypeSpecifier Type + +delcommand HiLink let b:current_syntax = "aspvbs" diff --git a/runtime/syntax/asterisk.vim b/runtime/syntax/asterisk.vim index fd4ec39c9..c562b8557 100644 --- a/runtime/syntax/asterisk.vim +++ b/runtime/syntax/asterisk.vim @@ -5,10 +5,9 @@ " Updated for 1.2 by Tilghman Lesher (Corydon76) " Last Change: 2015 Feb 27 " version 0.4 -" -if version < 600 - syntax clear -elseif exists("b:current_syntax") + +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -57,42 +56,35 @@ syn match asteriskSetting "^port\s*=\s*\d\{1,5}\s*$" contains=aste syn match asteriskSetting "^host\s*=\s*\(dynamic\|\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\|\([[:alnum:]][[:alnum:]\-\.]*\.[[:alpha:]]{2,10}\)\)" contains=asteriskIP,asteriskHostname " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_conf_syntax_inits") - if version < 508 - let did_conf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink asteriskComment Comment +HiLink asteriskExten String +HiLink asteriskContext Preproc +HiLink asteriskPattern Type +HiLink asteriskApp Statement +HiLink asteriskInclude Preproc +HiLink asteriskIncludeBad Error +HiLink asteriskPriority Preproc +HiLink asteriskLabel Type +HiLink asteriskVar String +HiLink asteriskVarLen Function +HiLink asteriskExp Type +HiLink asteriskCodecsPermit Preproc +HiLink asteriskCodecs String +HiLink asteriskType Statement +HiLink asteriskTypeType Type +HiLink asteriskAuth String +HiLink asteriskAuthType Type +HiLink asteriskIPRange Identifier +HiLink asteriskIP Identifier +HiLink asteriskPort Identifier +HiLink asteriskHostname Identifier +HiLink asteriskSetting Statement +HiLink asteriskError Error +delcommand HiLink - HiLink asteriskComment Comment - HiLink asteriskExten String - HiLink asteriskContext Preproc - HiLink asteriskPattern Type - HiLink asteriskApp Statement - HiLink asteriskInclude Preproc - HiLink asteriskIncludeBad Error - HiLink asteriskPriority Preproc - HiLink asteriskLabel Type - HiLink asteriskVar String - HiLink asteriskVarLen Function - HiLink asteriskExp Type - HiLink asteriskCodecsPermit Preproc - HiLink asteriskCodecs String - HiLink asteriskType Statement - HiLink asteriskTypeType Type - HiLink asteriskAuth String - HiLink asteriskAuthType Type - HiLink asteriskIPRange Identifier - HiLink asteriskIP Identifier - HiLink asteriskPort Identifier - HiLink asteriskHostname Identifier - HiLink asteriskSetting Statement - HiLink asteriskError Error - delcommand HiLink -endif let b:current_syntax = "asterisk" " vim: ts=8 sw=2 diff --git a/runtime/syntax/asteriskvm.vim b/runtime/syntax/asteriskvm.vim index a6c9dba41..357b29936 100644 --- a/runtime/syntax/asteriskvm.vim +++ b/runtime/syntax/asteriskvm.vim @@ -3,10 +3,9 @@ " Maintainer: Tilghman Lesher (Corydon76) " Last Change: 2006 Mar 21 " version 0.2 -" -if version < 600 - syntax clear -elseif exists("b:current_syntax") + +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -33,28 +32,20 @@ syn match mailboxEmail ",\zs[^@=,]*@[[:alnum:]\-\.]\+\.[[:alpha syn match comma "[,|]" contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -:if version >= 508 || !exists("did_conf_syntax_inits") - if version < 508 - let did_conf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink asteriskvmComment Comment - HiLink asteriskvmContext Identifier - HiLink asteriskvmZone Type - HiLink zoneName String - HiLink zoneDef String - HiLink asteriskvmSetting Type - HiLink asteriskvmSettingBool Type - - HiLink asteriskvmMailbox Statement - HiLink mailboxEmail String - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink asteriskvmComment Comment +HiLink asteriskvmContext Identifier +HiLink asteriskvmZone Type +HiLink zoneName String +HiLink zoneDef String +HiLink asteriskvmSetting Type +HiLink asteriskvmSettingBool Type + +HiLink asteriskvmMailbox Statement +HiLink mailboxEmail String +delcommand HiLink let b:current_syntax = "asteriskvm" diff --git a/runtime/syntax/atlas.vim b/runtime/syntax/atlas.vim index b8fe4356b..30e136941 100644 --- a/runtime/syntax/atlas.vim +++ b/runtime/syntax/atlas.vim @@ -3,11 +3,8 @@ " Maintainer: Inaki Saez <jisaez@sfe.indra.es> " Last Change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -61,37 +58,29 @@ syn sync maxlines=100 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_atlas_syntax_inits") - if version < 508 - let did_atlas_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink atlasConditional Conditional - HiLink atlasRepeat Repeat - HiLink atlasStatement Statement - HiLink atlasNumber Number - HiLink atlasHexNumber Number - HiLink atlasOctalNumber Number - HiLink atlasBinNumber Number - HiLink atlasDecimalNumber Float - HiLink atlasFormatString String - HiLink atlasString String - HiLink atlasComment Comment - HiLink atlasComment2 Comment - HiLink atlasInclude Include - HiLink atlasDefine Macro - HiLink atlasReserved PreCondit - HiLink atlasStorageClass StorageClass - HiLink atlasIdentifier NONE - HiLink atlasSpecial Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink atlasConditional Conditional +HiLink atlasRepeat Repeat +HiLink atlasStatement Statement +HiLink atlasNumber Number +HiLink atlasHexNumber Number +HiLink atlasOctalNumber Number +HiLink atlasBinNumber Number +HiLink atlasDecimalNumber Float +HiLink atlasFormatString String +HiLink atlasString String +HiLink atlasComment Comment +HiLink atlasComment2 Comment +HiLink atlasInclude Include +HiLink atlasDefine Macro +HiLink atlasReserved PreCondit +HiLink atlasStorageClass StorageClass +HiLink atlasIdentifier NONE +HiLink atlasSpecial Special + +delcommand HiLink let b:current_syntax = "atlas" diff --git a/runtime/syntax/automake.vim b/runtime/syntax/automake.vim index eea2a9f38..b34f7516b 100644 --- a/runtime/syntax/automake.vim +++ b/runtime/syntax/automake.vim @@ -18,18 +18,12 @@ " EXTRA_SOURCES. " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif " Read the Makefile syntax to start with -if version < 600 - source <sfile>:p:h/make.vim -else - runtime! syntax/make.vim -endif +runtime! syntax/make.vim syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1 @@ -59,34 +53,26 @@ syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIde syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_automake_syntax_inits") - if version < 508 - let did_automake_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink automakePrimary Statement - HiLink automakeSecondary Type - HiLink automakeExtra Special - HiLink automakeOptions Special - HiLink automakeClean Special - HiLink automakeSubdirs Statement - HiLink automakeConditional PreProc - HiLink automakeSubst PreProc - HiLink automakeComment1 makeComment - HiLink automakeComment2 makeComment - HiLink automakeMakeError makeError - HiLink automakeBadSubst makeError - HiLink automakeMakeDString makeDString - HiLink automakeMakeSString makeSString - HiLink automakeMakeBString makeBString +HiLink automakePrimary Statement +HiLink automakeSecondary Type +HiLink automakeExtra Special +HiLink automakeOptions Special +HiLink automakeClean Special +HiLink automakeSubdirs Statement +HiLink automakeConditional PreProc +HiLink automakeSubst PreProc +HiLink automakeComment1 makeComment +HiLink automakeComment2 makeComment +HiLink automakeMakeError makeError +HiLink automakeBadSubst makeError +HiLink automakeMakeDString makeDString +HiLink automakeMakeSString makeSString +HiLink automakeMakeBString makeBString - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "automake" diff --git a/runtime/syntax/ave.vim b/runtime/syntax/ave.vim index 2a0a9d85a..ae3693936 100644 --- a/runtime/syntax/ave.vim +++ b/runtime/syntax/ave.vim @@ -11,11 +11,8 @@ " I use some technologies to automatically load avenue scripts " into ArcView. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -59,34 +56,26 @@ syn match aveTypos "==" syn match aveTypos "!=" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting+yet -if version >= 508 || !exists("did_ave_syn_inits") - if version < 508 - let did_ave_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting+yet +command -nargs=+ HiLink hi def link <args> - HiLink aveStatement Statement +HiLink aveStatement Statement - HiLink aveString String - HiLink aveNumber Number +HiLink aveString String +HiLink aveNumber Number - HiLink aveFixVariables Special - HiLink aveVariables Identifier - HiLink globalVariables Special - HiLink aveConst Special +HiLink aveFixVariables Special +HiLink aveVariables Identifier +HiLink globalVariables Special +HiLink aveConst Special - HiLink aveClassMethods Function +HiLink aveClassMethods Function - HiLink aveOperator Operator - HiLink aveComment Comment +HiLink aveOperator Operator +HiLink aveComment Comment - HiLink aveTypos Error +HiLink aveTypos Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "ave" diff --git a/runtime/syntax/ayacc.vim b/runtime/syntax/ayacc.vim index fedd0e80a..9f5ec566e 100644 --- a/runtime/syntax/ayacc.vim +++ b/runtime/syntax/ayacc.vim @@ -6,21 +6,14 @@ " Comment: Replaced sourcing c.vim file by ada.vim and rename yacc* " in ayacc* -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the Ada syntax to start with -if version < 600 - so <sfile>:p:h/ada.vim -else - runtime! syntax/ada.vim - unlet b:current_syntax -endif +runtime! syntax/ada.vim +unlet b:current_syntax let s:cpo_save = &cpo set cpo&vim @@ -54,35 +47,28 @@ syn match ayaccSep "^[ \t]*%}" syn match ayaccCurlyError "[{}]" syn region ayaccAction matchgroup=ayaccCurly start="{" end="}" contains=ALLBUT,@ayaccActionGroup -if version >= 508 || !exists("did_ayacc_syntax_inits") - if version < 508 - let did_ayacc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - " Internal ayacc highlighting links - HiLink ayaccBrkt ayaccStmt - HiLink ayaccKey ayaccStmt - HiLink ayaccOper ayaccStmt - HiLink ayaccUnionStart ayaccKey +" Internal ayacc highlighting links +HiLink ayaccBrkt ayaccStmt +HiLink ayaccKey ayaccStmt +HiLink ayaccOper ayaccStmt +HiLink ayaccUnionStart ayaccKey - " External ayacc highlighting links - HiLink ayaccCurly Delimiter - HiLink ayaccCurlyError Error - HiLink ayaccDefinition Function - HiLink ayaccDelim Function - HiLink ayaccKeyActn Special - HiLink ayaccSectionSep Todo - HiLink ayaccSep Delimiter - HiLink ayaccStmt Statement - HiLink ayaccType Type +" External ayacc highlighting links +HiLink ayaccCurly Delimiter +HiLink ayaccCurlyError Error +HiLink ayaccDefinition Function +HiLink ayaccDelim Function +HiLink ayaccKeyActn Special +HiLink ayaccSectionSep Todo +HiLink ayaccSep Delimiter +HiLink ayaccStmt Statement +HiLink ayaccType Type - " since Bram doesn't like my Delimiter :| - HiLink Delimiter Type - delcommand HiLink -endif +" since Bram doesn't like my Delimiter :| +HiLink Delimiter Type +delcommand HiLink let b:current_syntax = "ayacc" diff --git a/runtime/syntax/b.vim b/runtime/syntax/b.vim index b470ab9ef..95f5ad727 100644 --- a/runtime/syntax/b.vim +++ b/runtime/syntax/b.vim @@ -5,11 +5,8 @@ " LastChange: 8 Dec 2007 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -69,58 +66,50 @@ syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error syn sync ccomment bComment minlines=10 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet - -if version >= 508 || !exists("did_b_syntax_inits") - if version < 508 - let did_b_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink bLabel Label - HiLink bUserLabel Label - HiLink bConditional Conditional - HiLink bRepeat Repeat - HiLink bLogic Special - HiLink bCharacter Character - HiLink bSpecialCharacter bSpecial - HiLink bNumber Number - HiLink bFloat Float - HiLink bOctalError bError - HiLink bParenError bError +" Only when an item doesn't have highlighting yet + +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink bLabel Label +HiLink bUserLabel Label +HiLink bConditional Conditional +HiLink bRepeat Repeat +HiLink bLogic Special +HiLink bCharacter Character +HiLink bSpecialCharacter bSpecial +HiLink bNumber Number +HiLink bFloat Float +HiLink bOctalError bError +HiLink bParenError bError " HiLink bInParen bError - HiLink bCommentError bError - HiLink bBoolean Identifier - HiLink bConstant Identifier - HiLink bGuard Identifier - HiLink bOperator Operator - HiLink bKeywords Operator - HiLink bOps Identifier - HiLink bStructure Structure - HiLink bStorageClass StorageClass - HiLink bInclude Include - HiLink bPreProc PreProc - HiLink bDefine Macro - HiLink bIncluded bString - HiLink bError Error - HiLink bStatement Statement - HiLink bPreCondit PreCondit - HiLink bType Type - HiLink bCommentError bError - HiLink bCommentString bString - HiLink bComment2String bString - HiLink bCommentSkip bComment - HiLink bString String - HiLink bComment Comment - HiLink bSpecial SpecialChar - HiLink bTodo Todo - "hi link bIdentifier Identifier - delcommand HiLink -endif +HiLink bCommentError bError +HiLink bBoolean Identifier +HiLink bConstant Identifier +HiLink bGuard Identifier +HiLink bOperator Operator +HiLink bKeywords Operator +HiLink bOps Identifier +HiLink bStructure Structure +HiLink bStorageClass StorageClass +HiLink bInclude Include +HiLink bPreProc PreProc +HiLink bDefine Macro +HiLink bIncluded bString +HiLink bError Error +HiLink bStatement Statement +HiLink bPreCondit PreCondit +HiLink bType Type +HiLink bCommentError bError +HiLink bCommentString bString +HiLink bComment2String bString +HiLink bCommentSkip bComment +HiLink bString String +HiLink bComment Comment +HiLink bSpecial SpecialChar +HiLink bTodo Todo +"hi link bIdentifier Identifier +delcommand HiLink let b:current_syntax = "b" diff --git a/runtime/syntax/baan.vim b/runtime/syntax/baan.vim index 5009218b6..917562bcf 100644 --- a/runtime/syntax/baan.vim +++ b/runtime/syntax/baan.vim @@ -4,15 +4,8 @@ " Originally owned by: Erwin Smit / Her van de Vliert " Last change: v1.17 2006/04/26 10:40:18 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -" -if version < 600 - syntax clear - if exists("baan_fold") - unlet baan_fold - endif -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -1894,40 +1887,32 @@ syn keyword baanBshell bclm.productidlicensed syn keyword baanBshell bclm.set.desktop " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_baan_syn_inits") - if version < 508 - let did_baan_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink baanConditional Conditional - HiLink baan3gl Statement - HiLink baan3glpre PreProc - HiLink baan4gl Statement - HiLink baan4glh Statement - HiLink baansql Statement - HiLink baansqlh Statement - HiLink baanDalHook Statement - HiLink baanNumber Number - HiLink baanString String - HiLink baanOpenStringError Error - HiLink baanConstant Constant - HiLink baanComment Comment - HiLink baanCommenth Comment - HiLink baanUncommented Comment - HiLink baanDLLUsage Comment - HiLink baanFunUsage Comment - HiLink baanIdentifier Normal - HiLink baanBshell Function - HiLink baanType Type - HiLink baanStorageClass StorageClass +HiLink baanConditional Conditional +HiLink baan3gl Statement +HiLink baan3glpre PreProc +HiLink baan4gl Statement +HiLink baan4glh Statement +HiLink baansql Statement +HiLink baansqlh Statement +HiLink baanDalHook Statement +HiLink baanNumber Number +HiLink baanString String +HiLink baanOpenStringError Error +HiLink baanConstant Constant +HiLink baanComment Comment +HiLink baanCommenth Comment +HiLink baanUncommented Comment +HiLink baanDLLUsage Comment +HiLink baanFunUsage Comment +HiLink baanIdentifier Normal +HiLink baanBshell Function +HiLink baanType Type +HiLink baanStorageClass StorageClass - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "baan" diff --git a/runtime/syntax/basic.vim b/runtime/syntax/basic.vim index c72032da2..6384913e3 100644 --- a/runtime/syntax/basic.vim +++ b/runtime/syntax/basic.vim @@ -8,11 +8,8 @@ " This syntax file not a complete implementation yet. Send suggestions to the " maintainer. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -143,34 +140,26 @@ syn match basicFilenumber "#\d\+" syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_basic_syntax_inits") - if version < 508 - let did_basic_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink basicLabel Label - HiLink basicConditional Conditional - HiLink basicRepeat Repeat - HiLink basicLineNumber Comment - HiLink basicNumber Number - HiLink basicError Error - HiLink basicStatement Statement - HiLink basicString String - HiLink basicComment Comment - HiLink basicSpecial Special - HiLink basicTodo Todo - HiLink basicFunction Identifier - HiLink basicTypeSpecifier Type - HiLink basicFilenumber basicTypeSpecifier - "hi basicMathsOperator term=bold cterm=bold gui=bold +HiLink basicLabel Label +HiLink basicConditional Conditional +HiLink basicRepeat Repeat +HiLink basicLineNumber Comment +HiLink basicNumber Number +HiLink basicError Error +HiLink basicStatement Statement +HiLink basicString String +HiLink basicComment Comment +HiLink basicSpecial Special +HiLink basicTodo Todo +HiLink basicFunction Identifier +HiLink basicTypeSpecifier Type +HiLink basicFilenumber basicTypeSpecifier +"hi basicMathsOperator term=bold cterm=bold gui=bold - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "basic" diff --git a/runtime/syntax/bc.vim b/runtime/syntax/bc.vim index 965afc35b..bf4a62afc 100644 --- a/runtime/syntax/bc.vim +++ b/runtime/syntax/bc.vim @@ -5,11 +5,8 @@ " (Dominique Pelle added @Spell) " Available on: www.gjh.sk/~vlado/bc.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -53,27 +50,19 @@ syn match bcParenError ")" syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_bc_syntax_inits") - if version < 508 - let did_bc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink bcKeyword Statement - HiLink bcType Type - HiLink bcConstant Constant - HiLink bcNumber Number - HiLink bcComment Comment - HiLink bcString String - HiLink bcSpecialChar SpecialChar - HiLink bcParenError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink bcKeyword Statement +HiLink bcType Type +HiLink bcConstant Constant +HiLink bcNumber Number +HiLink bcComment Comment +HiLink bcString String +HiLink bcSpecialChar SpecialChar +HiLink bcParenError Error + +delcommand HiLink let b:current_syntax = "bc" " vim: ts=8 diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim index 8bd0528e1..24b80b51b 100644 --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -8,11 +8,8 @@ " Initialization " ============== -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -91,11 +88,7 @@ syn region bibField contained start="\S\+\s*=\s*" end=/[}),]/me=e-1 contains=bib syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField " Actually, 5.8 <= Vim < 6.0 would ignore the `fold' keyword anyway, but Vim<5.8 would produce " an error, so we explicitly distinguish versions with and without folding functionality: -if version < 600 - syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment -else - syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment -endif +syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment syn region bibComment2 start=/@Comment\s*[{(]/ end=/^\s*[})]/me=e-1 contains=@bibCommentContents nextgroup=bibEntry " Synchronization @@ -107,25 +100,18 @@ syn sync minlines=50 " Highlighting defaults " ===================== " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_bib_syn_inits") - if version < 508 - let did_bib_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink bibType Identifier - HiLink bibEntryKw Statement - HiLink bibNSEntryKw PreProc - HiLink bibKey Special - HiLink bibVariable Constant - HiLink bibUnescapedSpecial Error - HiLink bibComment Comment - HiLink bibComment2 Comment - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink bibType Identifier +HiLink bibEntryKw Statement +HiLink bibNSEntryKw PreProc +HiLink bibKey Special +HiLink bibVariable Constant +HiLink bibUnescapedSpecial Error +HiLink bibComment Comment +HiLink bibComment2 Comment +delcommand HiLink let b:current_syntax = "bib" diff --git a/runtime/syntax/bindzone.vim b/runtime/syntax/bindzone.vim index d599a85db..f2372556b 100644 --- a/runtime/syntax/bindzone.vim +++ b/runtime/syntax/bindzone.vim @@ -9,11 +9,8 @@ " " $Id: bindzone.vim 12 2011-07-16 21:09:57Z julian $ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -70,40 +67,32 @@ syn region zoneParen contained start="(" end=")" contains=zoneSerial, syn match zoneComment /;.*/ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_bind_zone_syn_inits") - if version < 508 - let did_bind_zone_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink zoneDirective Macro - - HiLink zoneUnknown Error - - HiLink zoneOrigin Statement - HiLink zoneOwnerName Statement - HiLink zoneDomain Identifier - - HiLink zoneSpecial Special - HiLink zoneTTL Constant - HiLink zoneClass Include - HiLink zoneRRType Type - - HiLink zoneIPAddr Number - HiLink zoneIP6Addr Number - HiLink zoneText String - HiLink zoneNumber Number - HiLink zoneSerial Special - - HiLink zoneErrParen Error - HiLink zoneComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink zoneDirective Macro + +HiLink zoneUnknown Error + +HiLink zoneOrigin Statement +HiLink zoneOwnerName Statement +HiLink zoneDomain Identifier + +HiLink zoneSpecial Special +HiLink zoneTTL Constant +HiLink zoneClass Include +HiLink zoneRRType Type + +HiLink zoneIPAddr Number +HiLink zoneIP6Addr Number +HiLink zoneText String +HiLink zoneNumber Number +HiLink zoneSerial Special + +HiLink zoneErrParen Error +HiLink zoneComment Comment + +delcommand HiLink let b:current_syntax = "bindzone" diff --git a/runtime/syntax/blank.vim b/runtime/syntax/blank.vim index 60251c966..53ef556a9 100644 --- a/runtime/syntax/blank.vim +++ b/runtime/syntax/blank.vim @@ -3,11 +3,8 @@ " Maintainer: Rafal M. Sulejman <unefunge@friko2.onet.pl> " Last change: 2011 Dec 28 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -28,22 +25,14 @@ syn match blankNumber "\[[0-9]\+\]" syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_blank_syntax_inits") - if version < 508 - let did_blank_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink blankInstruction Statement - HiLink blankNumber Number - HiLink blankString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink blankInstruction Statement +HiLink blankNumber Number +HiLink blankString String + +delcommand HiLink let b:current_syntax = "blank" diff --git a/runtime/syntax/bst.vim b/runtime/syntax/bst.vim index e7836d781..995f1da46 100644 --- a/runtime/syntax/bst.vim +++ b/runtime/syntax/bst.vim @@ -4,21 +4,12 @@ " Filenames: *.bst " $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version < 600 - command -nargs=1 SetIsk set iskeyword=<args> -else - command -nargs=1 SetIsk setlocal iskeyword=<args> -endif -SetIsk 48-57,#,$,',.,A-Z,a-z -delcommand SetIsk +setlocal iskeyword=48-57,#,$,',.,A-Z,a-z syn case ignore @@ -62,27 +53,19 @@ syn keyword bstField title type syn keyword bstField volume year " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_bst_syn_inits") - if version < 508 - let did_bst_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink bstComment Comment - HiLink bstString String - HiLink bstCommand PreProc - HiLink bstBuiltIn Statement - HiLink bstField Special - HiLink bstNumber Number - HiLink bstType Type - HiLink bstIdentifier Identifier - HiLink bstError Error - delcommand HiLink -endif +HiLink bstComment Comment +HiLink bstString String +HiLink bstCommand PreProc +HiLink bstBuiltIn Statement +HiLink bstField Special +HiLink bstNumber Number +HiLink bstType Type +HiLink bstIdentifier Identifier +HiLink bstError Error +delcommand HiLink let b:current_syntax = "bst" diff --git a/runtime/syntax/btm.vim b/runtime/syntax/btm.vim index 4fd5b2db9..133a51b12 100644 --- a/runtime/syntax/btm.vim +++ b/runtime/syntax/btm.vim @@ -11,11 +11,8 @@ "//- After unary operators like "defined" can assume token type. "// Should there be more of these? -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -184,45 +181,37 @@ syn keyword btmCommand unlock unset ver verify vol syn keyword btmCommand vscrput y " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_btm_syntax_inits") - if version < 508 - let did_btm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink btmLabel Special - HiLink btmLabelMark Special - HiLink btmCmdDivider Special - HiLink btmConditional btmStatement - HiLink btmDotBoolOp btmStatement - HiLink btmRepeat btmStatement - HiLink btmEchoCommand btmStatement - HiLink btmEchoParam btmStatement - HiLink btmStatement Statement - HiLink btmTodo Todo - HiLink btmString String - HiLink btmNumber Number - HiLink btmComment Comment - HiLink btmArgument Identifier - HiLink btmVariable Identifier - HiLink btmEcho String - HiLink btmBIFMatch btmStatement - HiLink btmBuiltInFunc btmStatement - HiLink btmBuiltInVar btmStatement - HiLink btmSpecialVar btmStatement - HiLink btmCommand btmStatement - - "optional highlighting - "HiLink btmShowTab Error - "HiLink btmShowTabc Error - "hiLink btmIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink btmLabel Special +HiLink btmLabelMark Special +HiLink btmCmdDivider Special +HiLink btmConditional btmStatement +HiLink btmDotBoolOp btmStatement +HiLink btmRepeat btmStatement +HiLink btmEchoCommand btmStatement +HiLink btmEchoParam btmStatement +HiLink btmStatement Statement +HiLink btmTodo Todo +HiLink btmString String +HiLink btmNumber Number +HiLink btmComment Comment +HiLink btmArgument Identifier +HiLink btmVariable Identifier +HiLink btmEcho String +HiLink btmBIFMatch btmStatement +HiLink btmBuiltInFunc btmStatement +HiLink btmBuiltInVar btmStatement +HiLink btmSpecialVar btmStatement +HiLink btmCommand btmStatement + +"optional highlighting +"HiLink btmShowTab Error +"HiLink btmShowTabc Error +"hiLink btmIdentifier Identifier + +delcommand HiLink let b:current_syntax = "btm" diff --git a/runtime/syntax/bzr.vim b/runtime/syntax/bzr.vim index ef5445bf4..11450ba99 100644 --- a/runtime/syntax/bzr.vim +++ b/runtime/syntax/bzr.vim @@ -11,11 +11,8 @@ " Gioele Barabucci " for idea of diff highlighting -" For version 5.x: Clear all syntax items. -" For version 6.x: Quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded. +if exists("b:current_syntax") finish endif @@ -40,24 +37,16 @@ syn sync clear syn sync match bzrSync grouphere bzrRegion "^-\{14} This line and the following will be ignored -\{14}$"me=s-1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already. -" For version 5.8 and later: only when an item doesn't have highlighting yet. -if version >= 508 || !exists("did_bzr_syn_inits") - if version <= 508 - let did_bzr_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink bzrRemoved Constant - HiLink bzrAdded Identifier - HiLink bzrModified Special - HiLink bzrRenamed Special - HiLink bzrUnchanged Special - HiLink bzrUnknown Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet. +command -nargs=+ HiLink hi def link <args> + +HiLink bzrRemoved Constant +HiLink bzrAdded Identifier +HiLink bzrModified Special +HiLink bzrRenamed Special +HiLink bzrUnchanged Special +HiLink bzrUnknown Special + +delcommand HiLink let b:current_syntax = "bzr" diff --git a/runtime/syntax/cabal.vim b/runtime/syntax/cabal.vim index 4130bac89..0ba2704eb 100644 --- a/runtime/syntax/cabal.vim +++ b/runtime/syntax/cabal.vim @@ -18,11 +18,8 @@ " v1.0: Cabal syntax in vimball format " (thanks to Magnus Therning) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -105,27 +102,19 @@ syn match cabalStatement "\ctype" syn match cabalStatement "\cversion" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cabal_syn_inits") - if version < 508 - let did_cabal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink cabalVersion Number - HiLink cabalTruth Boolean - HiLink cabalComment Comment - HiLink cabalStatement Statement - HiLink cabalCategory Type - HiLink cabalFunction Function - HiLink cabalConditional Conditional - HiLink cabalOperator Operator - HiLink cabalCompiler Constant - delcommand HiLink -endif +HiLink cabalVersion Number +HiLink cabalTruth Boolean +HiLink cabalComment Comment +HiLink cabalStatement Statement +HiLink cabalCategory Type +HiLink cabalFunction Function +HiLink cabalConditional Conditional +HiLink cabalOperator Operator +HiLink cabalCompiler Constant +delcommand HiLink let b:current_syntax = "cabal" diff --git a/runtime/syntax/cdl.vim b/runtime/syntax/cdl.vim Binary files differindex 69f124bdd..501dcfc7e 100644 --- a/runtime/syntax/cdl.vim +++ b/runtime/syntax/cdl.vim diff --git a/runtime/syntax/cfg.vim b/runtime/syntax/cfg.vim index b82fb26fc..c57b6f871 100644 --- a/runtime/syntax/cfg.vim +++ b/runtime/syntax/cfg.vim @@ -3,11 +3,8 @@ " Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru) " Last change: 2012 Aug 11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists ("b:current_syntax") +" quit when a syntax file was already loaded +if exists ("b:current_syntax") finish endif @@ -36,25 +33,18 @@ syn match CfgComment ";.*" syn match CfgComment "\/\/.*" " Define the default hightlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cfg_syn_inits") - if version < 508 - let did_cfg_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink CfgOnOff Label - HiLink CfgComment Comment - HiLink CfgSection Type - HiLink CfgString String - HiLink CfgParams Keyword - HiLink CfgValues Constant - HiLink CfgDirectory Directory - HiLink UncPath Directory - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink CfgOnOff Label +HiLink CfgComment Comment +HiLink CfgSection Type +HiLink CfgString String +HiLink CfgParams Keyword +HiLink CfgValues Constant +HiLink CfgDirectory Directory +HiLink UncPath Directory + +delcommand HiLink + let b:current_syntax = "cfg" " vim:ts=8 diff --git a/runtime/syntax/ch.vim b/runtime/syntax/ch.vim index add739509..05a1fcbdd 100644 --- a/runtime/syntax/ch.vim +++ b/runtime/syntax/ch.vim @@ -8,21 +8,14 @@ " Ch is a C/C++ interpreter with many high level extensions " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax " Ch extentions @@ -33,20 +26,14 @@ syn keyword chStructure class syn keyword chType string_t array " Default highlighting -if version >= 508 || !exists("did_ch_syntax_inits") - if version < 508 - let did_ch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink chAccess chStatement - HiLink chExceptions Exception - HiLink chStatement Statement - HiLink chType Type - HiLink chStructure Structure - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink chAccess chStatement +HiLink chExceptions Exception +HiLink chStatement Statement +HiLink chType Type +HiLink chStructure Structure +delcommand HiLink let b:current_syntax = "ch" diff --git a/runtime/syntax/change.vim b/runtime/syntax/change.vim index e9bf88b9d..ae90f348b 100644 --- a/runtime/syntax/change.vim +++ b/runtime/syntax/change.vim @@ -7,11 +7,8 @@ " in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and " "cweb.vim" respectively. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -21,21 +18,13 @@ syn region changeFromMaterial start="^@x.*$"ms=e+1 end="^@y.*$"me=s-1 syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_change_syntax_inits") - if version < 508 - let did_change_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink changeFromMaterial String - HiLink changeToMaterial Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink changeFromMaterial String +HiLink changeToMaterial Statement + +delcommand HiLink let b:current_syntax = "change" diff --git a/runtime/syntax/changelog.vim b/runtime/syntax/changelog.vim index 33d31ba46..fc55fb528 100644 --- a/runtime/syntax/changelog.vim +++ b/runtime/syntax/changelog.vim @@ -4,11 +4,8 @@ " Maintainer: Corinna Vinschen <vinschen@redhat.com> " Last Change: June 1, 2003 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -28,17 +25,12 @@ endif syn match changelogText "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail -if version < 600 - syn region changelogFiles start="^\s\+[+*]\s" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend - syn region changelogFiles start="^\s\+[([]" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend - syn match changelogColon contained ":\s" -else - syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend - syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend - syn match changelogFuncs contained "(.\{-})" extend - syn match changelogFuncs contained "\[.\{-}]" extend - syn match changelogColon contained ":" -endif +syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend +syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend +syn match changelogFuncs contained "(.\{-})" extend +syn match changelogFuncs contained "\[.\{-}]" extend +syn match changelogColon contained ":" + syn match changelogBullet contained "^\s\+[+*]\s" contains=changelogError syn match changelogMail contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>" syn keyword changelogMonth contained jan feb mar apr may jun jul aug sep oct nov dec @@ -46,32 +38,22 @@ syn keyword changelogDay contained mon tue wed thu fri sat sun syn match changelogNumber contained "[.-]*[0-9]\+" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_changelog_syntax_inits") - if version < 508 - let did_changelog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink changelogText Normal - HiLink changelogBullet Type - HiLink changelogColon Type - HiLink changelogFiles Comment - if version >= 600 - HiLink changelogFuncs Comment - endif - HiLink changelogHeader Statement - HiLink changelogMail Special - HiLink changelogNumber Number - HiLink changelogMonth Number - HiLink changelogDay Number - HiLink changelogError Folded - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink changelogText Normal +HiLink changelogBullet Type +HiLink changelogColon Type +HiLink changelogFiles Comment +HiLink changelogFuncs Comment +HiLink changelogHeader Statement +HiLink changelogMail Special +HiLink changelogNumber Number +HiLink changelogMonth Number +HiLink changelogDay Number +HiLink changelogError Folded + +delcommand HiLink let b:current_syntax = "changelog" diff --git a/runtime/syntax/chaskell.vim b/runtime/syntax/chaskell.vim index 3f764d0e8..4b1e8c53b 100644 --- a/runtime/syntax/chaskell.vim +++ b/runtime/syntax/chaskell.vim @@ -9,10 +9,6 @@ let b:hs_chs=1 " Include standard Haskell highlighting -if version < 600 - source <sfile>:p:h/haskell.vim -else - runtime! syntax/haskell.vim -endif +runtime! syntax/haskell.vim " vim: ts=8 diff --git a/runtime/syntax/cheetah.vim b/runtime/syntax/cheetah.vim index 7eb17567c..c1860def3 100644 --- a/runtime/syntax/cheetah.vim +++ b/runtime/syntax/cheetah.vim @@ -8,11 +8,8 @@ " PSP-style tags: <% .. %> (obsoleted feature) " doc-strings and header comments (rarely used feature) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -36,25 +33,17 @@ syn match cheetahComment "##.*$" display syn region cheetahMultiLineComment start="#\*" end="\*#" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cheetah_syn_inits") - if version < 508 - let did_cheetah_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cheetahPlaceHolder Identifier - HiLink cheetahDirective PreCondit - HiLink cheetahKeyword Define - HiLink cheetahContinuation Special - HiLink cheetahComment Comment - HiLink cheetahMultiLineComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink cheetahPlaceHolder Identifier +HiLink cheetahDirective PreCondit +HiLink cheetahKeyword Define +HiLink cheetahContinuation Special +HiLink cheetahComment Comment +HiLink cheetahMultiLineComment Comment + +delcommand HiLink let b:current_syntax = "cheetah" diff --git a/runtime/syntax/chill.vim b/runtime/syntax/chill.vim index ca00cd95e..d8ee9dbc2 100644 --- a/runtime/syntax/chill.vim +++ b/runtime/syntax/chill.vim @@ -11,11 +11,8 @@ " & Communications LTd.) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -124,67 +121,59 @@ endif exec "syn sync ccomment chillComment minlines=" . chill_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ch_syntax_inits") - if version < 508 - let did_ch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink chillLabel Label - HiLink chillUserLabel Label - HiLink chillConditional Conditional - " hi chillConditional term=bold ctermfg=red guifg=red gui=bold - - HiLink chillRepeat Repeat - HiLink chillProcess Repeat - HiLink chillSignal Repeat - HiLink chillCharacter Character - HiLink chillSpecialCharacter chillSpecial - HiLink chillNumber Number - HiLink chillFloat Float - HiLink chillOctalError chillError - HiLink chillParenError chillError - HiLink chillInParen chillError - HiLink chillCommentError chillError - HiLink chillSpaceError chillError - HiLink chillOperator Operator - HiLink chillStructure Structure - HiLink chillBlock Operator - HiLink chillScope Operator - "hi chillEDML term=underline ctermfg=DarkRed guifg=Red - HiLink chillEDML PreProc - "hi chillBoolConst term=bold ctermfg=brown guifg=brown - HiLink chillBoolConst Constant - "hi chillLogical term=bold ctermfg=brown guifg=brown - HiLink chillLogical Constant - HiLink chillStorageClass StorageClass - HiLink chillInclude Include - HiLink chillPreProc PreProc - HiLink chillDefine Macro - HiLink chillIncluded chillString - HiLink chillError Error - HiLink chillStatement Statement - HiLink chillPreCondit PreCondit - HiLink chillType Type - HiLink chillCommentError chillError - HiLink chillCommentString chillString - HiLink chillComment2String chillString - HiLink chillCommentSkip chillComment - HiLink chillString String - HiLink chillComment Comment - " hi chillComment term=None ctermfg=lightblue guifg=lightblue - HiLink chillSpecial SpecialChar - HiLink chillTodo Todo - HiLink chillBlock Statement - "HiLink chillIdentifier Identifier - HiLink chillBracket Delimiter - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink chillLabel Label +HiLink chillUserLabel Label +HiLink chillConditional Conditional +" hi chillConditional term=bold ctermfg=red guifg=red gui=bold + +HiLink chillRepeat Repeat +HiLink chillProcess Repeat +HiLink chillSignal Repeat +HiLink chillCharacter Character +HiLink chillSpecialCharacter chillSpecial +HiLink chillNumber Number +HiLink chillFloat Float +HiLink chillOctalError chillError +HiLink chillParenError chillError +HiLink chillInParen chillError +HiLink chillCommentError chillError +HiLink chillSpaceError chillError +HiLink chillOperator Operator +HiLink chillStructure Structure +HiLink chillBlock Operator +HiLink chillScope Operator +"hi chillEDML term=underline ctermfg=DarkRed guifg=Red +HiLink chillEDML PreProc +"hi chillBoolConst term=bold ctermfg=brown guifg=brown +HiLink chillBoolConst Constant +"hi chillLogical term=bold ctermfg=brown guifg=brown +HiLink chillLogical Constant +HiLink chillStorageClass StorageClass +HiLink chillInclude Include +HiLink chillPreProc PreProc +HiLink chillDefine Macro +HiLink chillIncluded chillString +HiLink chillError Error +HiLink chillStatement Statement +HiLink chillPreCondit PreCondit +HiLink chillType Type +HiLink chillCommentError chillError +HiLink chillCommentString chillString +HiLink chillComment2String chillString +HiLink chillCommentSkip chillComment +HiLink chillString String +HiLink chillComment Comment +" hi chillComment term=None ctermfg=lightblue guifg=lightblue +HiLink chillSpecial SpecialChar +HiLink chillTodo Todo +HiLink chillBlock Statement +"HiLink chillIdentifier Identifier +HiLink chillBracket Delimiter + +delcommand HiLink let b:current_syntax = "chill" diff --git a/runtime/syntax/cl.vim b/runtime/syntax/cl.vim index 41c045fb0..057d005ca 100644 --- a/runtime/syntax/cl.vim +++ b/runtime/syntax/cl.vim @@ -10,19 +10,12 @@ " Version: 6 " Last Change: Mar 06 2013 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version >= 600 - setlocal iskeyword=@,48-57,_,- -else - set iskeyword=@,48-57,_,- -endif +setlocal iskeyword=@,48-57,_,- syn case ignore @@ -75,40 +68,32 @@ syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cl_syntax_inits") - if version < 508 - let did_cl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink clifError Error - HiLink clSpaceError Error - HiLink clWhile Repeat - HiLink clConditional Conditional - HiLink clDebug Debug - HiLink clNeedsWork Todo - HiLink clTodo Todo - HiLink clComment Comment - HiLink clProcedure Procedure - HiLink clBreak Procedure - HiLink clInclude Include - HiLink clSetOption Statement - HiLink clSet Identifier - HiLink clPreProc PreProc - HiLink clOperator Operator - HiLink clNumber Number - HiLink clString String - HiLink clQuote Delimiter - HiLink clReserved Identifier - HiLink clFunction Function - HiLink clStatement Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink clifError Error +HiLink clSpaceError Error +HiLink clWhile Repeat +HiLink clConditional Conditional +HiLink clDebug Debug +HiLink clNeedsWork Todo +HiLink clTodo Todo +HiLink clComment Comment +HiLink clProcedure Procedure +HiLink clBreak Procedure +HiLink clInclude Include +HiLink clSetOption Statement +HiLink clSet Identifier +HiLink clPreProc PreProc +HiLink clOperator Operator +HiLink clNumber Number +HiLink clString String +HiLink clQuote Delimiter +HiLink clReserved Identifier +HiLink clFunction Function +HiLink clStatement Statement + +delcommand HiLink let b:current_syntax = "cl" diff --git a/runtime/syntax/clean.vim b/runtime/syntax/clean.vim index ea95aa209..13ddfaba3 100644 --- a/runtime/syntax/clean.vim +++ b/runtime/syntax/clean.vim @@ -4,11 +4,8 @@ " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> " Last Change: 2013 Oct 15 by Jurriën Stutterheim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -52,49 +49,41 @@ syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(in " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_clean_syntax_init") - if version < 508 - let did_clean_syntax_init = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " Comments - HiLink cleanComment Comment - " Constants and denotations - HiLink cleanStringDenot String - HiLink cleanCharDenot Character - HiLink cleanIntegerDenot Number - HiLink cleanBoolDenot Boolean - HiLink cleanRealDenot Float - " Identifiers - " Statements - HiLink cleanTypeClass Keyword - HiLink cleanConditional Conditional - HiLink cleanLabel Label - HiLink cleanKeyword Keyword - " Generic Preprocessing - HiLink cleanIncludeKeyword Include - HiLink cleanModuleSystem PreProc - " Type - HiLink cleanBasicType Type - HiLink cleanSpecialType Type - HiLink cleanFuncTypeDef Typedef - " Special - HiLink cleanSpecial Special - HiLink cleanList Special - HiLink cleanArray Special - HiLink cleanRecord Special - HiLink cleanTuple Special - " Error - " Todo - HiLink cleanTodo Todo + " Comments + HiLink cleanComment Comment + " Constants and denotations + HiLink cleanStringDenot String + HiLink cleanCharDenot Character + HiLink cleanIntegerDenot Number + HiLink cleanBoolDenot Boolean + HiLink cleanRealDenot Float + " Identifiers + " Statements + HiLink cleanTypeClass Keyword + HiLink cleanConditional Conditional + HiLink cleanLabel Label + HiLink cleanKeyword Keyword + " Generic Preprocessing + HiLink cleanIncludeKeyword Include + HiLink cleanModuleSystem PreProc + " Type + HiLink cleanBasicType Type + HiLink cleanSpecialType Type + HiLink cleanFuncTypeDef Typedef + " Special + HiLink cleanSpecial Special + HiLink cleanList Special + HiLink cleanArray Special + HiLink cleanRecord Special + HiLink cleanTuple Special + " Error + " Todo + HiLink cleanTodo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "clean" diff --git a/runtime/syntax/clipper.vim b/runtime/syntax/clipper.vim index 1a10a2dca..30fdd7b50 100644 --- a/runtime/syntax/clipper.vim +++ b/runtime/syntax/clipper.vim @@ -4,11 +4,8 @@ " Some things based on c.vim by Bram Moolenaar and pascal.vim by Mario Eusebio " Last Change: 2011 Dec 29 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -114,32 +111,24 @@ syntax match clipperComment "^\*.*" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_clipper_syntax_inits") - if version < 508 - let did_clipper_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink clipperConditional Conditional - HiLink clipperRepeat Repeat - HiLink clipperNumber Number - HiLink clipperInclude Include - HiLink clipperComment Comment - HiLink clipperOperator Operator - HiLink clipperStorageClass StorageClass - HiLink clipperStatement Statement - HiLink clipperString String - HiLink clipperFunction Function - HiLink clipperLineContinuation Special - HiLink clipperDelimiters Delimiter - HiLink clipperUserVariable Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink clipperConditional Conditional +HiLink clipperRepeat Repeat +HiLink clipperNumber Number +HiLink clipperInclude Include +HiLink clipperComment Comment +HiLink clipperOperator Operator +HiLink clipperStorageClass StorageClass +HiLink clipperStatement Statement +HiLink clipperString String +HiLink clipperFunction Function +HiLink clipperLineContinuation Special +HiLink clipperDelimiters Delimiter +HiLink clipperUserVariable Identifier + +delcommand HiLink let b:current_syntax = "clipper" diff --git a/runtime/syntax/cmake.vim b/runtime/syntax/cmake.vim index 4586940c5..8e73e329e 100644 --- a/runtime/syntax/cmake.vim +++ b/runtime/syntax/cmake.vim @@ -12,11 +12,8 @@ " http://www.cmake.org/HTML/Copyright.html " This implies that distribution with Vim is allowed -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo @@ -52,32 +49,24 @@ syn keyword cmakeTodo \ contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cmake_syntax_inits") - if version < 508 - let did_cmake_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink cmakeStatement Statement - HiLink cmakeComment Comment - HiLink cmakeString String - HiLink cmakeVariableValue Type - HiLink cmakeRegistry Underlined - HiLink cmakeArguments Identifier - HiLink cmakeArgument Constant - HiLink cmakeEnvironment Special - HiLink cmakeOperators Operator - HiLink cmakeMacro PreProc - HiLink cmakeError Error - HiLink cmakeTodo TODO - HiLink cmakeEscaped Special +HiLink cmakeStatement Statement +HiLink cmakeComment Comment +HiLink cmakeString String +HiLink cmakeVariableValue Type +HiLink cmakeRegistry Underlined +HiLink cmakeArguments Identifier +HiLink cmakeArgument Constant +HiLink cmakeEnvironment Special +HiLink cmakeOperators Operator +HiLink cmakeMacro PreProc +HiLink cmakeError Error +HiLink cmakeTodo TODO +HiLink cmakeEscaped Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "cmake" diff --git a/runtime/syntax/cobol.vim b/runtime/syntax/cobol.vim index 51ca3d877..a63e8b387 100644 --- a/runtime/syntax/cobol.vim +++ b/runtime/syntax/cobol.vim @@ -6,20 +6,13 @@ " James Mitchell <james_mitchell@acm.org>) " Last Change: 2015 Feb 13 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " MOST important - else most of the keywords wont work! -if version < 600 - set isk=@,48-57,- -else - setlocal isk=@,48-57,- -endif +setlocal isk=@,48-57,- syn case ignore @@ -157,52 +150,44 @@ else endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cobol_syntax_inits") - if version < 508 - let did_cobol_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cobolBAD Error - HiLink cobolBadID Error - HiLink cobolBadLine Error - if exists("g:cobol_legacy_code") - HiLink cobolMarker Comment - else - HiLink cobolMarker Error - endif - HiLink cobolCALLs Function - HiLink cobolComment Comment - HiLink cobolKeys Comment - HiLink cobolAreaB Special - HiLink cobolCompiler PreProc - HiLink cobolCondFlow Special - HiLink cobolCopy PreProc - HiLink cobolDeclA cobolDecl - HiLink cobolDecl Type - HiLink cobolExtras Special - HiLink cobolGoTo Special - HiLink cobolConstant Constant - HiLink cobolNumber Constant - HiLink cobolPic Constant - HiLink cobolReserved Statement - HiLink cobolDivision Label - HiLink cobolSection Label - HiLink cobolParagraph Label - HiLink cobolDivisionName Keyword - HiLink cobolSectionName Keyword - HiLink cobolParagraphName Keyword - HiLink cobolString Constant - HiLink cobolTodo Todo - HiLink cobolWatch Special - HiLink cobolIndicator Special - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink cobolBAD Error +HiLink cobolBadID Error +HiLink cobolBadLine Error +if exists("g:cobol_legacy_code") + HiLink cobolMarker Comment +else + HiLink cobolMarker Error endif +HiLink cobolCALLs Function +HiLink cobolComment Comment +HiLink cobolKeys Comment +HiLink cobolAreaB Special +HiLink cobolCompiler PreProc +HiLink cobolCondFlow Special +HiLink cobolCopy PreProc +HiLink cobolDeclA cobolDecl +HiLink cobolDecl Type +HiLink cobolExtras Special +HiLink cobolGoTo Special +HiLink cobolConstant Constant +HiLink cobolNumber Constant +HiLink cobolPic Constant +HiLink cobolReserved Statement +HiLink cobolDivision Label +HiLink cobolSection Label +HiLink cobolParagraph Label +HiLink cobolDivisionName Keyword +HiLink cobolSectionName Keyword +HiLink cobolParagraphName Keyword +HiLink cobolString Constant +HiLink cobolTodo Todo +HiLink cobolWatch Special +HiLink cobolIndicator Special + +delcommand HiLink let b:current_syntax = "cobol" diff --git a/runtime/syntax/coco.vim b/runtime/syntax/coco.vim index 4094a5530..ae32348bc 100644 --- a/runtime/syntax/coco.vim +++ b/runtime/syntax/coco.vim @@ -5,9 +5,8 @@ " Remark: Coco/R syntax partially implemented. " License: Vim license -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/config.vim b/runtime/syntax/config.vim index cd83b2435..1bb5c2f3e 100644 --- a/runtime/syntax/config.vim +++ b/runtime/syntax/config.vim @@ -11,11 +11,8 @@ " script, so I wrote this quick and dirty patch. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -37,28 +34,20 @@ syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" m syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink configdelimiter Delimiter - HiLink configoperator Operator - HiLink configcomment Comment - HiLink configDnl Comment - HiLink configfunction Function - HiLink confignumber Number - HiLink configkeyword Keyword - HiLink configspecial Special - HiLink configstring String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink configdelimiter Delimiter +HiLink configoperator Operator +HiLink configcomment Comment +HiLink configDnl Comment +HiLink configfunction Function +HiLink confignumber Number +HiLink configkeyword Keyword +HiLink configspecial Special +HiLink configstring String + +delcommand HiLink let b:current_syntax = "config" diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index fefd0ff7b..be7381ea6 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -4,21 +4,14 @@ " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> " Last Change: 2016 Jul 07 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax " C++ extensions syn keyword cppStatement new delete this friend using @@ -60,29 +53,22 @@ endif syn match cppMinMax "[<>]?" " Default highlighting -if version >= 508 || !exists("did_cpp_syntax_inits") - if version < 508 - let did_cpp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink cppAccess cppStatement - HiLink cppCast cppStatement - HiLink cppExceptions Exception - HiLink cppOperator Operator - HiLink cppStatement Statement - HiLink cppModifier Type - HiLink cppType Type - HiLink cppStorageClass StorageClass - HiLink cppStructure Structure - HiLink cppBoolean Boolean - HiLink cppConstant Constant - HiLink cppRawStringDelimiter Delimiter - HiLink cppRawString String - HiLink cppNumber Number - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> +HiLink cppAccess cppStatement +HiLink cppCast cppStatement +HiLink cppExceptions Exception +HiLink cppOperator Operator +HiLink cppStatement Statement +HiLink cppModifier Type +HiLink cppType Type +HiLink cppStorageClass StorageClass +HiLink cppStructure Structure +HiLink cppBoolean Boolean +HiLink cppConstant Constant +HiLink cppRawStringDelimiter Delimiter +HiLink cppRawString String +HiLink cppNumber Number +delcommand HiLink let b:current_syntax = "cpp" diff --git a/runtime/syntax/crontab.vim b/runtime/syntax/crontab.vim index fd1c30023..ed2025492 100644 --- a/runtime/syntax/crontab.vim +++ b/runtime/syntax/crontab.vim @@ -10,11 +10,8 @@ " crontab line format: " Minutes Hours Days Months Days_of_Week Commands # comments -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -39,41 +36,33 @@ syntax match crontabCmnt "^\s*#.*" contains=@Spell syntax match crontabPercent "[^\\]%.*"lc=1 contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_crontab_syn_inits") - if version < 508 - let did_crontab_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink crontabMin Number - HiLink crontabHr PreProc - HiLink crontabDay Type - - HiLink crontabMnth Number - HiLink crontabMnth12 Number - HiLink crontabMnthS Number - HiLink crontabMnthN Number - - HiLink crontabDow PreProc - HiLink crontabDow7 PreProc - HiLink crontabDowS PreProc - HiLink crontabDowN PreProc - - HiLink crontabNick Special - HiLink crontabVar Identifier - HiLink crontabPercent Special +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink crontabMin Number +HiLink crontabHr PreProc +HiLink crontabDay Type + +HiLink crontabMnth Number +HiLink crontabMnth12 Number +HiLink crontabMnthS Number +HiLink crontabMnthN Number + +HiLink crontabDow PreProc +HiLink crontabDow7 PreProc +HiLink crontabDowS PreProc +HiLink crontabDowN PreProc + +HiLink crontabNick Special +HiLink crontabVar Identifier +HiLink crontabPercent Special " comment out next line for to suppress unix commands coloring. - HiLink crontabCmd Statement +HiLink crontabCmd Statement - HiLink crontabCmnt Comment +HiLink crontabCmnt Comment - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "crontab" diff --git a/runtime/syntax/csc.vim b/runtime/syntax/csc.vim index 5493b17f5..f4ce62c87 100644 --- a/runtime/syntax/csc.vim +++ b/runtime/syntax/csc.vim @@ -3,11 +3,8 @@ " Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> " Last change: 2011 Dec 25 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -145,7 +142,7 @@ sy match cscBPMacro contained "!" sy match cscBPW "!\s*\a*" contains=cscBPmacro " when wanted, highlighting lhs members or erros in asignments (may lag the editing) -if version >= 600 && exists("csc_asignment") +if exists("csc_asignment") sy match cscEqError '\("[^"]*"\s*\|[^][\t !%()*+,--/:;<=>{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)' sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition sy region cscFormulaIn matchgroup=cscVarName transparent start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\(->\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\)*\s*=\([^=]\@=\|$\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition contained @@ -158,44 +155,36 @@ endif exec "sy sync ccomment cscComment minlines=" . csc_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_csc_syntax_inits") - if version < 508 - let did_csc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue - - HiLink cscNumber Number - HiLink cscOctal Number - HiLink cscFloat Float - HiLink cscParenE Error - HiLink cscCommentE Error - HiLink cscSpaceE Error - HiLink cscError Error - HiLink cscString String - HiLink cscComment Comment - HiLink cscTodo Todo - HiLink cscStatement Statement - HiLink cscIfError Error - HiLink cscEqError Error - HiLink cscFunction Statement - HiLink cscCondition Statement - HiLink cscWarn WarningMsg - - HiLink cscComE Error - HiLink cscCom Statement - HiLink cscComW WarningMsg - - HiLink cscBPMacro Identifier - HiLink cscBPW WarningMsg - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue + +HiLink cscNumber Number +HiLink cscOctal Number +HiLink cscFloat Float +HiLink cscParenE Error +HiLink cscCommentE Error +HiLink cscSpaceE Error +HiLink cscError Error +HiLink cscString String +HiLink cscComment Comment +HiLink cscTodo Todo +HiLink cscStatement Statement +HiLink cscIfError Error +HiLink cscEqError Error +HiLink cscFunction Statement +HiLink cscCondition Statement +HiLink cscWarn WarningMsg + +HiLink cscComE Error +HiLink cscCom Statement +HiLink cscComW WarningMsg + +HiLink cscBPMacro Identifier +HiLink cscBPW WarningMsg + +delcommand HiLink let b:current_syntax = "csc" diff --git a/runtime/syntax/csh.vim b/runtime/syntax/csh.vim index 9dc2c4ef5..973a3550d 100644 --- a/runtime/syntax/csh.vim +++ b/runtime/syntax/csh.vim @@ -5,11 +5,8 @@ " Version: 11 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -100,60 +97,47 @@ syn match cshNumber "-\=\<\d\+\>" "syn match cshIdentifier "\<[a-zA-Z._][a-zA-Z0-9._]*\>" " Shell Input Redirection (Here Documents) -if version < 600 - syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**END[a-zA-Z_0-9]*\**" matchgroup=cshRedir end="^END[a-zA-Z_0-9]*$" - syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**EOF\**" matchgroup=cshRedir end="^EOF$" -else - syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**\z(\h\w*\)\**" matchgroup=cshRedir end="^\z1$" -endif +syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**\z(\h\w*\)\**" matchgroup=cshRedir end="^\z1$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_csh_syntax_inits") - if version < 508 - let did_csh_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cshArgv cshVariables - HiLink cshBckQuote cshCommand - HiLink cshDblQuote cshString - HiLink cshExtVar cshVariables - HiLink cshHereDoc cshString - HiLink cshNoEndlineBQ cshNoEndline - HiLink cshNoEndlineDQ cshNoEndline - HiLink cshNoEndlineSQ cshNoEndline - HiLink cshQtyWord cshVariables - HiLink cshRedir cshOperator - HiLink cshSelector cshVariables - HiLink cshSetStmt cshStatement - HiLink cshSetVariables cshVariables - HiLink cshSnglQuote cshString - HiLink cshSubst cshVariables - - HiLink cshCommand Statement - HiLink cshComment Comment - HiLink cshConditional Conditional - HiLink cshIdentifier Error - HiLink cshModifier Special - HiLink cshNoEndline Error - HiLink cshNumber Number - HiLink cshOperator Operator - HiLink cshRedir Statement - HiLink cshRepeat Repeat - HiLink cshShellVariables Special - HiLink cshSpecial Special - HiLink cshStatement Statement - HiLink cshString String - HiLink cshSubstError Error - HiLink cshTodo Todo - HiLink cshVariables Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink cshArgv cshVariables +HiLink cshBckQuote cshCommand +HiLink cshDblQuote cshString +HiLink cshExtVar cshVariables +HiLink cshHereDoc cshString +HiLink cshNoEndlineBQ cshNoEndline +HiLink cshNoEndlineDQ cshNoEndline +HiLink cshNoEndlineSQ cshNoEndline +HiLink cshQtyWord cshVariables +HiLink cshRedir cshOperator +HiLink cshSelector cshVariables +HiLink cshSetStmt cshStatement +HiLink cshSetVariables cshVariables +HiLink cshSnglQuote cshString +HiLink cshSubst cshVariables + +HiLink cshCommand Statement +HiLink cshComment Comment +HiLink cshConditional Conditional +HiLink cshIdentifier Error +HiLink cshModifier Special +HiLink cshNoEndline Error +HiLink cshNumber Number +HiLink cshOperator Operator +HiLink cshRedir Statement +HiLink cshRepeat Repeat +HiLink cshShellVariables Special +HiLink cshSpecial Special +HiLink cshStatement Statement +HiLink cshString String +HiLink cshSubstError Error +HiLink cshTodo Todo +HiLink cshVariables Type + +delcommand HiLink let b:current_syntax = "csh" diff --git a/runtime/syntax/csp.vim b/runtime/syntax/csp.vim index bd6213efd..a5460cddb 100644 --- a/runtime/syntax/csp.vim +++ b/runtime/syntax/csp.vim @@ -15,11 +15,8 @@ " - The additional syntax for the RT-Tester (pseudo-comments) " should be optional. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -149,46 +146,38 @@ syn match cspSdlRttComment "pragma\s\+SDL_MATCH\s\+" nextgroup=cspRttPragmaSdlAr syn sync lines=250 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_csp_syn_inits") - if version < 508 - let did_csp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - " (For vim version <=5.7, the command groups are defined in - " $VIMRUNTIME/syntax/synload.vim ) - HiLink cspComment Comment - HiLink cspNumber Number - HiLink cspConditional Conditional - HiLink cspOperator Delimiter - HiLink cspKeyword Keyword - HiLink cspReserved SpecialChar - HiLink cspInclude Error - HiLink cspIncludeKeyword Include - HiLink cspIncludeArg Include - HiLink cspAssert PreCondit - HiLink cspType Type - HiLink cspProcess Function - HiLink cspTodo Todo - HiLink cspOldRttComment Define - HiLink cspRttPragmaKeyword Define - HiLink cspSdlRttComment Define - HiLink cspRttPragmaArg Define - HiLink cspRttPragmaSdlArg Define - HiLink cspRttPragmaSdlName Default - HiLink cspRttPragmaSdlTailArg Define - HiLink cspRttPragmaSdlTransName Default - HiLink cspRttPragmaSdlTransTailArg Define - HiLink cspReservedIdentifier Error - " (Currently unused vim method: Debug) - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +" (For vim version <=5.7, the command groups are defined in +" $VIMRUNTIME/syntax/synload.vim ) +HiLink cspComment Comment +HiLink cspNumber Number +HiLink cspConditional Conditional +HiLink cspOperator Delimiter +HiLink cspKeyword Keyword +HiLink cspReserved SpecialChar +HiLink cspInclude Error +HiLink cspIncludeKeyword Include +HiLink cspIncludeArg Include +HiLink cspAssert PreCondit +HiLink cspType Type +HiLink cspProcess Function +HiLink cspTodo Todo +HiLink cspOldRttComment Define +HiLink cspRttPragmaKeyword Define +HiLink cspSdlRttComment Define +HiLink cspRttPragmaArg Define +HiLink cspRttPragmaSdlArg Define +HiLink cspRttPragmaSdlName Default +HiLink cspRttPragmaSdlTailArg Define +HiLink cspRttPragmaSdlTransName Default +HiLink cspRttPragmaSdlTransTailArg Define +HiLink cspReservedIdentifier Error +" (Currently unused vim method: Debug) + +delcommand HiLink let b:current_syntax = "csp" diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index 51758ca98..e8c2c8531 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -8,12 +8,9 @@ " URL: https://github.com/JulesWang/css.vim " Last Change: 2015 Apr.17 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif let main_syntax = 'css' @@ -516,139 +513,131 @@ if main_syntax == "css" endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_css_syn_inits") - if version < 508 - let did_css_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cssComment Comment - HiLink cssVendor Comment - HiLink cssHacks Comment - HiLink cssTagName Statement - HiLink cssDeprecated Error - HiLink cssSelectorOp Special - HiLink cssSelectorOp2 Special - HiLink cssAttrComma Special - - HiLink cssAnimationProp cssProp - HiLink cssBackgroundProp cssProp - HiLink cssBorderProp cssProp - HiLink cssBoxProp cssProp - HiLink cssColorProp cssProp - HiLink cssContentForPagedMediaProp cssProp - HiLink cssDimensionProp cssProp - HiLink cssFlexibleBoxProp cssProp - HiLink cssFontProp cssProp - HiLink cssGeneratedContentProp cssProp - HiLink cssGridProp cssProp - HiLink cssHyerlinkProp cssProp - HiLink cssLineboxProp cssProp - HiLink cssListProp cssProp - HiLink cssMarqueeProp cssProp - HiLink cssMultiColumnProp cssProp - HiLink cssPagedMediaProp cssProp - HiLink cssPositioningProp cssProp - HiLink cssPrintProp cssProp - HiLink cssRubyProp cssProp - HiLink cssSpeechProp cssProp - HiLink cssTableProp cssProp - HiLink cssTextProp cssProp - HiLink cssTransformProp cssProp - HiLink cssTransitionProp cssProp - HiLink cssUIProp cssProp - HiLink cssIEUIProp cssProp - HiLink cssAuralProp cssProp - HiLink cssRenderProp cssProp - HiLink cssMobileTextProp cssProp - - HiLink cssAnimationAttr cssAttr - HiLink cssBackgroundAttr cssAttr - HiLink cssBorderAttr cssAttr - HiLink cssBoxAttr cssAttr - HiLink cssContentForPagedMediaAttr cssAttr - HiLink cssDimensionAttr cssAttr - HiLink cssFlexibleBoxAttr cssAttr - HiLink cssFontAttr cssAttr - HiLink cssGeneratedContentAttr cssAttr - HiLink cssGridAttr cssAttr - HiLink cssHyerlinkAttr cssAttr - HiLink cssLineboxAttr cssAttr - HiLink cssListAttr cssAttr - HiLink cssMarginAttr cssAttr - HiLink cssMarqueeAttr cssAttr - HiLink cssMultiColumnAttr cssAttr - HiLink cssPaddingAttr cssAttr - HiLink cssPagedMediaAttr cssAttr - HiLink cssPositioningAttr cssAttr - HiLink cssGradientAttr cssAttr - HiLink cssPrintAttr cssAttr - HiLink cssRubyAttr cssAttr - HiLink cssSpeechAttr cssAttr - HiLink cssTableAttr cssAttr - HiLink cssTextAttr cssAttr - HiLink cssTransformAttr cssAttr - HiLink cssTransitionAttr cssAttr - HiLink cssUIAttr cssAttr - HiLink cssIEUIAttr cssAttr - HiLink cssAuralAttr cssAttr - HiLink cssRenderAttr cssAttr - HiLink cssCommonAttr cssAttr - - HiLink cssPseudoClassId PreProc - HiLink cssPseudoClassLang Constant - HiLink cssValueLength Number - HiLink cssValueInteger Number - HiLink cssValueNumber Number - HiLink cssValueAngle Number - HiLink cssValueTime Number - HiLink cssValueFrequency Number - HiLink cssFunction Constant - HiLink cssURL String - HiLink cssFunctionName Function - HiLink cssFunctionComma Function - HiLink cssColor Constant - HiLink cssIdentifier Function - HiLink cssInclude Include - HiLink cssIncludeKeyword atKeyword - HiLink cssImportant Special - HiLink cssBraces Function - HiLink cssBraceError Error - HiLink cssError Error - HiLink cssUnicodeEscape Special - HiLink cssStringQQ String - HiLink cssStringQ String - HiLink cssAttributeSelector String - HiLink cssMedia atKeyword - HiLink cssMediaType Special - HiLink cssMediaComma Normal - HiLink cssMediaKeyword Statement - HiLink cssMediaProp cssProp - HiLink cssMediaAttr cssAttr - HiLink cssPage atKeyword - HiLink cssPagePseudo PreProc - HiLink cssPageMargin atKeyword - HiLink cssPageProp cssProp - HiLink cssKeyFrame atKeyword - HiLink cssKeyFrameSelector Constant - HiLink cssFontDescriptor Special - HiLink cssFontDescriptorFunction Constant - HiLink cssFontDescriptorProp cssProp - HiLink cssFontDescriptorAttr cssAttr - HiLink cssUnicodeRange Constant - HiLink cssClassName Function - HiLink cssClassNameDot Function - HiLink cssProp StorageClass - HiLink cssAttr Constant - HiLink cssUnitDecorators Number - HiLink cssNoise Noise - HiLink atKeyword PreProc - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink cssComment Comment +HiLink cssVendor Comment +HiLink cssHacks Comment +HiLink cssTagName Statement +HiLink cssDeprecated Error +HiLink cssSelectorOp Special +HiLink cssSelectorOp2 Special +HiLink cssAttrComma Special + +HiLink cssAnimationProp cssProp +HiLink cssBackgroundProp cssProp +HiLink cssBorderProp cssProp +HiLink cssBoxProp cssProp +HiLink cssColorProp cssProp +HiLink cssContentForPagedMediaProp cssProp +HiLink cssDimensionProp cssProp +HiLink cssFlexibleBoxProp cssProp +HiLink cssFontProp cssProp +HiLink cssGeneratedContentProp cssProp +HiLink cssGridProp cssProp +HiLink cssHyerlinkProp cssProp +HiLink cssLineboxProp cssProp +HiLink cssListProp cssProp +HiLink cssMarqueeProp cssProp +HiLink cssMultiColumnProp cssProp +HiLink cssPagedMediaProp cssProp +HiLink cssPositioningProp cssProp +HiLink cssPrintProp cssProp +HiLink cssRubyProp cssProp +HiLink cssSpeechProp cssProp +HiLink cssTableProp cssProp +HiLink cssTextProp cssProp +HiLink cssTransformProp cssProp +HiLink cssTransitionProp cssProp +HiLink cssUIProp cssProp +HiLink cssIEUIProp cssProp +HiLink cssAuralProp cssProp +HiLink cssRenderProp cssProp +HiLink cssMobileTextProp cssProp + +HiLink cssAnimationAttr cssAttr +HiLink cssBackgroundAttr cssAttr +HiLink cssBorderAttr cssAttr +HiLink cssBoxAttr cssAttr +HiLink cssContentForPagedMediaAttr cssAttr +HiLink cssDimensionAttr cssAttr +HiLink cssFlexibleBoxAttr cssAttr +HiLink cssFontAttr cssAttr +HiLink cssGeneratedContentAttr cssAttr +HiLink cssGridAttr cssAttr +HiLink cssHyerlinkAttr cssAttr +HiLink cssLineboxAttr cssAttr +HiLink cssListAttr cssAttr +HiLink cssMarginAttr cssAttr +HiLink cssMarqueeAttr cssAttr +HiLink cssMultiColumnAttr cssAttr +HiLink cssPaddingAttr cssAttr +HiLink cssPagedMediaAttr cssAttr +HiLink cssPositioningAttr cssAttr +HiLink cssGradientAttr cssAttr +HiLink cssPrintAttr cssAttr +HiLink cssRubyAttr cssAttr +HiLink cssSpeechAttr cssAttr +HiLink cssTableAttr cssAttr +HiLink cssTextAttr cssAttr +HiLink cssTransformAttr cssAttr +HiLink cssTransitionAttr cssAttr +HiLink cssUIAttr cssAttr +HiLink cssIEUIAttr cssAttr +HiLink cssAuralAttr cssAttr +HiLink cssRenderAttr cssAttr +HiLink cssCommonAttr cssAttr + +HiLink cssPseudoClassId PreProc +HiLink cssPseudoClassLang Constant +HiLink cssValueLength Number +HiLink cssValueInteger Number +HiLink cssValueNumber Number +HiLink cssValueAngle Number +HiLink cssValueTime Number +HiLink cssValueFrequency Number +HiLink cssFunction Constant +HiLink cssURL String +HiLink cssFunctionName Function +HiLink cssFunctionComma Function +HiLink cssColor Constant +HiLink cssIdentifier Function +HiLink cssInclude Include +HiLink cssIncludeKeyword atKeyword +HiLink cssImportant Special +HiLink cssBraces Function +HiLink cssBraceError Error +HiLink cssError Error +HiLink cssUnicodeEscape Special +HiLink cssStringQQ String +HiLink cssStringQ String +HiLink cssAttributeSelector String +HiLink cssMedia atKeyword +HiLink cssMediaType Special +HiLink cssMediaComma Normal +HiLink cssMediaKeyword Statement +HiLink cssMediaProp cssProp +HiLink cssMediaAttr cssAttr +HiLink cssPage atKeyword +HiLink cssPagePseudo PreProc +HiLink cssPageMargin atKeyword +HiLink cssPageProp cssProp +HiLink cssKeyFrame atKeyword +HiLink cssKeyFrameSelector Constant +HiLink cssFontDescriptor Special +HiLink cssFontDescriptorFunction Constant +HiLink cssFontDescriptorProp cssProp +HiLink cssFontDescriptorAttr cssAttr +HiLink cssUnicodeRange Constant +HiLink cssClassName Function +HiLink cssClassNameDot Function +HiLink cssProp StorageClass +HiLink cssAttr Constant +HiLink cssUnitDecorators Number +HiLink cssNoise Noise +HiLink atKeyword PreProc +delcommand HiLink let b:current_syntax = "css" diff --git a/runtime/syntax/cterm.vim b/runtime/syntax/cterm.vim index 139a0d5e1..8510f62cc 100644 --- a/runtime/syntax/cterm.vim +++ b/runtime/syntax/cterm.vim @@ -4,11 +4,8 @@ " Last Change: 2002 Apr 13 " Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -142,48 +139,40 @@ syn match ctermCharacter "'[^\\]'" syn match ctermSpecialCharacter "'\\.'" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cterm_syntax_inits") - if version < 508 - let did_cterm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ctermStatement Statement - HiLink ctermFunction Statement - HiLink ctermStrFunction Statement - HiLink ctermIntFunction Statement - HiLink ctermLabel Statement - HiLink ctermConditional Statement - HiLink ctermRepeat Statement - HiLink ctermLibFunc UserDefFunc - HiLink ctermType Type - HiLink ctermFuncArg PreCondit - - HiLink ctermPreVarRO PreCondit - HiLink ctermPreVarRW PreConditBold - HiLink ctermVar Type - - HiLink ctermComment Comment - - HiLink ctermCharacter SpecialChar - HiLink ctermSpecial Special - HiLink ctermSpecialCharacter SpecialChar - HiLink ctermSymbols Special - HiLink ctermString String - HiLink ctermTodo Todo - HiLink ctermOperator Statement - HiLink ctermNumber Number - - " redefine the colors - "hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold - "hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink ctermStatement Statement +HiLink ctermFunction Statement +HiLink ctermStrFunction Statement +HiLink ctermIntFunction Statement +HiLink ctermLabel Statement +HiLink ctermConditional Statement +HiLink ctermRepeat Statement +HiLink ctermLibFunc UserDefFunc +HiLink ctermType Type +HiLink ctermFuncArg PreCondit + +HiLink ctermPreVarRO PreCondit +HiLink ctermPreVarRW PreConditBold +HiLink ctermVar Type + +HiLink ctermComment Comment + +HiLink ctermCharacter SpecialChar +HiLink ctermSpecial Special +HiLink ctermSpecialCharacter SpecialChar +HiLink ctermSymbols Special +HiLink ctermString String +HiLink ctermTodo Todo +HiLink ctermOperator Statement +HiLink ctermNumber Number + +" redefine the colors +"hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold +"hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline + +delcommand HiLink let b:current_syntax = "cterm" diff --git a/runtime/syntax/cuda.vim b/runtime/syntax/cuda.vim index 77930e3fd..cfc70b9ea 100644 --- a/runtime/syntax/cuda.vim +++ b/runtime/syntax/cuda.vim @@ -3,20 +3,13 @@ " Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net> " Last Change: 2007 Oct 13 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - source <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim " CUDA extentions syn keyword cudaStorageClass __device__ __global__ __host__ diff --git a/runtime/syntax/cupl.vim b/runtime/syntax/cupl.vim index 545d873af..58540b63d 100644 --- a/runtime/syntax/cupl.vim +++ b/runtime/syntax/cupl.vim @@ -3,11 +3,8 @@ " Maintainer: John Cook <johncook3@gmail.com> " Last Change: 2011 Dec 27 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -95,39 +92,31 @@ syn region cuplComment start=+/\*+ end=+\*/+ contains=cuplNumber,cuplTodo syn sync minlines=1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cupl_syn_inits") - if version < 508 - let did_cupl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink cuplHeader cuplStatement - HiLink cuplLogicalOperator cuplOperator - HiLink cuplRangeOperator cuplOperator - HiLink cuplArithmeticOperator cuplOperator - HiLink cuplAssignmentOperator cuplOperator - HiLink cuplEqualityOperator cuplOperator - HiLink cuplTruthTableOperator cuplOperator - HiLink cuplOperator cuplStatement - HiLink cuplFunction cuplStatement - HiLink cuplStatement Statement - HiLink cuplNumberRange cuplNumber - HiLink cuplNumber cuplString - HiLink cuplString String - HiLink cuplComment Comment - HiLink cuplExtension cuplSpecial - HiLink cuplSpecialChar cuplSpecial - HiLink cuplSpecial Special - HiLink cuplDirective PreProc - HiLink cuplTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default highlighting. +HiLink cuplHeader cuplStatement +HiLink cuplLogicalOperator cuplOperator +HiLink cuplRangeOperator cuplOperator +HiLink cuplArithmeticOperator cuplOperator +HiLink cuplAssignmentOperator cuplOperator +HiLink cuplEqualityOperator cuplOperator +HiLink cuplTruthTableOperator cuplOperator +HiLink cuplOperator cuplStatement +HiLink cuplFunction cuplStatement +HiLink cuplStatement Statement +HiLink cuplNumberRange cuplNumber +HiLink cuplNumber cuplString +HiLink cuplString String +HiLink cuplComment Comment +HiLink cuplExtension cuplSpecial +HiLink cuplSpecialChar cuplSpecial +HiLink cuplSpecial Special +HiLink cuplDirective PreProc +HiLink cuplTodo Todo + +delcommand HiLink let b:current_syntax = "cupl" diff --git a/runtime/syntax/cuplsim.vim b/runtime/syntax/cuplsim.vim index 18a30ce25..d0c9ec34f 100644 --- a/runtime/syntax/cuplsim.vim +++ b/runtime/syntax/cuplsim.vim @@ -3,21 +3,14 @@ " Maintainer: John Cook <john.cook@kla-tencor.com> " Last Change: 2001 Apr 25 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the CUPL syntax to start with -if version < 600 - source <sfile>:p:h/cupl.vim -else - runtime! syntax/cupl.vim - unlet b:current_syntax -endif +runtime! syntax/cupl.vim +unlet b:current_syntax " omit definition-specific stuff syn clear cuplStatement @@ -53,28 +46,20 @@ syn match cuplsimOutput +"\x\+"+ syn sync minlines=1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cuplsim_syn_inits") - if version < 508 - let did_cuplsim_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " append to the highlighting links in cupl.vim - " The default highlighting. - HiLink cuplsimOrder cuplStatement - HiLink cuplsimBase cuplStatement - HiLink cuplsimBaseType cuplStatement - HiLink cuplsimVectors cuplStatement - HiLink cuplsimStimulus cuplNumber - HiLink cuplsimOutput cuplNumber - HiLink cuplsimOrderFormat cuplNumber +" append to the highlighting links in cupl.vim +" The default highlighting. +HiLink cuplsimOrder cuplStatement +HiLink cuplsimBase cuplStatement +HiLink cuplsimBaseType cuplStatement +HiLink cuplsimVectors cuplStatement +HiLink cuplsimStimulus cuplNumber +HiLink cuplsimOutput cuplNumber +HiLink cuplsimOrderFormat cuplNumber - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "cuplsim" " vim:ts=8 diff --git a/runtime/syntax/cvs.vim b/runtime/syntax/cvs.vim index 94b2a809e..4a01c2b8a 100644 --- a/runtime/syntax/cvs.vim +++ b/runtime/syntax/cvs.vim @@ -4,11 +4,8 @@ " URL: http://www.zotikos.com/downloads/cvs.vim " Last Change: Sat Nov 24 23:25:11 CET 2001 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -20,24 +17,16 @@ syn region cvsCom start="Committing in" end="$" contains=cvsDir contained extend syn match cvsDir contained "\S\+$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cvs_syn_inits") - if version < 508 - let did_cvs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink cvsLine Comment - HiLink cvsDir cvsFile - HiLink cvsFile Constant - HiLink cvsFiles cvsCom - HiLink cvsTag cvsCom - HiLink cvsCom Statement +HiLink cvsLine Comment +HiLink cvsDir cvsFile +HiLink cvsFile Constant +HiLink cvsFiles cvsCom +HiLink cvsTag cvsCom +HiLink cvsCom Statement - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "cvs" diff --git a/runtime/syntax/cweb.vim b/runtime/syntax/cweb.vim index 39b593d2b..1d6e0fdec 100644 --- a/runtime/syntax/cweb.vim +++ b/runtime/syntax/cweb.vim @@ -13,11 +13,8 @@ " TODO: names, and leaves C/C++ comments as such. (On the other hand, " TODO: switching to TeX mode in C/C++ comments might be colour overkill.) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -25,12 +22,8 @@ endif " level in the CWEB syntax, e.g., in the preamble. In general, a CWEB source " code can be seen as a normal TeX document with some C/C++ material " interspersed in certain defined regions. -if version < 600 - source <sfile>:p:h/tex.vim -else - runtime! syntax/tex.vim - unlet b:current_syntax -endif +runtime! syntax/tex.vim +unlet b:current_syntax " Read the C/C++ syntax too; C/C++ syntax items are treated as such in the " C/C++ section of a CWEB chunk or in inner C/C++ context in "|...|" groups. @@ -63,20 +56,12 @@ syntax region webRestrictedTeX start="@[\^\.:t=q]" end="@>" oneline syntax match webIgnoredStuff "@@" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cweb_syntax_inits") - if version < 508 - let did_cweb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink webRestrictedTeX String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink webRestrictedTeX String + +delcommand HiLink let b:current_syntax = "cweb" diff --git a/runtime/syntax/cynlib.vim b/runtime/syntax/cynlib.vim index a9985074d..5338c613d 100644 --- a/runtime/syntax/cynlib.vim +++ b/runtime/syntax/cynlib.vim @@ -15,22 +15,15 @@ " Remove any old syntax stuff hanging around -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C++ syntax to start with - this includes the C syntax -if version < 600 - source <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim -endif +runtime! syntax/cpp.vim unlet b:current_syntax " Cynlib extensions @@ -69,23 +62,15 @@ syn match cynlibOperator "<<=" syn keyword cynlibType In Out InST OutST Int Uint Const Cynclock " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cynlib_syntax_inits") - if version < 508 - let did_cynlib_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink cynlibOperator Operator - HiLink cynlibMacro Statement - HiLink cynlibFunction Statement - HiLink cynlibppMacro Statement - HiLink cynlibType Type +HiLink cynlibOperator Operator +HiLink cynlibMacro Statement +HiLink cynlibFunction Statement +HiLink cynlibppMacro Statement +HiLink cynlibType Type - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "cynlib" diff --git a/runtime/syntax/cynpp.vim b/runtime/syntax/cynpp.vim index b984bace3..ee54eb6a4 100644 --- a/runtime/syntax/cynpp.vim +++ b/runtime/syntax/cynpp.vim @@ -19,21 +19,13 @@ -" Remove any old syntax stuff hanging around -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the Cynlib syntax to start with - this includes the C++ syntax -if version < 600 - source <sfile>:p:h/cynlib.vim -else - runtime! syntax/cynlib.vim -endif +runtime! syntax/cynlib.vim unlet b:current_syntax @@ -49,20 +41,12 @@ syn keyword cynppMacro Thread EndThread syn keyword cynppMacro Instantiate " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cynpp_syntax_inits") - if version < 508 - let did_cynpp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink cLabel Label - HiLink cynppMacro Statement +HiLink cLabel Label +HiLink cynppMacro Statement - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "cynpp" diff --git a/runtime/syntax/datascript.vim b/runtime/syntax/datascript.vim index a983b8e34..7b686a144 100644 --- a/runtime/syntax/datascript.vim +++ b/runtime/syntax/datascript.vim @@ -8,9 +8,8 @@ " " http://dstools.sourceforge.net/DataScriptLanguageOverview.html -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo diff --git a/runtime/syntax/dcd.vim b/runtime/syntax/dcd.vim index a566745fb..bde1d3d95 100644 --- a/runtime/syntax/dcd.vim +++ b/runtime/syntax/dcd.vim @@ -3,11 +3,8 @@ " Maintainer: Christopher Shinn <christopher@lucent.com> " Last Change: 2003 Apr 25 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -40,25 +37,17 @@ syn keyword dcdSpecial PRV1 PRV2 PRV3 PRV4 PRV5 PRV6 PRV7 PRV8 syn region dcdComment start="\*" end="\;" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dcd_syntax_inits") - if version < 508 - let did_dcd_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink dcdFunction Identifier - HiLink dcdLabel Constant - HiLink dcdConditional Conditional - HiLink dcdDisplay Type - HiLink dcdStatement Statement - HiLink dcdSpecial Special - HiLink dcdComment Comment +HiLink dcdFunction Identifier +HiLink dcdLabel Constant +HiLink dcdConditional Conditional +HiLink dcdDisplay Type +HiLink dcdStatement Statement +HiLink dcdSpecial Special +HiLink dcdComment Comment - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "dcd" diff --git a/runtime/syntax/dcl.vim b/runtime/syntax/dcl.vim index 8a53c256d..b3a3a028d 100644 --- a/runtime/syntax/dcl.vim +++ b/runtime/syntax/dcl.vim @@ -5,11 +5,8 @@ " Version: 9 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -114,50 +111,42 @@ syn region dclFuncList matchgroup=Delimiter start="(" matchgroup=Delimiter end= syn match dclError ")" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dcl_syntax_inits") - if version < 508 - let did_dcl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dclLogOper dclError - HiLink dclLogical dclOper - HiLink dclLogSep dclSep - - HiLink dclAssign Operator - HiLink dclCmdProc Special - HiLink dclCmdProcStart Operator - HiLink dclComment Comment - HiLink dclContinue Statement - HiLink dclDevice Identifier - HiLink dclDirPath Identifier - HiLink dclDirPath Identifier - HiLink dclDirSep Delimiter - HiLink dclError Error - HiLink dclExe Statement - HiLink dclFilename NONE - HiLink dclGotoLabel Label - HiLink dclInstr Statement - HiLink dclLexical Function - HiLink dclMdfy Type - HiLink dclMdfyBrkt Delimiter - HiLink dclMdfySep Delimiter - HiLink dclMdfySet Type - HiLink dclMdfySetString String - HiLink dclNumber Number - HiLink dclOper Operator - HiLink dclParam Special - HiLink dclSep Delimiter - HiLink dclStart Delimiter - HiLink dclString String - HiLink dclTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dclLogOper dclError +HiLink dclLogical dclOper +HiLink dclLogSep dclSep + +HiLink dclAssign Operator +HiLink dclCmdProc Special +HiLink dclCmdProcStart Operator +HiLink dclComment Comment +HiLink dclContinue Statement +HiLink dclDevice Identifier +HiLink dclDirPath Identifier +HiLink dclDirPath Identifier +HiLink dclDirSep Delimiter +HiLink dclError Error +HiLink dclExe Statement +HiLink dclFilename NONE +HiLink dclGotoLabel Label +HiLink dclInstr Statement +HiLink dclLexical Function +HiLink dclMdfy Type +HiLink dclMdfyBrkt Delimiter +HiLink dclMdfySep Delimiter +HiLink dclMdfySet Type +HiLink dclMdfySetString String +HiLink dclNumber Number +HiLink dclOper Operator +HiLink dclParam Special +HiLink dclSep Delimiter +HiLink dclStart Delimiter +HiLink dclString String +HiLink dclTodo Todo + +delcommand HiLink let b:current_syntax = "dcl" diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index d0c658c75..3668ea531 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -7,9 +7,7 @@ " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -36,28 +34,21 @@ syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline " Associate our matches and regions with pretty colours -if version >= 508 || !exists("did_debchangelog_syn_inits") - if version < 508 - let did_debchangelog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink debchangelogHeader Error - HiLink debchangelogFooter Identifier - HiLink debchangelogEntry Normal - HiLink debchangelogCloses Statement - HiLink debchangelogLP Statement - HiLink debchangelogFirstKV Identifier - HiLink debchangelogOtherKV Identifier - HiLink debchangelogName Comment - HiLink debchangelogVersion Identifier - HiLink debchangelogTarget Identifier - HiLink debchangelogEmail Special - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink debchangelogHeader Error +HiLink debchangelogFooter Identifier +HiLink debchangelogEntry Normal +HiLink debchangelogCloses Statement +HiLink debchangelogLP Statement +HiLink debchangelogFirstKV Identifier +HiLink debchangelogOtherKV Identifier +HiLink debchangelogName Comment +HiLink debchangelogVersion Identifier +HiLink debchangelogTarget Identifier +HiLink debchangelogEmail Special + +delcommand HiLink let b:current_syntax = "debchangelog" diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index 4fb53a55c..4d354c4bd 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -7,9 +7,7 @@ " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -86,37 +84,30 @@ syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Inde syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell " Associate our matches and regions with pretty colours -if version >= 508 || !exists("did_debcontrol_syn_inits") - if version < 508 - let did_debcontrol_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink debcontrolKey Keyword - HiLink debcontrolField Normal - HiLink debcontrolStrictField Error - HiLink debcontrolDeprecatedKey Error - HiLink debcontrolMultiField Normal - HiLink debcontrolArchitecture Normal - HiLink debcontrolMultiArch Normal - HiLink debcontrolName Normal - HiLink debcontrolPriority Normal - HiLink debcontrolSection Normal - HiLink debcontrolPackageType Normal - HiLink debcontrolVariable Identifier - HiLink debcontrolEmail Identifier - HiLink debcontrolVcsSvn Identifier - HiLink debcontrolVcsCvs Identifier - HiLink debcontrolVcsGit Identifier - HiLink debcontrolHTTPUrl Identifier - HiLink debcontrolDmUpload Identifier - HiLink debcontrolComment Comment - HiLink debcontrolElse Special - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink debcontrolKey Keyword +HiLink debcontrolField Normal +HiLink debcontrolStrictField Error +HiLink debcontrolDeprecatedKey Error +HiLink debcontrolMultiField Normal +HiLink debcontrolArchitecture Normal +HiLink debcontrolMultiArch Normal +HiLink debcontrolName Normal +HiLink debcontrolPriority Normal +HiLink debcontrolSection Normal +HiLink debcontrolPackageType Normal +HiLink debcontrolVariable Identifier +HiLink debcontrolEmail Identifier +HiLink debcontrolVcsSvn Identifier +HiLink debcontrolVcsCvs Identifier +HiLink debcontrolVcsGit Identifier +HiLink debcontrolHTTPUrl Identifier +HiLink debcontrolDmUpload Identifier +HiLink debcontrolComment Comment +HiLink debcontrolElse Special + +delcommand HiLink let b:current_syntax = "debcontrol" diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index d35e24729..5383602ef 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -6,9 +6,7 @@ " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/def.vim b/runtime/syntax/def.vim index 5efb41bc4..cfae2112e 100644 --- a/runtime/syntax/def.vim +++ b/runtime/syntax/def.vim @@ -5,11 +5,8 @@ " Last Change: $Date: 2007/10/02 13:51:24 $ " $Revision: 1.2 $ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -32,25 +29,17 @@ syn match defNumber "0x\x\+" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_def_syntax_inits") - if version < 508 - let did_def_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink defComment Comment - HiLink defKeyword Keyword - HiLink defStorage StorageClass - HiLink defString String - HiLink defNumber Number - HiLink defOrdinal Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink defComment Comment +HiLink defKeyword Keyword +HiLink defStorage StorageClass +HiLink defString String +HiLink defNumber Number +HiLink defOrdinal Operator + +delcommand HiLink let b:current_syntax = "def" diff --git a/runtime/syntax/desc.vim b/runtime/syntax/desc.vim index ca47176ff..fa0189a3d 100644 --- a/runtime/syntax/desc.vim +++ b/runtime/syntax/desc.vim @@ -3,11 +3,8 @@ " Maintainer: René Rebe <rene@exactcode.de>, Piotr Esden-Tempski <esden@rocklinux.org> " Last Change: 2006 Aug 14 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -63,40 +60,31 @@ syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descF syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense -" For version 5.7 and earlier: only when not done already -" Define the default highlighting. -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_desc_syntax_inits") - if version < 508 - let did_desc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink descFlag Identifier - HiLink descLicense Identifier - HiLink descCategory Identifier - - HiLink descTag Type - HiLink descUrl Underlined - HiLink descEmail Underlined - - " priority tag colors - HiLink descInstallX Boolean - HiLink descInstallO Type - HiLink descDash Operator - HiLink descDigit Number - HiLink descCompilePriority Number - - " download tag colors - HiLink descSum Number - HiLink descTarball Underlined - - " tag region colors - HiLink descText Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink descFlag Identifier +HiLink descLicense Identifier +HiLink descCategory Identifier + +HiLink descTag Type +HiLink descUrl Underlined +HiLink descEmail Underlined + +" priority tag colors +HiLink descInstallX Boolean +HiLink descInstallO Type +HiLink descDash Operator +HiLink descDigit Number +HiLink descCompilePriority Number + +" download tag colors +HiLink descSum Number +HiLink descTarball Underlined + +" tag region colors +HiLink descText Comment + +delcommand HiLink let b:current_syntax = "desc" diff --git a/runtime/syntax/desktop.vim b/runtime/syntax/desktop.vim index 27dac5c8e..efab6d5f6 100644 --- a/runtime/syntax/desktop.vim +++ b/runtime/syntax/desktop.vim @@ -7,11 +7,8 @@ " (added "Keywords") " Version Info: desktop.vim 0.9.4-1.2 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -79,41 +76,33 @@ syn match dtALocale /\[.\{-}\]\s*=\@=/ containedin=ALL " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_desktop_syntax_inits") - if version < 508 - let did_dosini_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dtGroup Special - HiLink dtComment Comment - HiLink dtDelim String - - HiLink dtLocaleKey Type - HiLink dtLocaleName Identifier - HiLink dtXLocale Identifier - HiLink dtALocale Identifier - - HiLink dtNumericKey Type - - HiLink dtBooleanKey Type - HiLink dtBooleanValue Constant - - HiLink dtStringKey Type - - HiLink dtExecKey Type - HiLink dtExecParam Special - HiLink dtTypeKey Type - HiLink dtTypeValue Constant - HiLink dtNotStLabel Type - HiLink dtXAddKey Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dtGroup Special +HiLink dtComment Comment +HiLink dtDelim String + +HiLink dtLocaleKey Type +HiLink dtLocaleName Identifier +HiLink dtXLocale Identifier +HiLink dtALocale Identifier + +HiLink dtNumericKey Type + +HiLink dtBooleanKey Type +HiLink dtBooleanValue Constant + +HiLink dtStringKey Type + +HiLink dtExecKey Type +HiLink dtExecParam Special +HiLink dtTypeKey Type +HiLink dtTypeValue Constant +HiLink dtNotStLabel Type +HiLink dtXAddKey Type + +delcommand HiLink let b:current_syntax = "desktop" diff --git a/runtime/syntax/diva.vim b/runtime/syntax/diva.vim index 78668fd85..02fc46dcb 100644 --- a/runtime/syntax/diva.vim +++ b/runtime/syntax/diva.vim @@ -11,11 +11,7 @@ " Don't remove any old syntax stuff hanging around! We need stuff " from skill.vim. if !exists("did_skill_syntax_inits") - if version < 600 - so <sfile>:p:h/skill.vim - else - runtime! syntax/skill.vim - endif + runtime! syntax/skill.vim endif syn keyword divaDRCKeywords area enc notch ovlp sep width @@ -81,29 +77,21 @@ syn match divaGeomFunctions "(geom\u\a\+\(45\|90\)\=\>"hs=s+1 syn match divaGeomFunctions "\<geom\u\a\+\(45\|90\)\=("he=e-1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_diva_syntax_inits") - if version < 508 - let did_diva_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink divaDRCKeywords Statement - HiLink divaMeasKeywords Statement - HiLink divaCtrlFunctions Conditional - HiLink divaExtFunctions Function - HiLink divaDRCFunctions Function - HiLink divaFunctions Function - HiLink divaLayerFunctions Function - HiLink divaChkFunctions Function - HiLink divaLVSFunctions Function - HiLink divaGeomFunctions Function +HiLink divaDRCKeywords Statement +HiLink divaMeasKeywords Statement +HiLink divaCtrlFunctions Conditional +HiLink divaExtFunctions Function +HiLink divaDRCFunctions Function +HiLink divaFunctions Function +HiLink divaLayerFunctions Function +HiLink divaChkFunctions Function +HiLink divaLVSFunctions Function +HiLink divaGeomFunctions Function - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "diva" diff --git a/runtime/syntax/django.vim b/runtime/syntax/django.vim index da315ac30..a7104d37e 100644 --- a/runtime/syntax/django.vim +++ b/runtime/syntax/django.vim @@ -3,11 +3,8 @@ " Maintainer: Dave Hodder <dmh@dmh.org.uk> " Last Change: 2014 Jul 13 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -68,29 +65,21 @@ syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomm syn region djangoComBlock start="{#" end="#}" contains=djangoTodo " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_django_syn_inits") - if version < 508 - let did_django_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink djangoTagBlock PreProc - HiLink djangoVarBlock PreProc - HiLink djangoStatement Statement - HiLink djangoFilter Identifier - HiLink djangoArgument Constant - HiLink djangoTagError Error - HiLink djangoVarError Error - HiLink djangoError Error - HiLink djangoComment Comment - HiLink djangoComBlock Comment - HiLink djangoTodo Todo +HiLink djangoTagBlock PreProc +HiLink djangoVarBlock PreProc +HiLink djangoStatement Statement +HiLink djangoFilter Identifier +HiLink djangoArgument Constant +HiLink djangoTagError Error +HiLink djangoVarError Error +HiLink djangoError Error +HiLink djangoComment Comment +HiLink djangoComBlock Comment +HiLink djangoTodo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "django" diff --git a/runtime/syntax/dnsmasq.vim b/runtime/syntax/dnsmasq.vim index 9fa32077b..a4cc8b577 100644 --- a/runtime/syntax/dnsmasq.vim +++ b/runtime/syntax/dnsmasq.vim @@ -20,10 +20,8 @@ " endif " -" For version 5.x: Clear all syntax items -if v:version < 600 - syntax clear -elseif exists("b:current_syntax") || &compatible +" quit when a syntax file was already loaded +if exists("b:current_syntax") || &compatible finish endif diff --git a/runtime/syntax/docbk.vim b/runtime/syntax/docbk.vim index fc679eeca..3bc804956 100644 --- a/runtime/syntax/docbk.vim +++ b/runtime/syntax/docbk.vim @@ -13,11 +13,8 @@ " http://www.open-oasis.org/docbook/ " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -174,26 +171,17 @@ syn region docbkRemark start="<comment>"lc=9 end="</comment>"me=e-10 contains=x syn region docbkCite start="<citation>"lc=10 end="</citation>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_docbk_syn_inits") - if version < 508 - let did_docbk_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - hi DocbkBold term=bold cterm=bold gui=bold - else - command -nargs=+ HiLink hi def link <args> - hi def DocbkBold term=bold cterm=bold gui=bold - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +hi def DocbkBold term=bold cterm=bold gui=bold - HiLink docbkKeyword Statement - HiLink docbkRegion DocbkBold - HiLink docbkTitle Title - HiLink docbkRemark Comment - HiLink docbkCite Constant +HiLink docbkKeyword Statement +HiLink docbkRegion DocbkBold +HiLink docbkTitle Title +HiLink docbkRemark Comment +HiLink docbkCite Constant - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "docbk" diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim index d9b1aa670..b7f49ca4e 100644 --- a/runtime/syntax/dosbatch.vim +++ b/runtime/syntax/dosbatch.vim @@ -9,11 +9,8 @@ " dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -111,49 +108,41 @@ syn keyword dosbatchImplicit sort start subst time title tree type ver verify syn keyword dosbatchImplicit vol xcopy " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dosbatch_syntax_inits") - if version < 508 - let did_dosbatch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dosbatchTodo Todo - - HiLink dosbatchStatement Statement - HiLink dosbatchCommands dosbatchStatement - HiLink dosbatchLabel Label - HiLink dosbatchConditional Conditional - HiLink dosbatchRepeat Repeat - - HiLink dosbatchOperator Operator - HiLink dosbatchEchoOperator dosbatchOperator - HiLink dosbatchIfOperator dosbatchOperator - - HiLink dosbatchArgument Identifier - HiLink dosbatchIdentifier Identifier - HiLink dosbatchVariable dosbatchIdentifier - - HiLink dosbatchSpecialChar SpecialChar - HiLink dosbatchString String - HiLink dosbatchNumber Number - HiLink dosbatchInteger dosbatchNumber - HiLink dosbatchHex dosbatchNumber - HiLink dosbatchBinary dosbatchNumber - HiLink dosbatchOctal dosbatchNumber - - HiLink dosbatchComment Comment - HiLink dosbatchImplicit Function - - HiLink dosbatchSwitch Special - - HiLink dosbatchCmd PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dosbatchTodo Todo + +HiLink dosbatchStatement Statement +HiLink dosbatchCommands dosbatchStatement +HiLink dosbatchLabel Label +HiLink dosbatchConditional Conditional +HiLink dosbatchRepeat Repeat + +HiLink dosbatchOperator Operator +HiLink dosbatchEchoOperator dosbatchOperator +HiLink dosbatchIfOperator dosbatchOperator + +HiLink dosbatchArgument Identifier +HiLink dosbatchIdentifier Identifier +HiLink dosbatchVariable dosbatchIdentifier + +HiLink dosbatchSpecialChar SpecialChar +HiLink dosbatchString String +HiLink dosbatchNumber Number +HiLink dosbatchInteger dosbatchNumber +HiLink dosbatchHex dosbatchNumber +HiLink dosbatchBinary dosbatchNumber +HiLink dosbatchOctal dosbatchNumber + +HiLink dosbatchComment Comment +HiLink dosbatchImplicit Function + +HiLink dosbatchSwitch Special + +HiLink dosbatchCmd PreProc + +delcommand HiLink let b:current_syntax = "dosbatch" diff --git a/runtime/syntax/dosini.vim b/runtime/syntax/dosini.vim index e474f2111..2d8086b2d 100644 --- a/runtime/syntax/dosini.vim +++ b/runtime/syntax/dosini.vim @@ -9,11 +9,8 @@ " Last Change: 2011 Nov 8 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -28,23 +25,15 @@ syn region dosiniHeader start="^\s*\[" end="\]" syn match dosiniComment "^[#;].*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dosini_syntax_inits") - if version < 508 - let did_dosini_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dosiniNumber Number - HiLink dosiniHeader Special - HiLink dosiniComment Comment - HiLink dosiniLabel Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dosiniNumber Number +HiLink dosiniHeader Special +HiLink dosiniComment Comment +HiLink dosiniLabel Type + +delcommand HiLink let b:current_syntax = "dosini" diff --git a/runtime/syntax/dot.vim b/runtime/syntax/dot.vim index 4cc6f4f21..e6a5d9a10 100644 --- a/runtime/syntax/dot.vim +++ b/runtime/syntax/dot.vim @@ -6,11 +6,8 @@ " Last Change: 2011 May 17 - improved identifier matching + two new keywords " 2001 May 04 - initial version -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -74,36 +71,28 @@ syn sync minlines=50 syn sync maxlines=500 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dot_syntax_inits") - if version < 508 - let did_dot_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dotParErr Error - HiLink dotBraceErr Error - HiLink dotBrackErr Error - - HiLink dotComment Comment - HiLink dotTodo Todo - - HiLink dotParEncl Keyword - HiLink dotBrackEncl Keyword - HiLink dotBraceEncl Keyword - - HiLink dotKeyword Keyword - HiLink dotType Type - HiLink dotKeyChar Keyword - - HiLink dotString String - HiLink dotIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dotParErr Error +HiLink dotBraceErr Error +HiLink dotBrackErr Error + +HiLink dotComment Comment +HiLink dotTodo Todo + +HiLink dotParEncl Keyword +HiLink dotBrackEncl Keyword +HiLink dotBraceEncl Keyword + +HiLink dotKeyword Keyword +HiLink dotType Type +HiLink dotKeyChar Keyword + +HiLink dotString String +HiLink dotIdentifier Identifier + +delcommand HiLink let b:current_syntax = "dot" diff --git a/runtime/syntax/dracula.vim b/runtime/syntax/dracula.vim index 6a3806028..b60e4846e 100644 --- a/runtime/syntax/dracula.vim +++ b/runtime/syntax/dracula.vim @@ -8,11 +8,8 @@ " the purposes of Design Rule Checking, Layout vs. Schematic " verification, and Layout Parameter Extraction. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -61,24 +58,16 @@ syn match draculaPreProc "^#.*" syn sync lines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dracula_syn_inits") - if version < 508 - let did_dracula_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink draculaIdentifier Identifier - HiLink draculaStatement Statement - HiLink draculaType Type - HiLink draculaComment Comment - HiLink draculaPreProc PreProc +HiLink draculaIdentifier Identifier +HiLink draculaStatement Statement +HiLink draculaType Type +HiLink draculaComment Comment +HiLink draculaPreProc PreProc - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "dracula" diff --git a/runtime/syntax/dtd.vim b/runtime/syntax/dtd.vim index 001dbbddd..e00c70d11 100644 --- a/runtime/syntax/dtd.vim +++ b/runtime/syntax/dtd.vim @@ -126,41 +126,33 @@ syn keyword dtdTodo contained TODO FIXME XXX syn sync lines=250 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dtd_syn_inits") - if version < 508 - let did_dtd_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink dtdFunction Function - HiLink dtdTag Normal - HiLink dtdType Type - HiLink dtdAttrType dtdType - HiLink dtdAttrDef dtdType - HiLink dtdConstant Constant - HiLink dtdString dtdConstant - HiLink dtdEnum dtdConstant - HiLink dtdCard dtdFunction - - HiLink dtdEntity Statement - HiLink dtdEntityPunct dtdType - HiLink dtdParamEntityInst dtdConstant - HiLink dtdParamEntityPunct dtdType - HiLink dtdParamEntityDecl dtdType - HiLink dtdParamEntityDPunct dtdComment - - HiLink dtdComment Comment - HiLink dtdTagName Statement - HiLink dtdError Error - HiLink dtdTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default highlighting. +HiLink dtdFunction Function +HiLink dtdTag Normal +HiLink dtdType Type +HiLink dtdAttrType dtdType +HiLink dtdAttrDef dtdType +HiLink dtdConstant Constant +HiLink dtdString dtdConstant +HiLink dtdEnum dtdConstant +HiLink dtdCard dtdFunction + +HiLink dtdEntity Statement +HiLink dtdEntityPunct dtdType +HiLink dtdParamEntityInst dtdConstant +HiLink dtdParamEntityPunct dtdType +HiLink dtdParamEntityDecl dtdType +HiLink dtdParamEntityDPunct dtdComment + +HiLink dtdComment Comment +HiLink dtdTagName Statement +HiLink dtdError Error +HiLink dtdTodo Todo + +delcommand HiLink let &cpo = s:dtd_cpo_save unlet s:dtd_cpo_save diff --git a/runtime/syntax/dtml.vim b/runtime/syntax/dtml.vim index 7de722aab..0cc2729f7 100644 --- a/runtime/syntax/dtml.vim +++ b/runtime/syntax/dtml.vim @@ -9,20 +9,13 @@ " hacked out of the Zope Quick Reference in case someone finds something " sensible to do with them. I certainly haven't. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " First load the HTML syntax -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim syn case match @@ -196,25 +189,17 @@ syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagNa syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameCluster " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dtml_syntax_inits") - if version < 508 - let did_dtml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dtmlIsTag PreProc - HiLink dtmlAttribute Identifier - HiLink dtmlMethod Function - HiLink dtmlComment Comment - HiLink dtmlTODO Todo - HiLink dtmlSpecialChar Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dtmlIsTag PreProc +HiLink dtmlAttribute Identifier +HiLink dtmlMethod Function +HiLink dtmlComment Comment +HiLink dtmlTODO Todo +HiLink dtmlSpecialChar Special + +delcommand HiLink let b:current_syntax = "dtml" diff --git a/runtime/syntax/dtrace.vim b/runtime/syntax/dtrace.vim index 2f2d6e2cc..392fa1c1c 100644 --- a/runtime/syntax/dtrace.vim +++ b/runtime/syntax/dtrace.vim @@ -10,19 +10,14 @@ " http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace/common/dt_lex.l " http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace/common/dt_grammar.y -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax syn clear cCommentL " dtrace doesn't support // style comments diff --git a/runtime/syntax/dylan.vim b/runtime/syntax/dylan.vim index 14262d53d..95684e501 100644 --- a/runtime/syntax/dylan.vim +++ b/runtime/syntax/dylan.vim @@ -8,21 +8,14 @@ " syntax files. " Part 1: Syntax definition -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif syn case ignore -if version < 600 - set lisp -else - setlocal lisp -endif +setlocal lisp " Highlight special characters (those that have backslashes) differently syn match dylanSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" @@ -67,42 +60,34 @@ syn region dylanPrecondit start="^\s*#\s*\(if\>\|else\>\|endif\>\)" skip="\\$" syn region dylanHeader start="^[Mm]odule:" end="^$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dylan_syntax_inits") - if version < 508 - let did_dylan_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink dylanBlock PreProc - HiLink dylanBoolean Boolean - HiLink dylanCharacter Character - HiLink dylanClass Structure - HiLink dylanClassMods StorageClass - HiLink dylanComment Comment - HiLink dylanConditional Conditional - HiLink dylanConstant Constant - HiLink dylanException Exception - HiLink dylanHeader Macro - HiLink dylanImport Include - HiLink dylanLabel Label - HiLink dylanMiscMods StorageClass - HiLink dylanNumber Number - HiLink dylanOther Keyword - HiLink dylanOperator Operator - HiLink dylanParamDefs Keyword - HiLink dylanPrecondit PreCondit - HiLink dylanRepeat Repeat - HiLink dylanSimpleDefs Keyword - HiLink dylanStatement Macro - HiLink dylanString String - HiLink dylanVariable Identifier +HiLink dylanBlock PreProc +HiLink dylanBoolean Boolean +HiLink dylanCharacter Character +HiLink dylanClass Structure +HiLink dylanClassMods StorageClass +HiLink dylanComment Comment +HiLink dylanConditional Conditional +HiLink dylanConstant Constant +HiLink dylanException Exception +HiLink dylanHeader Macro +HiLink dylanImport Include +HiLink dylanLabel Label +HiLink dylanMiscMods StorageClass +HiLink dylanNumber Number +HiLink dylanOther Keyword +HiLink dylanOperator Operator +HiLink dylanParamDefs Keyword +HiLink dylanPrecondit PreCondit +HiLink dylanRepeat Repeat +HiLink dylanSimpleDefs Keyword +HiLink dylanStatement Macro +HiLink dylanString String +HiLink dylanVariable Identifier - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "dylan" diff --git a/runtime/syntax/dylanintr.vim b/runtime/syntax/dylanintr.vim index 11ef81668..aaf2d740f 100644 --- a/runtime/syntax/dylanintr.vim +++ b/runtime/syntax/dylanintr.vim @@ -4,11 +4,8 @@ " Last Change: Fri Sep 29 13:53:27 PDT 2000 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -26,26 +23,18 @@ syn match dylanintrInclude "^\s*#\s*include\>\s*["<]" contains=intrIncluded "syn keyword intrMods pointer struct " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dylan_intr_syntax_inits") - if version < 508 - let did_dylan_intr_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dylanintrInfo Special - HiLink dylanintrInterface Operator - HiLink dylanintrMods Type - HiLink dylanintrClass StorageClass - HiLink dylanintrType Type - HiLink dylanintrIncluded String - HiLink dylanintrInclude Include - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dylanintrInfo Special +HiLink dylanintrInterface Operator +HiLink dylanintrMods Type +HiLink dylanintrClass StorageClass +HiLink dylanintrType Type +HiLink dylanintrIncluded String +HiLink dylanintrInclude Include + +delcommand HiLink let b:current_syntax = "dylanintr" diff --git a/runtime/syntax/dylanlid.vim b/runtime/syntax/dylanlid.vim index ec7b40114..c7d266400 100644 --- a/runtime/syntax/dylanlid.vim +++ b/runtime/syntax/dylanlid.vim @@ -5,11 +5,8 @@ " Last Change: Fri Sep 29 13:50:20 PDT 2000 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -21,21 +18,13 @@ syn region dylanlidEntry matchgroup=Statement start=":%" end="$" oneline syn sync lines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dylan_lid_syntax_inits") - if version < 508 - let did_dylan_lid_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dylanlidInfo Type - HiLink dylanlidEntry String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink dylanlidInfo Type +HiLink dylanlidEntry String + +delcommand HiLink let b:current_syntax = "dylanlid" diff --git a/runtime/syntax/ecd.vim b/runtime/syntax/ecd.vim index fff7a4b88..728cf2811 100644 --- a/runtime/syntax/ecd.vim +++ b/runtime/syntax/ecd.vim @@ -8,10 +8,8 @@ " This syntax file was derived from apachestyle.vim " by Christian Hammers <ch@westend.com> -" Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -31,26 +29,18 @@ syn match ecdTagN contained +<[/\s]*[-a-zA-Z0-9_]\++ms=s+1 syn match ecdTagError contained "[^>]<"ms=s+1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ecd_syn_inits") - if version < 508 - let did_ecd_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ecdComment Comment - HiLink ecdAttr Type - HiLink ecdAttrN Statement - HiLink ecdAttrV Value - HiLink ecdTag Function - HiLink ecdTagN Statement - HiLink ecdTagError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink ecdComment Comment +HiLink ecdAttr Type +HiLink ecdAttrN Statement +HiLink ecdAttrV Value +HiLink ecdTag Function +HiLink ecdTagN Statement +HiLink ecdTagError Error + +delcommand HiLink let b:current_syntax = "ecd" " vim: ts=8 diff --git a/runtime/syntax/edif.vim b/runtime/syntax/edif.vim index 0c1783494..21c7ec7a0 100644 --- a/runtime/syntax/edif.vim +++ b/runtime/syntax/edif.vim @@ -8,18 +8,12 @@ " IEC 61690-1 (EDIF Version 3 0 0) " IEC 61690-2 (EDIF Version 4 0 0) -" Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version >= 600 - setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& -else - set iskeyword=A-Z,a-z,_,& -endif +setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& syn region edifList matchgroup=Delimiter start="(" end=")" contains=edifList,edifKeyword,edifString,edifNumber @@ -37,28 +31,17 @@ syn match edifKeyword "(\@<=\s*[a-zA-Z&][a-zA-Z_0-9]*\>" contained syn match edifError ")" " synchronization -if version < 600 - syntax sync maxlines=250 -else - syntax sync fromstart -endif +syntax sync fromstart " Define the default highlighting. -if version >= 508 || !exists("did_edif_syntax_inits") - if version < 508 - let did_edif_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink edifInString SpecialChar - HiLink edifKeyword Keyword - HiLink edifNumber Number - HiLink edifInStringError edifError - HiLink edifError Error - HiLink edifString String - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink edifInString SpecialChar +HiLink edifKeyword Keyword +HiLink edifNumber Number +HiLink edifInStringError edifError +HiLink edifError Error +HiLink edifString String +delcommand HiLink let b:current_syntax = "edif" diff --git a/runtime/syntax/eiffel.vim b/runtime/syntax/eiffel.vim index a91f85d03..0ee5ea091 100644 --- a/runtime/syntax/eiffel.vim +++ b/runtime/syntax/eiffel.vim @@ -5,11 +5,8 @@ " Contributions from: Thilo Six " " URL: https://github.com/eiffelhub/vim-eiffel -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -141,68 +138,60 @@ endif syn sync lines=40 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_eiffel_syntax_inits") - if version < 508 - let did_eiffel_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink eiffelKeyword Statement - HiLink eiffelProperty Statement - HiLink eiffelInheritClause Statement - HiLink eiffelStatement Statement - HiLink eiffelDeclaration Statement - HiLink eiffelAssertion Statement - HiLink eiffelDebug Statement - HiLink eiffelException Statement - HiLink eiffelGenericCreate Statement +HiLink eiffelKeyword Statement +HiLink eiffelProperty Statement +HiLink eiffelInheritClause Statement +HiLink eiffelStatement Statement +HiLink eiffelDeclaration Statement +HiLink eiffelAssertion Statement +HiLink eiffelDebug Statement +HiLink eiffelException Statement +HiLink eiffelGenericCreate Statement - HiLink eiffelAgent Statement - HiLink eiffelConvert Statement +HiLink eiffelAgent Statement +HiLink eiffelConvert Statement - HiLink eiffelTopStruct PreProc +HiLink eiffelTopStruct PreProc - HiLink eiffelAll Special - HiLink eiffelAnchored Special - HiLink eiffelBitType Special +HiLink eiffelAll Special +HiLink eiffelAnchored Special +HiLink eiffelBitType Special - HiLink eiffelBool Boolean - HiLink eiffelString String - HiLink eiffelCharacter Character - HiLink eiffelClassName Type - HiLink eiffelNumber Number +HiLink eiffelBool Boolean +HiLink eiffelString String +HiLink eiffelCharacter Character +HiLink eiffelClassName Type +HiLink eiffelNumber Number - HiLink eiffelStringEscape Special +HiLink eiffelStringEscape Special - HiLink eiffelOperator Special - HiLink eiffelArray Special - HiLink eiffelExport Special - HiLink eiffelCreation Special - HiLink eiffelBrackets Special - HiLink eiffelGeneric Special - HiLink eiffelGenericDecl Special - HiLink eiffelConstraint Special - HiLink eiffelCreate Special +HiLink eiffelOperator Special +HiLink eiffelArray Special +HiLink eiffelExport Special +HiLink eiffelCreation Special +HiLink eiffelBrackets Special +HiLink eiffelGeneric Special +HiLink eiffelGenericDecl Special +HiLink eiffelConstraint Special +HiLink eiffelCreate Special - HiLink eiffelPredefined Constant +HiLink eiffelPredefined Constant - HiLink eiffelComment Comment +HiLink eiffelComment Comment - HiLink eiffelError Error - HiLink eiffelBadConstant Error - HiLink eiffelStringError Error - HiLink eiffelParenError Error - HiLink eiffelBracketError Error +HiLink eiffelError Error +HiLink eiffelBadConstant Error +HiLink eiffelStringError Error +HiLink eiffelParenError Error +HiLink eiffelBracketError Error - HiLink eiffelTodo Todo +HiLink eiffelTodo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "eiffel" diff --git a/runtime/syntax/elf.vim b/runtime/syntax/elf.vim index 621e063ff..7835f550f 100644 --- a/runtime/syntax/elf.vim +++ b/runtime/syntax/elf.vim @@ -10,11 +10,8 @@ " This is the Applix Inc., Macro and Builder programming language. " It has nothing in common with the binary format called ELF. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -63,32 +60,24 @@ syn match elfParens "[\[\]()]" syn match elfPunct "[,;]" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_elf_syn_inits") - if version < 508 - let did_elf_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later. - HiLink elfComment Comment - HiLink elfPPCom Include - HiLink elfKeyword Keyword - HiLink elfSpecial Special - HiLink elfEnvironment Special - HiLink elfBraceError Error - HiLink elfConditional Conditional - HiLink elfMacro Function - HiLink elfNumber Number - HiLink elfString String - HiLink elfParens Delimiter - HiLink elfPunct Delimiter - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later. +HiLink elfComment Comment +HiLink elfPPCom Include +HiLink elfKeyword Keyword +HiLink elfSpecial Special +HiLink elfEnvironment Special +HiLink elfBraceError Error +HiLink elfConditional Conditional +HiLink elfMacro Function +HiLink elfNumber Number +HiLink elfString String +HiLink elfParens Delimiter +HiLink elfPunct Delimiter + +delcommand HiLink let b:current_syntax = "elf" diff --git a/runtime/syntax/elmfilt.vim b/runtime/syntax/elmfilt.vim index e7d5df22a..585894664 100644 --- a/runtime/syntax/elmfilt.vim +++ b/runtime/syntax/elmfilt.vim @@ -5,11 +5,8 @@ " Version: 6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_ELMFILT -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -38,33 +35,25 @@ syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" con syn match elmfiltSpaceError contained "\s.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_elmfilt_syntax_inits") - if version < 508 - let did_elmfilt_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink elmfiltAction Statement - HiLink elmfiltArg Special - HiLink elmfiltComment Comment - HiLink elmfiltCond Statement - HiLink elmfiltIf Statement - HiLink elmfiltMatch Special - HiLink elmfiltMatchError Error - HiLink elmfiltNumber Number - HiLink elmfiltOper Operator - HiLink elmfiltOperKey Type - HiLink elmfiltParenError Error - HiLink elmfiltSpaceError Error - HiLink elmfiltString String - HiLink elmfiltThenError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink elmfiltAction Statement +HiLink elmfiltArg Special +HiLink elmfiltComment Comment +HiLink elmfiltCond Statement +HiLink elmfiltIf Statement +HiLink elmfiltMatch Special +HiLink elmfiltMatchError Error +HiLink elmfiltNumber Number +HiLink elmfiltOper Operator +HiLink elmfiltOperKey Type +HiLink elmfiltParenError Error +HiLink elmfiltSpaceError Error +HiLink elmfiltString String +HiLink elmfiltThenError Error + +delcommand HiLink let b:current_syntax = "elmfilt" " vim: ts=9 diff --git a/runtime/syntax/erlang.vim b/runtime/syntax/erlang.vim index 02597e75f..a49f24ed1 100644 --- a/runtime/syntax/erlang.vim +++ b/runtime/syntax/erlang.vim @@ -28,11 +28,8 @@ " " syn keyword erlangAttribute myattr1 myattr2 contained -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -42,9 +39,7 @@ set cpo&vim " Case sensitive syn case match -if version >= 600 - setlocal iskeyword+=$,@-@ -endif +setlocal iskeyword+=$,@-@ " Comments syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo @@ -147,116 +142,108 @@ let b:erlang_syntax_synced = 1 let s:old_style = (exists("g:erlang_old_style_highlight") && \g:erlang_old_style_highlight == 1) -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_erlang_inits") - if version < 508 - let did_erlang_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Comments - HiLink erlangComment Comment - HiLink erlangCommentAnnotation Special - HiLink erlangTodo Todo - HiLink erlangShebang Comment - - " Numbers - HiLink erlangNumberInteger Number - HiLink erlangNumberFloat Float - - " Strings, atoms, characters - HiLink erlangString String - - if s:old_style - HiLink erlangQuotedAtom Type - else - HiLink erlangQuotedAtom String - endif - - HiLink erlangStringModifier Special - HiLink erlangQuotedAtomModifier Special - HiLink erlangModifier Special - - " Operators, separators - HiLink erlangOperator Operator - HiLink erlangRightArrow Operator - if s:old_style - HiLink erlangBracket Normal - HiLink erlangPipe Normal - else - HiLink erlangBracket Delimiter - HiLink erlangPipe Delimiter - endif - - " Atoms, functions, variables, macros - if s:old_style - HiLink erlangAtom Normal - HiLink erlangLocalFuncCall Normal - HiLink erlangLocalFuncRef Normal - HiLink erlangGlobalFuncCall Function - HiLink erlangGlobalFuncRef Function - HiLink erlangVariable Normal - HiLink erlangMacro Normal - HiLink erlangRecord Normal - else - HiLink erlangAtom String - HiLink erlangLocalFuncCall Normal - HiLink erlangLocalFuncRef Normal - HiLink erlangGlobalFuncCall Normal - HiLink erlangGlobalFuncRef Normal - HiLink erlangVariable Identifier - HiLink erlangMacro Macro - HiLink erlangRecord Structure - endif - - " Bitstrings - if !s:old_style - HiLink erlangBitType Type - endif - - " Constants and Directives - if s:old_style - HiLink erlangAttribute Type - HiLink erlangMacroDef Type - HiLink erlangUnknownAttribute Normal - HiLink erlangInclude Type - HiLink erlangRecordDef Type - HiLink erlangDefine Type - HiLink erlangPreCondit Type - HiLink erlangType Type - else - HiLink erlangAttribute Keyword - HiLink erlangMacroDef Macro - HiLink erlangUnknownAttribute Normal - HiLink erlangInclude Include - HiLink erlangRecordDef Keyword - HiLink erlangDefine Define - HiLink erlangPreCondit PreCondit - HiLink erlangType Type - endif - - " Keywords - HiLink erlangKeyword Keyword - - " Build-in-functions (BIFs) - HiLink erlangBIF Function - - if s:old_style - HiLink erlangBoolean Statement - HiLink erlangExtra Statement - HiLink erlangSignal Statement - else - HiLink erlangBoolean Boolean - HiLink erlangExtra Statement - HiLink erlangSignal Statement - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" Comments +HiLink erlangComment Comment +HiLink erlangCommentAnnotation Special +HiLink erlangTodo Todo +HiLink erlangShebang Comment + +" Numbers +HiLink erlangNumberInteger Number +HiLink erlangNumberFloat Float + +" Strings, atoms, characters +HiLink erlangString String + +if s:old_style +HiLink erlangQuotedAtom Type +else +HiLink erlangQuotedAtom String +endif + +HiLink erlangStringModifier Special +HiLink erlangQuotedAtomModifier Special +HiLink erlangModifier Special + +" Operators, separators +HiLink erlangOperator Operator +HiLink erlangRightArrow Operator +if s:old_style +HiLink erlangBracket Normal +HiLink erlangPipe Normal +else +HiLink erlangBracket Delimiter +HiLink erlangPipe Delimiter +endif + +" Atoms, functions, variables, macros +if s:old_style +HiLink erlangAtom Normal +HiLink erlangLocalFuncCall Normal +HiLink erlangLocalFuncRef Normal +HiLink erlangGlobalFuncCall Function +HiLink erlangGlobalFuncRef Function +HiLink erlangVariable Normal +HiLink erlangMacro Normal +HiLink erlangRecord Normal +else +HiLink erlangAtom String +HiLink erlangLocalFuncCall Normal +HiLink erlangLocalFuncRef Normal +HiLink erlangGlobalFuncCall Normal +HiLink erlangGlobalFuncRef Normal +HiLink erlangVariable Identifier +HiLink erlangMacro Macro +HiLink erlangRecord Structure endif +" Bitstrings +if !s:old_style +HiLink erlangBitType Type +endif + +" Constants and Directives +if s:old_style +HiLink erlangAttribute Type +HiLink erlangMacroDef Type +HiLink erlangUnknownAttribute Normal +HiLink erlangInclude Type +HiLink erlangRecordDef Type +HiLink erlangDefine Type +HiLink erlangPreCondit Type +HiLink erlangType Type +else +HiLink erlangAttribute Keyword +HiLink erlangMacroDef Macro +HiLink erlangUnknownAttribute Normal +HiLink erlangInclude Include +HiLink erlangRecordDef Keyword +HiLink erlangDefine Define +HiLink erlangPreCondit PreCondit +HiLink erlangType Type +endif + +" Keywords +HiLink erlangKeyword Keyword + +" Build-in-functions (BIFs) +HiLink erlangBIF Function + +if s:old_style +HiLink erlangBoolean Statement +HiLink erlangExtra Statement +HiLink erlangSignal Statement +else +HiLink erlangBoolean Boolean +HiLink erlangExtra Statement +HiLink erlangSignal Statement +endif + +delcommand HiLink + let b:current_syntax = "erlang" let &cpo = s:cpo_save diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim index c20b086ba..4e175bcc2 100644 --- a/runtime/syntax/eruby.vim +++ b/runtime/syntax/eruby.vim @@ -22,7 +22,7 @@ elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' diff --git a/runtime/syntax/esmtprc.vim b/runtime/syntax/esmtprc.vim index b22b1a141..81f074b59 100644 --- a/runtime/syntax/esmtprc.vim +++ b/runtime/syntax/esmtprc.vim @@ -3,11 +3,8 @@ " Maintainer: Kornel Kielczewski <kornel@gazeta.pl> " Last Change: 16 Feb 2005 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/esqlc.vim b/runtime/syntax/esqlc.vim index 6ad167a7e..ea36d66e1 100644 --- a/runtime/syntax/esqlc.vim +++ b/runtime/syntax/esqlc.vim @@ -3,20 +3,13 @@ " Maintainer: Jonathan A. George <jageorge@tel.gte.com> " Last Change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C++ syntax to start with -if version < 600 - source <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim -endif +runtime! syntax/cpp.vim " ESQL-C extentions @@ -52,24 +45,16 @@ syntax keyword esqlcStatement rename revoke rollback savepoint select set syntax keyword esqlcStatement truncate update " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_esqlc_syntax_inits") - if version < 508 - let did_esqlc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink esqlcOperator Operator - HiLink esqlcStatement Statement - HiLink esqlcKeyword esqlcSpecial - HiLink esqlcSpecial Special - HiLink esqlcPreProc PreProc +HiLink esqlcOperator Operator +HiLink esqlcStatement Statement +HiLink esqlcKeyword esqlcSpecial +HiLink esqlcSpecial Special +HiLink esqlcPreProc PreProc - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "esqlc" diff --git a/runtime/syntax/esterel.vim b/runtime/syntax/esterel.vim index d853e7520..0540843cd 100644 --- a/runtime/syntax/esterel.vim +++ b/runtime/syntax/esterel.vim @@ -6,11 +6,8 @@ " Last Change: Tue May 6 13:29:56 CEST 2008 " Version: 0.8 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -65,26 +62,19 @@ syn match esterelNone "\<else\s\+if\>$" syn match esterelNone "\<else\s\+if\>\s" " Class Linking -if version >= 508 || !exists("did_esterel_syntax_inits") - if version < 508 - let did_esterel_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink esterelStatement Statement - HiLink esterelType Type - HiLink esterelComment Comment - HiLink esterelBoolean Number - HiLink esterelExpressions Number - HiLink esterelIO String - HiLink esterelOperator Type - HiLink esterelSysCall Type - HiLink esterelFunctions Type - HiLink esterelSpecial Special +HiLink esterelStatement Statement +HiLink esterelType Type +HiLink esterelComment Comment +HiLink esterelBoolean Number +HiLink esterelExpressions Number +HiLink esterelIO String +HiLink esterelOperator Type +HiLink esterelSysCall Type +HiLink esterelFunctions Type +HiLink esterelSpecial Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "esterel" diff --git a/runtime/syntax/euphoria3.vim b/runtime/syntax/euphoria3.vim index 1254b9624..ece14027b 100644 --- a/runtime/syntax/euphoria3.vim +++ b/runtime/syntax/euphoria3.vim @@ -5,10 +5,8 @@ " Remark: Euphoria has two syntax files, euphoria3.vim and euphoria4.vim; " For details see :help ft-euphoria-syntax -" Quit if a (custom) syntax file was already loaded (compatible with Vim 5.8): -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/euphoria4.vim b/runtime/syntax/euphoria4.vim index 53f5cea91..5e668a7d6 100644 --- a/runtime/syntax/euphoria4.vim +++ b/runtime/syntax/euphoria4.vim @@ -5,10 +5,8 @@ " Remark: Euphoria has two syntax files, euphoria3.vim and euphoria4.vim; " For details see :help ft-euphoria-syntax -" Quit if a (custom) syntax file was already loaded (compatible with Vim 5.8): -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/eviews.vim b/runtime/syntax/eviews.vim index aa65fda3f..7d039c212 100644 --- a/runtime/syntax/eviews.vim +++ b/runtime/syntax/eviews.vim @@ -4,19 +4,12 @@ " Last Change: 2006 Apr 30 " Filenames: *.prg " URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version >= 600 - setlocal iskeyword=@,48-57,_,. -else - set iskeyword=@,48-57,_,. -endif +setlocal iskeyword=@,48-57,_,. syn case match @@ -69,35 +62,27 @@ syn match eCurlyError /[)\]]/ contained syn match eParenError /[\]}]/ contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_r_syn_inits") - if version < 508 - let did_r_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink eComment Comment - HiLink eConstant Identifier - HiLink eStringId Identifier - HiLink eCommand Type - HiLink eString String - HiLink eNumber Number - HiLink eBoolean Boolean - HiLink eFloat Float - HiLink eConditional Conditional - HiLink eProgLang Statement - HiLink eOVP Statement - HiLink eStdCmd Statement - HiLink eIdentifier Normal - HiLink eDelimiter Delimiter - HiLink eError Error - HiLink eBraceError Error - HiLink eCurlyError Error - HiLink eParenError Error - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink eComment Comment +HiLink eConstant Identifier +HiLink eStringId Identifier +HiLink eCommand Type +HiLink eString String +HiLink eNumber Number +HiLink eBoolean Boolean +HiLink eFloat Float +HiLink eConditional Conditional +HiLink eProgLang Statement +HiLink eOVP Statement +HiLink eStdCmd Statement +HiLink eIdentifier Normal +HiLink eDelimiter Delimiter +HiLink eError Error +HiLink eBraceError Error +HiLink eCurlyError Error +HiLink eParenError Error +delcommand HiLink let b:current_syntax="eviews" diff --git a/runtime/syntax/exim.vim b/runtime/syntax/exim.vim index ff8066f8a..f9017acb1 100644 --- a/runtime/syntax/exim.vim +++ b/runtime/syntax/exim.vim @@ -6,12 +6,9 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/exim.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -91,27 +88,20 @@ syn keyword eximKeyword server_prompts server_condition client_send syn keyword eximKeyword server_secret client_name client_secret " Define the default highlighting -if version >= 508 || !exists("did_exim_syntax_inits") - if version < 508 - let did_exim_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink eximComment Comment - HiLink eximFixme Todo - HiLink eximEnd Keyword - HiLink eximNumber Number - HiLink eximDriverName Constant - HiLink eximConstant Constant - HiLink eximTime Constant - HiLink eximKeyword Type - HiLink eximSpecialChar Special - HiLink eximMacroName Preproc - HiLink eximTransport Identifier +HiLink eximComment Comment +HiLink eximFixme Todo +HiLink eximEnd Keyword +HiLink eximNumber Number +HiLink eximDriverName Constant +HiLink eximConstant Constant +HiLink eximTime Constant +HiLink eximKeyword Type +HiLink eximSpecialChar Special +HiLink eximMacroName Preproc +HiLink eximTransport Identifier - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "exim" diff --git a/runtime/syntax/expect.vim b/runtime/syntax/expect.vim index 6ff7d4142..4f05259fc 100644 --- a/runtime/syntax/expect.vim +++ b/runtime/syntax/expect.vim @@ -4,11 +4,8 @@ " Last Change: 2012 Jun 01 " (Dominique Pelle added @Spell) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -81,35 +78,27 @@ syn match expectComment "#.*$" contains=@Spell,expectTodo syn match expectSharpBang "\%^#!.*" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_expect_syntax_inits") - if version < 508 - let did_expect_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink expectSharpBang PreProc - HiLink expectVariables Special - HiLink expectCommand Function - HiLink expectStatement Statement - HiLink expectConditional Conditional - HiLink expectRepeat Repeat - HiLink expectExpectOpts Keyword - HiLink expectOutVar Special - HiLink expectSpecial Special - HiLink expectNumber Number - - HiLink expectString String - - HiLink expectComment Comment - HiLink expectTodo Todo - "HiLink expectIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink expectSharpBang PreProc +HiLink expectVariables Special +HiLink expectCommand Function +HiLink expectStatement Statement +HiLink expectConditional Conditional +HiLink expectRepeat Repeat +HiLink expectExpectOpts Keyword +HiLink expectOutVar Special +HiLink expectSpecial Special +HiLink expectNumber Number + +HiLink expectString String + +HiLink expectComment Comment +HiLink expectTodo Todo +"HiLink expectIdentifier Identifier + +delcommand HiLink let b:current_syntax = "expect" diff --git a/runtime/syntax/exports.vim b/runtime/syntax/exports.vim index f695dc8d2..aa6b76a5b 100644 --- a/runtime/syntax/exports.vim +++ b/runtime/syntax/exports.vim @@ -6,11 +6,8 @@ " Notes: This file includes both SysV and BSD 'isms " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_EXPORTS -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -39,32 +36,24 @@ syn match exportsSeparator "[,:]" syn match exportsComment "^\s*#.*$" contains=@Spell " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_exports_syntax_inits") - if version < 508 - let did_exports_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink exportsKeyOptSet exportsKeySettings - HiLink exportsOptSet exportsSettings +HiLink exportsKeyOptSet exportsKeySettings +HiLink exportsOptSet exportsSettings - HiLink exportsComment Comment - HiLink exportsKeyOptions Type - HiLink exportsKeySettings Keyword - HiLink exportsOptions Constant - HiLink exportsSeparator Constant - HiLink exportsSettings Constant +HiLink exportsComment Comment +HiLink exportsKeyOptions Type +HiLink exportsKeySettings Keyword +HiLink exportsOptions Constant +HiLink exportsSeparator Constant +HiLink exportsSettings Constant - HiLink exportsOptError Error - HiLink exportsOptSetError Error - HiLink exportsSetError Error +HiLink exportsOptError Error +HiLink exportsOptSetError Error +HiLink exportsSetError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "exports" " vim: ts=10 diff --git a/runtime/syntax/fasm.vim b/runtime/syntax/fasm.vim index 696e05b4c..172ba7c9b 100644 --- a/runtime/syntax/fasm.vim +++ b/runtime/syntax/fasm.vim @@ -6,9 +6,8 @@ " FASM Home: http://flatassembler.net/ " FASM Version: 1.56 -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/fdcc.vim b/runtime/syntax/fdcc.vim index 38717ebfb..422fd31da 100644 --- a/runtime/syntax/fdcc.vim +++ b/runtime/syntax/fdcc.vim @@ -4,11 +4,8 @@ " Last Change: 2004 May 16 " Remarks: FDCC (Formal Definitions of Cultural Conventions) see ISO TR 14652 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -58,56 +55,48 @@ syn region fdccBlank matchgroup=fdccLCName start=/^LC_NAME$/ end=/^END LC_NAME$/ syn region fdccBlank matchgroup=fdccLCAddress start=/^LC_ADDRESS$/ end=/^END LC_ADDRESS$/ contains=fdccKeywordAddress,fdccString,fdccComment,fdccNumber -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_fdcc_syn_inits") - if version < 508 - let did_fdcc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink fdccBlank Blank - - HiLink fdccTodo Todo - HiLink fdccComment Comment - HiLink fdccVariable Type - - HiLink fdccLCIdentification Statement - HiLink fdccLCCtype Statement - HiLink fdccLCCollate Statement - HiLink fdccLCMonetary Statement - HiLink fdccLCNumeric Statement - HiLink fdccLCTime Statement - HiLink fdccLCMessages Statement - HiLink fdccLCPaper Statement - HiLink fdccLCTelephone Statement - HiLink fdccLCMeasurement Statement - HiLink fdccLCName Statement - HiLink fdccLCAddress Statement - - HiLink fdccUnicodeInValid Error - HiLink fdccUnicodeValid String - HiLink fdccString String - HiLink fdccNumber Blank - - HiLink fdccKeywordIdentification fdccKeyword - HiLink fdccKeywordCtype fdccKeyword - HiLink fdccKeywordCollate fdccKeyword - HiLink fdccKeywordMonetary fdccKeyword - HiLink fdccKeywordNumeric fdccKeyword - HiLink fdccKeywordTime fdccKeyword - HiLink fdccKeywordMessages fdccKeyword - HiLink fdccKeywordPaper fdccKeyword - HiLink fdccKeywordTelephone fdccKeyword - HiLink fdccKeywordMeasurement fdccKeyword - HiLink fdccKeywordName fdccKeyword - HiLink fdccKeywordAddress fdccKeyword - HiLink fdccKeyword Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink fdccBlank Blank + +HiLink fdccTodo Todo +HiLink fdccComment Comment +HiLink fdccVariable Type + +HiLink fdccLCIdentification Statement +HiLink fdccLCCtype Statement +HiLink fdccLCCollate Statement +HiLink fdccLCMonetary Statement +HiLink fdccLCNumeric Statement +HiLink fdccLCTime Statement +HiLink fdccLCMessages Statement +HiLink fdccLCPaper Statement +HiLink fdccLCTelephone Statement +HiLink fdccLCMeasurement Statement +HiLink fdccLCName Statement +HiLink fdccLCAddress Statement + +HiLink fdccUnicodeInValid Error +HiLink fdccUnicodeValid String +HiLink fdccString String +HiLink fdccNumber Blank + +HiLink fdccKeywordIdentification fdccKeyword +HiLink fdccKeywordCtype fdccKeyword +HiLink fdccKeywordCollate fdccKeyword +HiLink fdccKeywordMonetary fdccKeyword +HiLink fdccKeywordNumeric fdccKeyword +HiLink fdccKeywordTime fdccKeyword +HiLink fdccKeywordMessages fdccKeyword +HiLink fdccKeywordPaper fdccKeyword +HiLink fdccKeywordTelephone fdccKeyword +HiLink fdccKeywordMeasurement fdccKeyword +HiLink fdccKeywordName fdccKeyword +HiLink fdccKeywordAddress fdccKeyword +HiLink fdccKeyword Identifier + +delcommand HiLink let b:current_syntax = "fdcc" diff --git a/runtime/syntax/fgl.vim b/runtime/syntax/fgl.vim index 1b2fe19a8..e45e31c39 100644 --- a/runtime/syntax/fgl.vim +++ b/runtime/syntax/fgl.vim @@ -7,11 +7,8 @@ " - Conditionally allow case insensitive keywords (Julian Bridle) " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -119,28 +116,20 @@ syn match fglSpecial "--@" syn sync ccomment fglComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_fgl_syntax_inits") - if version < 508 - let did_fgl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink fglComment Comment - "HiLink fglKeyword fglSpecial - HiLink fglKeyword fglStatement - HiLink fglNumber Number - HiLink fglOperator fglStatement - HiLink fglSpecial Special - HiLink fglStatement Statement - HiLink fglString String - HiLink fglType Type +HiLink fglComment Comment +"HiLink fglKeyword fglSpecial +HiLink fglKeyword fglStatement +HiLink fglNumber Number +HiLink fglOperator fglStatement +HiLink fglSpecial Special +HiLink fglStatement Statement +HiLink fglString String +HiLink fglType Type - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "fgl" diff --git a/runtime/syntax/flexwiki.vim b/runtime/syntax/flexwiki.vim index 34f893d92..6b15ab2d9 100644 --- a/runtime/syntax/flexwiki.vim +++ b/runtime/syntax/flexwiki.vim @@ -14,10 +14,8 @@ " regexes, which use a different syntax than Vim (fewer \s). " The primary test case is FlexWiki\FormattingRules.wiki -" Quit if syntax file is already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/focexec.vim b/runtime/syntax/focexec.vim index 8be1b65cc..54f4c0d55 100644 --- a/runtime/syntax/focexec.vim +++ b/runtime/syntax/focexec.vim @@ -11,11 +11,8 @@ " I think some of these things should get different hilights - " should MODIFY commands look different than TABLE? -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -69,32 +66,24 @@ syn match focexecNumber "\<\d\+\.\d*\>" syn match focexecComment "-\*.*" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_focexec_syntax_inits") - if version < 508 - let did_focexec_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink focexecString1 String - HiLink focexecString2 String - HiLink focexecNumber Number - HiLink focexecComment Comment - HiLink focexecTable Keyword - HiLink focexecModify Keyword - HiLink focexecNormal Keyword - HiLink focexecSet Keyword - HiLink focexecDash Keyword - HiLink focexecFileDef Keyword - HiLink focexecJoin Keyword - HiLink focexecAmperVar Identifier - HiLink focexecFuse Function +HiLink focexecString1 String +HiLink focexecString2 String +HiLink focexecNumber Number +HiLink focexecComment Comment +HiLink focexecTable Keyword +HiLink focexecModify Keyword +HiLink focexecNormal Keyword +HiLink focexecSet Keyword +HiLink focexecDash Keyword +HiLink focexecFileDef Keyword +HiLink focexecJoin Keyword +HiLink focexecAmperVar Identifier +HiLink focexecFuse Function - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "focexec" diff --git a/runtime/syntax/form.vim b/runtime/syntax/form.vim index 19a47ed6b..abd1c489d 100644 --- a/runtime/syntax/form.vim +++ b/runtime/syntax/form.vim @@ -11,11 +11,8 @@ " This syntax file is still in development. Please send suggestions " to the maintainer. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -109,49 +106,41 @@ syn match formDirective "^\=\.[a-zA-z][a-zA-Z0-9]*\>" syn sync ccomment formComment minlines=10 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_form_syn_inits") - if version < 508 - let did_form_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink formConditional Conditional - HiLink formNumber Number - HiLink formStatement Statement - HiLink formComment Comment - HiLink formPreProc PreProc - HiLink formDirective PreProc - HiLink formType Type - HiLink formString String - HiLink formNestedString String - HiLink formReserved Error - HiLink formTodo Todo - HiLink formSpecial SpecialChar - - if !exists("form_enhanced_color") - HiLink formHeaderStatement Statement - else - " enhanced color mode - HiLink formHeaderStatement HeaderStatement - " dark and a light background for local types - if &background == "dark" - hi HeaderStatement term=underline ctermfg=LightGreen guifg=LightGreen gui=bold - else - hi HeaderStatement term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold - endif - " change slightly the default for dark gvim - if has("gui_running") && &background == "dark" - hi Conditional guifg=LightBlue gui=bold - hi Statement guifg=LightYellow - endif - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink formConditional Conditional +HiLink formNumber Number +HiLink formStatement Statement +HiLink formComment Comment +HiLink formPreProc PreProc +HiLink formDirective PreProc +HiLink formType Type +HiLink formString String +HiLink formNestedString String +HiLink formReserved Error +HiLink formTodo Todo +HiLink formSpecial SpecialChar + +if !exists("form_enhanced_color") +HiLink formHeaderStatement Statement +else +" enhanced color mode +HiLink formHeaderStatement HeaderStatement +" dark and a light background for local types +if &background == "dark" +hi HeaderStatement term=underline ctermfg=LightGreen guifg=LightGreen gui=bold +else +hi HeaderStatement term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold endif +" change slightly the default for dark gvim +if has("gui_running") && &background == "dark" +hi Conditional guifg=LightBlue gui=bold +hi Statement guifg=LightYellow +endif +endif + +delcommand HiLink let b:current_syntax = "form" diff --git a/runtime/syntax/forth.vim b/runtime/syntax/forth.vim index 99e9400b9..2559779f5 100644 --- a/runtime/syntax/forth.vim +++ b/runtime/syntax/forth.vim @@ -80,11 +80,8 @@ " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -104,11 +101,7 @@ syn match forthTodo contained 'Copyright\(\s([Cc])\)\=\(\s[0-9]\{2,4}\)\=' " Characters allowed in keywords " I don't know if 128-255 are allowed in ANS-FORTH -if version >= 600 - setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 -else - set iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 -endif +setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 " when wanted, highlight trailing white space if exists("forth_space_errors") @@ -289,56 +282,48 @@ syn match forthLocals '{ }' " otherwise, at least two spaces between syn region forthDeprecated start='locals|' end='|' " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_forth_syn_inits") - if version < 508 - let did_forth_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later. - HiLink forthTodo Todo - HiLink forthOperators Operator - HiLink forthMath Number - HiLink forthInteger Number - HiLink forthFloat Float - HiLink forthStack Special - HiLink forthRstack Special - HiLink forthFStack Special - HiLink forthSP Special - HiLink forthMemory Function - HiLink forthAdrArith Function - HiLink forthMemBlks Function - HiLink forthCond Conditional - HiLink forthLoop Repeat - HiLink forthColonDef Define - HiLink forthEndOfColonDef Define - HiLink forthDefine Define - HiLink forthDebug Debug - HiLink forthAssembler Include - HiLink forthCharOps Character - HiLink forthConversion String - HiLink forthForth Statement - HiLink forthVocs Statement - HiLink forthString String - HiLink forthComment Comment - HiLink forthClassDef Define - HiLink forthEndOfClassDef Define - HiLink forthObjectDef Define - HiLink forthEndOfObjectDef Define - HiLink forthInclude Include - HiLink forthLocals Type " nothing else uses type and locals must stand out - HiLink forthDeprecated Error " if you must, change to Type - HiLink forthFileMode Function - HiLink forthFileWords Statement - HiLink forthBlocks Statement - HiLink forthSpaceError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later. +HiLink forthTodo Todo +HiLink forthOperators Operator +HiLink forthMath Number +HiLink forthInteger Number +HiLink forthFloat Float +HiLink forthStack Special +HiLink forthRstack Special +HiLink forthFStack Special +HiLink forthSP Special +HiLink forthMemory Function +HiLink forthAdrArith Function +HiLink forthMemBlks Function +HiLink forthCond Conditional +HiLink forthLoop Repeat +HiLink forthColonDef Define +HiLink forthEndOfColonDef Define +HiLink forthDefine Define +HiLink forthDebug Debug +HiLink forthAssembler Include +HiLink forthCharOps Character +HiLink forthConversion String +HiLink forthForth Statement +HiLink forthVocs Statement +HiLink forthString String +HiLink forthComment Comment +HiLink forthClassDef Define +HiLink forthEndOfClassDef Define +HiLink forthObjectDef Define +HiLink forthEndOfObjectDef Define +HiLink forthInclude Include +HiLink forthLocals Type " nothing else uses type and locals must stand out +HiLink forthDeprecated Error " if you must, change to Type +HiLink forthFileMode Function +HiLink forthFileWords Statement +HiLink forthBlocks Statement +HiLink forthSpaceError Error + +delcommand HiLink let b:current_syntax = "forth" diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim index 06e5390c6..0b56f5b3a 100644 --- a/runtime/syntax/fortran.vim +++ b/runtime/syntax/fortran.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) " Version: 0.98 -" Last Change: 2016 Aug. 26 +" Last Change: 2016 Aug. 29 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-syntax from Vim " Credits: @@ -11,7 +11,7 @@ " Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile, " Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman, " Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann, -" Stefano Zaghi and Vishnu Krishnan. +" Stefano Zaghi and Vishnu V. Krishnan. if exists("b:current_syntax") finish @@ -368,6 +368,7 @@ else endif syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell +syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=\s.*$" "cpp is often used with Fortran syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*" @@ -517,6 +518,7 @@ hi def link cIncluded fortranString hi def link cInclude Include hi def link cPreProc PreProc hi def link cPreCondit PreCondit +hi def link fortranOpenMP PreProc hi def link fortranParenError Error hi def link fortranComment Comment hi def link fortranSerialNumber Todo diff --git a/runtime/syntax/foxpro.vim b/runtime/syntax/foxpro.vim index ca5d7e2f9..b329368b3 100644 --- a/runtime/syntax/foxpro.vim +++ b/runtime/syntax/foxpro.vim @@ -13,9 +13,8 @@ " corrected highlighting of comments at end of line (&&) " " -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -691,37 +690,29 @@ syn match foxproParenErr ")" syn sync minlines=1 maxlines=3 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_foxpro_syn_inits") - if version < 508 - let did_foxpro_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink foxproSpecial Special - HiLink foxproAtSymbol Special - HiLink foxproAtCmd Statement - HiLink foxproPreProc PreProc - HiLink foxproFunc Identifier - HiLink foxproCmd Statement - HiLink foxproEnBlk Type - HiLink foxproSysVar String - HiLink foxproString String - HiLink foxproConst Constant - HiLink foxproNumber Number - HiLink foxproFloat Float - HiLink foxproComment Comment - HiLink foxproParenErr Error - HiLink foxproCBConst PreProc - HiLink foxproCBField Special - HiLink foxproCBVar Identifier - HiLink foxproCBWin Special - HiLink foxproCBObject Identifier +HiLink foxproSpecial Special +HiLink foxproAtSymbol Special +HiLink foxproAtCmd Statement +HiLink foxproPreProc PreProc +HiLink foxproFunc Identifier +HiLink foxproCmd Statement +HiLink foxproEnBlk Type +HiLink foxproSysVar String +HiLink foxproString String +HiLink foxproConst Constant +HiLink foxproNumber Number +HiLink foxproFloat Float +HiLink foxproComment Comment +HiLink foxproParenErr Error +HiLink foxproCBConst PreProc +HiLink foxproCBField Special +HiLink foxproCBVar Identifier +HiLink foxproCBWin Special +HiLink foxproCBObject Identifier - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "foxpro" diff --git a/runtime/syntax/fstab.vim b/runtime/syntax/fstab.vim index 3006d21fe..a17fc809a 100644 --- a/runtime/syntax/fstab.vim +++ b/runtime/syntax/fstab.vim @@ -19,9 +19,8 @@ " let fstab_unknown_device_errors = 0 " do not highlight unknown devices as errors -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -229,66 +228,59 @@ syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster " Whole line comments syn match fsCommentLine /^#.*$/ contains=@Spell -if version >= 508 || !exists("did_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif - - HiLink fsOperator Operator - HiLink fsComment Comment - HiLink fsCommentLine Comment - - HiLink fsTypeKeyword Type - HiLink fsDeviceKeyword Identifier - HiLink fsDeviceLabel String - HiLink fsDeviceUUID String - HiLink fsDeviceSshfs String - HiLink fsFreqPassNumber Number - - if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1 - HiLink fsTypeUnknown Error - endif - - if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1 - HiLink fsDeviceError Error - endif - - HiLink fsMountPointError Error - HiLink fsMountPointKeyword Keyword - HiLink fsFreqPassError Error - - HiLink fsOptionsGeneral Type - HiLink fsOptionsKeywords Keyword - HiLink fsOptionsNumber Number - HiLink fsOptionsNumberOctal Number - HiLink fsOptionsString String - HiLink fsOptionsSize Number - HiLink fsOptionsExt2Check String - HiLink fsOptionsExt2Errors String - HiLink fsOptionsExt3Journal String - HiLink fsOptionsExt3Data String - HiLink fsOptionsExt4Journal String - HiLink fsOptionsExt4Data String - HiLink fsOptionsExt4Barrier Number - HiLink fsOptionsFatCheck String - HiLink fsOptionsConv String - HiLink fsOptionsFatType Number - HiLink fsOptionsYesNo String - HiLink fsOptionsHpfsCase String - HiLink fsOptionsIsoMap String - HiLink fsOptionsReiserHash String - HiLink fsOptionsSshYesNoAsk String - HiLink fsOptionsUfsType String - HiLink fsOptionsUfsError String - - HiLink fsOptionsVfatShortname String - - delcommand HiLink +command! -nargs=+ HiLink hi def link <args> + +HiLink fsOperator Operator +HiLink fsComment Comment +HiLink fsCommentLine Comment + +HiLink fsTypeKeyword Type +HiLink fsDeviceKeyword Identifier +HiLink fsDeviceLabel String +HiLink fsDeviceUUID String +HiLink fsDeviceSshfs String +HiLink fsFreqPassNumber Number + +if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1 +HiLink fsTypeUnknown Error endif +if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1 +HiLink fsDeviceError Error +endif + +HiLink fsMountPointError Error +HiLink fsMountPointKeyword Keyword +HiLink fsFreqPassError Error + +HiLink fsOptionsGeneral Type +HiLink fsOptionsKeywords Keyword +HiLink fsOptionsNumber Number +HiLink fsOptionsNumberOctal Number +HiLink fsOptionsString String +HiLink fsOptionsSize Number +HiLink fsOptionsExt2Check String +HiLink fsOptionsExt2Errors String +HiLink fsOptionsExt3Journal String +HiLink fsOptionsExt3Data String +HiLink fsOptionsExt4Journal String +HiLink fsOptionsExt4Data String +HiLink fsOptionsExt4Barrier Number +HiLink fsOptionsFatCheck String +HiLink fsOptionsConv String +HiLink fsOptionsFatType Number +HiLink fsOptionsYesNo String +HiLink fsOptionsHpfsCase String +HiLink fsOptionsIsoMap String +HiLink fsOptionsReiserHash String +HiLink fsOptionsSshYesNoAsk String +HiLink fsOptionsUfsType String +HiLink fsOptionsUfsError String + +HiLink fsOptionsVfatShortname String + +delcommand HiLink + let b:current_syntax = "fstab" let &cpo = s:cpo_save diff --git a/runtime/syntax/fvwm2m4.vim b/runtime/syntax/fvwm2m4.vim index 243da18fa..e296273e3 100644 --- a/runtime/syntax/fvwm2m4.vim +++ b/runtime/syntax/fvwm2m4.vim @@ -5,12 +5,9 @@ " URI: http://physics.muni.cz/~yeti/download/syntax/fvwmm4.vim " Setup -if version >= 600 - if exists('b:current_syntax') - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists('b:current_syntax') + finish endif " Let included files know they are included @@ -19,19 +16,11 @@ if !exists('main_syntax') endif " Include M4 syntax -if version >= 600 - runtime! syntax/m4.vim -else - so <sfile>:p:h/m4.vim -endif +runtime! syntax/m4.vim unlet b:current_syntax " Include Fvwm2 syntax (Fvwm1 doesn't have M4 preprocessor) -if version >= 600 - runtime! syntax/fvwm.vim -else - so <sfile>:p:h/fvwm.vim -endif +runtime! syntax/fvwm.vim unlet b:current_syntax " That's all! diff --git a/runtime/syntax/gdb.vim b/runtime/syntax/gdb.vim index 64e89cce7..677f94817 100644 --- a/runtime/syntax/gdb.vim +++ b/runtime/syntax/gdb.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/gdb.vim " Last Change: 2012 Oct 05 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -87,27 +84,19 @@ endif exec "syn sync ccomment gdbComment minlines=" . gdb_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_gdb_syn_inits") - if version < 508 - let did_gdb_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink gdbFuncDef Function - HiLink gdbComment Comment - HiLink gdbStatement Statement - HiLink gdbString String - HiLink gdbCharacter Character - HiLink gdbVariable Identifier - HiLink gdbSet Constant - HiLink gdbInfo Type - HiLink gdbDocument Special - HiLink gdbNumber Number - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink gdbFuncDef Function +HiLink gdbComment Comment +HiLink gdbStatement Statement +HiLink gdbString String +HiLink gdbCharacter Character +HiLink gdbVariable Identifier +HiLink gdbSet Constant +HiLink gdbInfo Type +HiLink gdbDocument Special +HiLink gdbNumber Number +delcommand HiLink let b:current_syntax = "gdb" diff --git a/runtime/syntax/gdmo.vim b/runtime/syntax/gdmo.vim index 86c6d5c76..d9cebae1d 100644 --- a/runtime/syntax/gdmo.vim +++ b/runtime/syntax/gdmo.vim @@ -5,11 +5,8 @@ " URL: http://classicalprogrammer.wikidot.com/local--files/vim-syntax-file-for-gdmo/gdmo.vim " Last change: 8th June, 2011 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -64,32 +61,24 @@ syn match gdmoBraces "[{}]" syn sync ccomment gdmoComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_gdmo_syntax_inits") - if version < 508 - let did_gdmo_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink gdmoCategory Structure - HiLink gdmoRelationship Macro - HiLink gdmoDefinition Statement - HiLink gdmoReference Type - HiLink gdmoExtension Operator - HiLink gdmoBraces Function - HiLink gdmoSpecial Special - HiLink gdmoString String - HiLink gdmoCharacter Character - HiLink gdmoSpecialCharacter gdmoSpecial - HiLink gdmoComment Comment - HiLink gdmoLineComment gdmoComment - HiLink gdmoType Type +HiLink gdmoCategory Structure +HiLink gdmoRelationship Macro +HiLink gdmoDefinition Statement +HiLink gdmoReference Type +HiLink gdmoExtension Operator +HiLink gdmoBraces Function +HiLink gdmoSpecial Special +HiLink gdmoString String +HiLink gdmoCharacter Character +HiLink gdmoSpecialCharacter gdmoSpecial +HiLink gdmoComment Comment +HiLink gdmoLineComment gdmoComment +HiLink gdmoType Type - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "gdmo" diff --git a/runtime/syntax/gedcom.vim b/runtime/syntax/gedcom.vim index 98851cc94..40a17863f 100644 --- a/runtime/syntax/gedcom.vim +++ b/runtime/syntax/gedcom.vim @@ -3,11 +3,8 @@ " Maintainer: Paul Johnson (pjcj@transeda.com) " Version 1.059 - 23rd December 1999 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -41,26 +38,18 @@ syntax match gedcom_date "\d\{1,2}\s\+\(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\| syntax match gedcom_date ".*" contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_gedcom_syntax_inits") - if version < 508 - let did_gedcom_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink gedcom_record Statement - HiLink gedcom_id Comment - HiLink gedcom_ii PreProc - HiLink gedcom_in Type - HiLink gedcom_name PreProc - HiLink gedcom_cname Type - HiLink gedcom_surname Identifier - HiLink gedcom_date Constant - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink gedcom_record Statement +HiLink gedcom_id Comment +HiLink gedcom_ii PreProc +HiLink gedcom_in Type +HiLink gedcom_name PreProc +HiLink gedcom_cname Type +HiLink gedcom_surname Identifier +HiLink gedcom_date Constant + +delcommand HiLink let b:current_syntax = "gedcom" diff --git a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim index b0315a946..5e0642fbc 100644 --- a/runtime/syntax/gitcommit.vim +++ b/runtime/syntax/gitcommit.vim @@ -2,7 +2,7 @@ " Language: git commit file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.git/COMMIT_EDITMSG -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -39,9 +39,10 @@ syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold -syn match gitcommitDiscardedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite -syn match gitcommitSelectedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite -syn match gitcommitUnmergedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite + +syn match gitcommitDiscardedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite +syn match gitcommitSelectedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite +syn match gitcommitUnmergedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow diff --git a/runtime/syntax/gitrebase.vim b/runtime/syntax/gitrebase.vim index a7460280d..a944c14dd 100644 --- a/runtime/syntax/gitrebase.vim +++ b/runtime/syntax/gitrebase.vim @@ -2,7 +2,7 @@ " Language: git rebase --interactive " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: git-rebase-todo -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -18,6 +18,7 @@ syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite +syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseSummary ".*" contains=gitrebaseHash contained syn match gitrebaseCommand ".*" contained syn match gitrebaseComment "^#.*" contains=gitrebaseHash @@ -31,6 +32,7 @@ hi def link gitrebaseEdit PreProc hi def link gitrebaseSquash Type hi def link gitrebaseFixup Special hi def link gitrebaseExec Function +hi def link gitrebaseDrop Comment hi def link gitrebaseSummary String hi def link gitrebaseComment Comment hi def link gitrebaseSquashError Error diff --git a/runtime/syntax/gitsendemail.vim b/runtime/syntax/gitsendemail.vim index 8b938116f..8fdf6839c 100644 --- a/runtime/syntax/gitsendemail.vim +++ b/runtime/syntax/gitsendemail.vim @@ -1,14 +1,18 @@ " Vim syntax file " Language: git send-email message " Maintainer: Tim Pope -" Filenames: *.msg.[0-9]* (first line is "From ... # This line is ignored.") -" Last Change: 2010 May 21 +" Filenames: .gitsendemail.* +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish endif runtime! syntax/mail.vim +unlet! b:current_syntax +syn include @gitsendemailDiff syntax/diff.vim +syn region gitsendemailDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^-- %/ fold contains=@gitsendemailDiff + syn case match syn match gitsendemailComment "\%^From.*#.*" diff --git a/runtime/syntax/gkrellmrc.vim b/runtime/syntax/gkrellmrc.vim index 6ce123841..9840a9034 100644 --- a/runtime/syntax/gkrellmrc.vim +++ b/runtime/syntax/gkrellmrc.vim @@ -6,19 +6,12 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/gkrellmrc.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 syn case match @@ -55,37 +48,30 @@ syn keyword gkrellmrcStyleCmd StyleMeter StyleChart StylePanel syn keyword gkrellmrcStyleItem textcolor alt_textcolor font alt_font transparency border label_position margin margins left_margin right_margin top_margin bottom_margin krell_depth krell_yoff krell_x_hot krell_expand krell_left_margin krell_right_margin " Define the default highlighting -if version >= 508 || !exists("did_gtkrc_syntax_inits") - if version < 508 - let did_gtkrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink gkrellmrcComment Comment - HiLink gkrellmrcFixme Todo +HiLink gkrellmrcComment Comment +HiLink gkrellmrcFixme Todo - HiLink gkrellmrcString gkrellmrcConstant - HiLink gkrellmrcNumber gkrellmrcConstant - HiLink gkrellmrcRGBColor gkrellmrcConstant - HiLink gkrellmrcExpandMode gkrellmrcConstant - HiLink gkrellmrcConstant Constant +HiLink gkrellmrcString gkrellmrcConstant +HiLink gkrellmrcNumber gkrellmrcConstant +HiLink gkrellmrcRGBColor gkrellmrcConstant +HiLink gkrellmrcExpandMode gkrellmrcConstant +HiLink gkrellmrcConstant Constant - HiLink gkrellmrcMeterName gkrellmrcClass - HiLink gkrellmrcChartName gkrellmrcClass - HiLink gkrellmrcSpecialClassName gkrellmrcClass - HiLink gkrellmrcClass Type +HiLink gkrellmrcMeterName gkrellmrcClass +HiLink gkrellmrcChartName gkrellmrcClass +HiLink gkrellmrcSpecialClassName gkrellmrcClass +HiLink gkrellmrcClass Type - HiLink gkrellmrcGlobal gkrellmrcItem - HiLink gkrellmrcBuiltinExt gkrellmrcItem - HiLink gkrellmrcStyleItem gkrellmrcItem - HiLink gkrellmrcItem Function +HiLink gkrellmrcGlobal gkrellmrcItem +HiLink gkrellmrcBuiltinExt gkrellmrcItem +HiLink gkrellmrcStyleItem gkrellmrcItem +HiLink gkrellmrcItem Function - HiLink gkrellmrcSetCmd Special - HiLink gkrellmrcStyleCmd Statement +HiLink gkrellmrcSetCmd Special +HiLink gkrellmrcStyleCmd Statement - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "gkrellmrc" diff --git a/runtime/syntax/gnash.vim b/runtime/syntax/gnash.vim index f9e2b519a..cce522dd8 100644 --- a/runtime/syntax/gnash.vim +++ b/runtime/syntax/gnash.vim @@ -15,11 +15,8 @@ " Vim is Charityware, see ":help Uganda" " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") || &compatible +" quit when a syntax file was already loaded +if exists("b:current_syntax") || &compatible finish endif diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim index d85932d40..38aadffa2 100644 --- a/runtime/syntax/gnuplot.vim +++ b/runtime/syntax/gnuplot.vim @@ -20,9 +20,8 @@ " For vim version 5.x: Clear all syntax items " For vim version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -501,54 +500,46 @@ syn keyword gnuplotStatement shell splot spstats stats system test undefine syn keyword gnuplotStatement unset update " ---- Define the default highlighting ---- " -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_gnuplot_syntax_inits") - if version < 508 - let did_gnuplot_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " ---- Comments ---- " - HiLink gnuplotComment Comment - - " ---- Constants ---- " - HiLink gnuplotString String - HiLink gnuplotNumber Number - HiLink gnuplotFloat Float - - " ---- Identifiers ---- " - HiLink gnuplotIdentifier Identifier - - " ---- Statements ---- " - HiLink gnuplotConditional Conditional - HiLink gnuplotRepeat Repeat - HiLink gnuplotKeyword Keyword - HiLink gnuplotOperator Operator - - " ---- PreProcs ---- " - HiLink gnuplotMacro Macro - - " ---- Types ---- " - HiLink gnuplotStatement Type - HiLink gnuplotFunc Identifier - - " ---- Specials ---- " - HiLink gnuplotSpecial Special - HiLink gnuplotUnit Special - HiLink gnuplotExternal Special - - " ---- Errors ---- " - HiLink gnuplotError Error - HiLink gnuplotOctalError Error - - " ---- Todos ---- " - HiLink gnuplotTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" ---- Comments ---- " +HiLink gnuplotComment Comment + +" ---- Constants ---- " +HiLink gnuplotString String +HiLink gnuplotNumber Number +HiLink gnuplotFloat Float + +" ---- Identifiers ---- " +HiLink gnuplotIdentifier Identifier + +" ---- Statements ---- " +HiLink gnuplotConditional Conditional +HiLink gnuplotRepeat Repeat +HiLink gnuplotKeyword Keyword +HiLink gnuplotOperator Operator + +" ---- PreProcs ---- " +HiLink gnuplotMacro Macro + +" ---- Types ---- " +HiLink gnuplotStatement Type +HiLink gnuplotFunc Identifier + +" ---- Specials ---- " +HiLink gnuplotSpecial Special +HiLink gnuplotUnit Special +HiLink gnuplotExternal Special + +" ---- Errors ---- " +HiLink gnuplotError Error +HiLink gnuplotOctalError Error + +" ---- Todos ---- " +HiLink gnuplotTodo Todo + +delcommand HiLink let b:current_syntax = "gnuplot" diff --git a/runtime/syntax/gp.vim b/runtime/syntax/gp.vim index f46a46521..2e898dad5 100644 --- a/runtime/syntax/gp.vim +++ b/runtime/syntax/gp.vim @@ -4,9 +4,8 @@ " Last change: 2012 Jan 08 " URL: http://pari.math.u-bordeaux.fr -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -59,33 +58,26 @@ syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenErro syntax match gpParenError ")" syntax match gpInParen contained "[{}]" -if version >= 508 || !exists("did_gp_syn_inits") - if version < 508 - let did_gp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink gpConditional Conditional - HiLink gpRepeat Repeat - HiLink gpError Error - HiLink gpParenError gpError - HiLink gpInParen gpError - HiLink gpStatement Statement - HiLink gpString String - HiLink gpComment Comment - HiLink gpInterface Type - HiLink gpInput Type - HiLink gpInterfaceKey Statement - HiLink gpFunction Function - HiLink gpScope Type - " contained ones - HiLink gpSpecial Special - HiLink gpTodo Todo - HiLink gpArgs Type - delcommand HiLink -endif +HiLink gpConditional Conditional +HiLink gpRepeat Repeat +HiLink gpError Error +HiLink gpParenError gpError +HiLink gpInParen gpError +HiLink gpStatement Statement +HiLink gpString String +HiLink gpComment Comment +HiLink gpInterface Type +HiLink gpInput Type +HiLink gpInterfaceKey Statement +HiLink gpFunction Function +HiLink gpScope Type +" contained ones +HiLink gpSpecial Special +HiLink gpTodo Todo +HiLink gpArgs Type +delcommand HiLink let b:current_syntax = "gp" let &cpo = s:cpo_save diff --git a/runtime/syntax/grads.vim b/runtime/syntax/grads.vim index 0b88549d4..0f09483fe 100644 --- a/runtime/syntax/grads.vim +++ b/runtime/syntax/grads.vim @@ -7,11 +7,8 @@ " This syntax file defines highlighting for only very few features of " the GrADS scripting language. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -53,34 +50,26 @@ syn match gradsComment "\*.*" " syn match gradsTypos "!=" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't hgs highlighting+yet -if version >= 508 || !exists("did_gs_syn_inits") - if version < 508 - let did_gs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't hgs highlighting+yet +command -nargs=+ HiLink hi def link <args> - HiLink gradsStatement Statement +HiLink gradsStatement Statement - HiLink gradsString String - HiLink gradsNumber Number +HiLink gradsString String +HiLink gradsNumber Number - HiLink gradsFixVariables Special - HiLink gradsVariables Identifier - HiLink gradsglobalVariables Special - HiLink gradsConst Special +HiLink gradsFixVariables Special +HiLink gradsVariables Identifier +HiLink gradsglobalVariables Special +HiLink gradsConst Special - HiLink gradsClassMethods Function +HiLink gradsClassMethods Function - HiLink gradsOperator Operator - HiLink gradsComment Comment +HiLink gradsOperator Operator +HiLink gradsComment Comment - HiLink gradsTypos Error +HiLink gradsTypos Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "grads" diff --git a/runtime/syntax/gretl.vim b/runtime/syntax/gretl.vim index 37299b894..40eb54461 100644 --- a/runtime/syntax/gretl.vim +++ b/runtime/syntax/gretl.vim @@ -4,20 +4,13 @@ " Last Change: 2006 Apr 30 " Filenames: *.inp *.gretl " URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version >= 600 - setlocal iskeyword=@,48-57,_,. -else - set iskeyword=@,48-57,_,. -endif +setlocal iskeyword=@,48-57,_,. syn case match @@ -68,34 +61,26 @@ syn match gBCend /\*)/ syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_r_syn_inits") - if version < 508 - let did_r_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink gComment Comment - HiLink gCommentStart Comment - HiLink gBlockComment Comment - HiLink gString String - HiLink gNumber Number - HiLink gBoolean Boolean - HiLink gFloat Float - HiLink gCommands Repeat - HiLink gGenrFunc Type - HiLink gDelimiter Delimiter - HiLink gError Error - HiLink gBraceError Error - HiLink gCurlyError Error - HiLink gParenError Error - HiLink gIdentifier Normal - HiLink gVariable Identifier - HiLink gArrow Repeat - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink gComment Comment +HiLink gCommentStart Comment +HiLink gBlockComment Comment +HiLink gString String +HiLink gNumber Number +HiLink gBoolean Boolean +HiLink gFloat Float +HiLink gCommands Repeat +HiLink gGenrFunc Type +HiLink gDelimiter Delimiter +HiLink gError Error +HiLink gBraceError Error +HiLink gCurlyError Error +HiLink gParenError Error +HiLink gIdentifier Normal +HiLink gVariable Identifier +HiLink gArrow Repeat +delcommand HiLink let b:current_syntax="gretl" diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim index dc3967772..84e3779e7 100644 --- a/runtime/syntax/groovy.vim +++ b/runtime/syntax/groovy.vim @@ -44,11 +44,9 @@ " Let me know if you like it or send me patches, so that I can improve it " when I have time -" Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif " we define it here so that included files can test for it @@ -59,11 +57,7 @@ let s:cpo_save = &cpo set cpo&vim " don't use standard HiLink, it will not work with included syntax files -if version < 508 - command! -nargs=+ GroovyHiLink hi link <args> -else - command! -nargs=+ GroovyHiLink hi def link <args> -endif +command! -nargs=+ GroovyHiLink hi def link <args> " ########################## " Java stuff taken from java.vim @@ -329,23 +323,21 @@ if exists("groovy_highlight_debug") syn cluster groovyTop add=groovyDebug - if version >= 508 || !exists("did_c_syn_inits") - GroovyHiLink groovyDebug Debug - GroovyHiLink groovyDebugString DebugString - GroovyHiLink groovyDebugStringError groovyError - GroovyHiLink groovyDebugType DebugType - GroovyHiLink groovyDebugBoolean DebugBoolean - GroovyHiLink groovyDebugNumber Debug - GroovyHiLink groovyDebugSpecial DebugSpecial - GroovyHiLink groovyDebugSpecialCharacter DebugSpecial - GroovyHiLink groovyDebugCharacter DebugString - GroovyHiLink groovyDebugParen Debug - - GroovyHiLink DebugString String - GroovyHiLink DebugSpecial Special - GroovyHiLink DebugBoolean Boolean - GroovyHiLink DebugType Type - endif + GroovyHiLink groovyDebug Debug + GroovyHiLink groovyDebugString DebugString + GroovyHiLink groovyDebugStringError groovyError + GroovyHiLink groovyDebugType DebugType + GroovyHiLink groovyDebugBoolean DebugBoolean + GroovyHiLink groovyDebugNumber Debug + GroovyHiLink groovyDebugSpecial DebugSpecial + GroovyHiLink groovyDebugSpecialCharacter DebugSpecial + GroovyHiLink groovyDebugCharacter DebugString + GroovyHiLink groovyDebugParen Debug + + GroovyHiLink DebugString String + GroovyHiLink DebugSpecial Special + GroovyHiLink DebugBoolean Boolean + GroovyHiLink DebugType Type endif " Match all Exception classes @@ -398,59 +390,54 @@ syn match groovyParenError "\]" " ############################### " java.vim default highlighting -if version >= 508 || !exists("did_groovy_syn_inits") - if version < 508 - let did_groovy_syn_inits = 1 - endif - GroovyHiLink groovyFuncDef Function - GroovyHiLink groovyBraces Function - GroovyHiLink groovyBranch Conditional - GroovyHiLink groovyUserLabelRef groovyUserLabel - GroovyHiLink groovyLabel Label - GroovyHiLink groovyUserLabel Label - GroovyHiLink groovyConditional Conditional - GroovyHiLink groovyRepeat Repeat - GroovyHiLink groovyExceptions Exception - GroovyHiLink groovyAssert Statement - GroovyHiLink groovyStorageClass StorageClass - GroovyHiLink groovyMethodDecl groovyStorageClass - GroovyHiLink groovyClassDecl groovyStorageClass - GroovyHiLink groovyScopeDecl groovyStorageClass - GroovyHiLink groovyBoolean Boolean - GroovyHiLink groovySpecial Special - GroovyHiLink groovySpecialError Error - GroovyHiLink groovySpecialCharError Error - GroovyHiLink groovyString String - GroovyHiLink groovyRegexChar String - GroovyHiLink groovyCharacter Character - GroovyHiLink groovySpecialChar SpecialChar - GroovyHiLink groovyNumber Number - GroovyHiLink groovyError Error - GroovyHiLink groovyStringError Error - GroovyHiLink groovyStatement Statement - GroovyHiLink groovyOperator Operator - GroovyHiLink groovyComment Comment - GroovyHiLink groovyDocComment Comment - GroovyHiLink groovyLineComment Comment - GroovyHiLink groovyConstant Constant - GroovyHiLink groovyTypedef Typedef - GroovyHiLink groovyTodo Todo - - GroovyHiLink groovyCommentTitle SpecialComment - GroovyHiLink groovyDocTags Special - GroovyHiLink groovyDocParam Function - GroovyHiLink groovyCommentStar groovyComment - - GroovyHiLink groovyType Type - GroovyHiLink groovyExternal Include - - GroovyHiLink htmlComment Special - GroovyHiLink htmlCommentPart Special - GroovyHiLink groovySpaceError Error - GroovyHiLink groovyJDKBuiltin Special - GroovyHiLink groovyJDKOperOverl Operator - GroovyHiLink groovyJDKMethods Function -endif +GroovyHiLink groovyFuncDef Function +GroovyHiLink groovyBraces Function +GroovyHiLink groovyBranch Conditional +GroovyHiLink groovyUserLabelRef groovyUserLabel +GroovyHiLink groovyLabel Label +GroovyHiLink groovyUserLabel Label +GroovyHiLink groovyConditional Conditional +GroovyHiLink groovyRepeat Repeat +GroovyHiLink groovyExceptions Exception +GroovyHiLink groovyAssert Statement +GroovyHiLink groovyStorageClass StorageClass +GroovyHiLink groovyMethodDecl groovyStorageClass +GroovyHiLink groovyClassDecl groovyStorageClass +GroovyHiLink groovyScopeDecl groovyStorageClass +GroovyHiLink groovyBoolean Boolean +GroovyHiLink groovySpecial Special +GroovyHiLink groovySpecialError Error +GroovyHiLink groovySpecialCharError Error +GroovyHiLink groovyString String +GroovyHiLink groovyRegexChar String +GroovyHiLink groovyCharacter Character +GroovyHiLink groovySpecialChar SpecialChar +GroovyHiLink groovyNumber Number +GroovyHiLink groovyError Error +GroovyHiLink groovyStringError Error +GroovyHiLink groovyStatement Statement +GroovyHiLink groovyOperator Operator +GroovyHiLink groovyComment Comment +GroovyHiLink groovyDocComment Comment +GroovyHiLink groovyLineComment Comment +GroovyHiLink groovyConstant Constant +GroovyHiLink groovyTypedef Typedef +GroovyHiLink groovyTodo Todo + +GroovyHiLink groovyCommentTitle SpecialComment +GroovyHiLink groovyDocTags Special +GroovyHiLink groovyDocParam Function +GroovyHiLink groovyCommentStar groovyComment + +GroovyHiLink groovyType Type +GroovyHiLink groovyExternal Include + +GroovyHiLink htmlComment Special +GroovyHiLink htmlCommentPart Special +GroovyHiLink groovySpaceError Error +GroovyHiLink groovyJDKBuiltin Special +GroovyHiLink groovyJDKOperOverl Operator +GroovyHiLink groovyJDKMethods Function delcommand GroovyHiLink diff --git a/runtime/syntax/gsp.vim b/runtime/syntax/gsp.vim index e7b1b1632..6270b2af6 100644 --- a/runtime/syntax/gsp.vim +++ b/runtime/syntax/gsp.vim @@ -5,11 +5,8 @@ " Filenames: *.gsp " URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -18,21 +15,13 @@ if !exists("main_syntax") endif " Source HTML syntax -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax syn case match " Include Java syntax -if version < 600 - syn include @gspJava <sfile>:p:h/java.vim -else - syn include @gspJava syntax/java.vim -endif +syn include @gspJava syntax/java.vim let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/syntax/gtkrc.vim b/runtime/syntax/gtkrc.vim index 57054a21d..e3a555006 100644 --- a/runtime/syntax/gtkrc.vim +++ b/runtime/syntax/gtkrc.vim @@ -6,19 +6,12 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/gtkrc.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 syn case match @@ -86,57 +79,50 @@ syn sync minlines=50 syn sync match gtkrcSyncClass groupthere NONE "^\s*class\>" " Define the default highlighting -if version >= 508 || !exists("did_gtkrc_syntax_inits") - if version < 508 - let did_gtkrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink gtkrcComment Comment - HiLink gtkrcFixme Todo - - HiLink gtkrcInclude Preproc - - HiLink gtkrcACString gtkrcString - HiLink gtkrcBString gtkrcString - HiLink gtkrcString String - HiLink gtkrcNumber Number - HiLink gtkrcStateName gtkrcConstant - HiLink gtkrcPriorityName gtkrcConstant - HiLink gtkrcTextDirName gtkrcConstant - HiLink gtkrcSettingsName Function - HiLink gtkrcStockName Function - HiLink gtkrcConstant Constant - - HiLink gtkrcPathSpecial gtkrcSpecial - HiLink gtkrcWPathSpecial gtkrcSpecial - HiLink gtkrcRGBColor gtkrcSpecial - HiLink gtkrcKeyMod gtkrcSpecial - HiLink gtkrcSpecial Special - - HiLink gtkrcTop gtkrcKeyword - HiLink gtkrcPathSet gtkrcKeyword - HiLink gtkrcStyleKeyword gtkrcKeyword - HiLink gtkrcFunction gtkrcKeyword - HiLink gtkrcBind gtkrcKeyword - HiLink gtkrcKeyword Keyword - - HiLink gtkrcClassNameGnome gtkrcGtkClass - HiLink gtkrcClassName gtkrcGtkClass - HiLink gtkrcFunctionName gtkrcGtkClass - HiLink gtkrcGtkClass Type - - HiLink gtkrcImage gtkrcOtherword - HiLink gtkrcOtherword Function - - HiLink gtkrcParenError gtkrcError - HiLink gtkrcBraceError gtkrcError - HiLink gtkrcBracketError gtkrcError - HiLink gtkrcError Error - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink gtkrcComment Comment +HiLink gtkrcFixme Todo + +HiLink gtkrcInclude Preproc + +HiLink gtkrcACString gtkrcString +HiLink gtkrcBString gtkrcString +HiLink gtkrcString String +HiLink gtkrcNumber Number +HiLink gtkrcStateName gtkrcConstant +HiLink gtkrcPriorityName gtkrcConstant +HiLink gtkrcTextDirName gtkrcConstant +HiLink gtkrcSettingsName Function +HiLink gtkrcStockName Function +HiLink gtkrcConstant Constant + +HiLink gtkrcPathSpecial gtkrcSpecial +HiLink gtkrcWPathSpecial gtkrcSpecial +HiLink gtkrcRGBColor gtkrcSpecial +HiLink gtkrcKeyMod gtkrcSpecial +HiLink gtkrcSpecial Special + +HiLink gtkrcTop gtkrcKeyword +HiLink gtkrcPathSet gtkrcKeyword +HiLink gtkrcStyleKeyword gtkrcKeyword +HiLink gtkrcFunction gtkrcKeyword +HiLink gtkrcBind gtkrcKeyword +HiLink gtkrcKeyword Keyword + +HiLink gtkrcClassNameGnome gtkrcGtkClass +HiLink gtkrcClassName gtkrcGtkClass +HiLink gtkrcFunctionName gtkrcGtkClass +HiLink gtkrcGtkClass Type + +HiLink gtkrcImage gtkrcOtherword +HiLink gtkrcOtherword Function + +HiLink gtkrcParenError gtkrcError +HiLink gtkrcBraceError gtkrcError +HiLink gtkrcBracketError gtkrcError +HiLink gtkrcError Error + +delcommand HiLink let b:current_syntax = "gtkrc" diff --git a/runtime/syntax/haml.vim b/runtime/syntax/haml.vim index bf7a07363..5369695c2 100644 --- a/runtime/syntax/haml.vim +++ b/runtime/syntax/haml.vim @@ -2,7 +2,7 @@ " Language: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.haml -" Last Change: 2010 Aug 09 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -67,7 +67,7 @@ syn region hamlJavascriptFilter matchgroup=hamlFilter start="^\z(\s*\):javascri syn region hamlCSSFilter matchgroup=hamlFilter start="^\z(\s*\):css\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlCss,hamlInterpolation keepend syn region hamlSassFilter matchgroup=hamlFilter start="^\z(\s*\):sass\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlSassTop -syn region hamlJavascriptBlock start="^\z(\s*\)%script" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlJavaScript keepend +syn region hamlJavascriptBlock start="^\z(\s*\)%script\%((type=[\"']text/javascript[\"'])\)\=\s*$" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlJavaScript keepend syn region hamlCssBlock start="^\z(\s*\)%style" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlCss keepend syn match hamlError "\$" contained diff --git a/runtime/syntax/hamster.vim b/runtime/syntax/hamster.vim index bd52300ca..f9aada251 100644 --- a/runtime/syntax/hamster.vim +++ b/runtime/syntax/hamster.vim @@ -12,10 +12,8 @@ " for news and mail, a build-in script language, the GUI allows translation to " other languages, it can be used in a network and that's not all features... " -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -358,24 +356,16 @@ syn cluster hamsterComment contains=hamsterHashComment syn sync ccomment hamsterHashComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_hamster_syn_inits") - if version < 508 - let did_hamster_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink hamsterHashComment Comment - HiLink hamsterSpecial Special - HiLink hamsterStatement Statement - HiLink hamsterString String - HiLink hamsterFunction Function +HiLink hamsterHashComment Comment +HiLink hamsterSpecial Special +HiLink hamsterStatement Statement +HiLink hamsterString String +HiLink hamsterFunction Function - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "hamster" diff --git a/runtime/syntax/haskell.vim b/runtime/syntax/haskell.vim index 8afca048c..86d554ba3 100644 --- a/runtime/syntax/haskell.vim +++ b/runtime/syntax/haskell.vim @@ -32,10 +32,8 @@ " to attribution of work. " 2008 Dec 15: Added comments as contained element in import statements -" Remove any old syntax stuff hanging around -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -127,67 +125,59 @@ syntax match cCommentStartError display "/\*"me=e-1 contained syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_hs_syntax_inits") - if version < 508 - let did_hs_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink hsModule hsStructure - HiLink hsImport Include - HiLink hsImportMod hsImport - HiLink hsInfix PreProc - HiLink hsStructure Structure - HiLink hsStatement Statement - HiLink hsConditional Conditional - HiLink hsSpecialChar SpecialChar - HiLink hsTypedef Typedef - HiLink hsVarSym hsOperator - HiLink hsConSym hsOperator - HiLink hsOperator Operator - if exists("hs_highlight_delimiters") - " Some people find this highlighting distracting. - HiLink hsDelimiter Delimiter - endif - HiLink hsSpecialCharError Error - HiLink hsString String - HiLink hsCharacter Character - HiLink hsNumber Number - HiLink hsFloat Float - HiLink hsConditional Conditional - HiLink hsLiterateComment hsComment - HiLink hsBlockComment hsComment - HiLink hsLineComment hsComment - HiLink hsComment Comment - HiLink hsPragma SpecialComment - HiLink hsBoolean Boolean - HiLink hsType Type - HiLink hsMaybe hsEnumConst - HiLink hsOrdering hsEnumConst - HiLink hsEnumConst Constant - HiLink hsDebug Debug - - HiLink cCppString hsString - HiLink cCommentStart hsComment - HiLink cCommentError hsError - HiLink cCommentStartError hsError - HiLink cInclude Include - HiLink cPreProc PreProc - HiLink cDefine Macro - HiLink cIncluded hsString - HiLink cError Error - HiLink cPreCondit PreCondit - HiLink cComment Comment - HiLink cCppSkip cCppOut - HiLink cCppOut2 cCppOut - HiLink cCppOut Comment - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink hsModule hsStructure +HiLink hsImport Include +HiLink hsImportMod hsImport +HiLink hsInfix PreProc +HiLink hsStructure Structure +HiLink hsStatement Statement +HiLink hsConditional Conditional +HiLink hsSpecialChar SpecialChar +HiLink hsTypedef Typedef +HiLink hsVarSym hsOperator +HiLink hsConSym hsOperator +HiLink hsOperator Operator +if exists("hs_highlight_delimiters") +" Some people find this highlighting distracting. +HiLink hsDelimiter Delimiter endif +HiLink hsSpecialCharError Error +HiLink hsString String +HiLink hsCharacter Character +HiLink hsNumber Number +HiLink hsFloat Float +HiLink hsConditional Conditional +HiLink hsLiterateComment hsComment +HiLink hsBlockComment hsComment +HiLink hsLineComment hsComment +HiLink hsComment Comment +HiLink hsPragma SpecialComment +HiLink hsBoolean Boolean +HiLink hsType Type +HiLink hsMaybe hsEnumConst +HiLink hsOrdering hsEnumConst +HiLink hsEnumConst Constant +HiLink hsDebug Debug + +HiLink cCppString hsString +HiLink cCommentStart hsComment +HiLink cCommentError hsError +HiLink cCommentStartError hsError +HiLink cInclude Include +HiLink cPreProc PreProc +HiLink cDefine Macro +HiLink cIncluded hsString +HiLink cError Error +HiLink cPreCondit PreCondit +HiLink cComment Comment +HiLink cCppSkip cCppOut +HiLink cCppOut2 cCppOut +HiLink cCppOut Comment + +delcommand HiLink let b:current_syntax = "haskell" diff --git a/runtime/syntax/haste.vim b/runtime/syntax/haste.vim index b889c5c59..79e9f5ec5 100644 --- a/runtime/syntax/haste.vim +++ b/runtime/syntax/haste.vim @@ -12,11 +12,8 @@ if exists("b:current_syntax") finish endif -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/hastepreproc.vim b/runtime/syntax/hastepreproc.vim index 3fcb8ddd3..f08bf3fbf 100644 --- a/runtime/syntax/hastepreproc.vim +++ b/runtime/syntax/hastepreproc.vim @@ -5,24 +5,13 @@ " files " Version: 0.5 -" HASTE +" quit when a syntax file was already loaded if exists("b:current_syntax") - finish -endif -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") finish endif -" Read the C syntax to start with -if version < 600 - so <sfile>:p:h/haste.vim -else - runtime! syntax/haste.vim - unlet b:current_syntax -endif +" Read the haste syntax to start with +runtime! syntax/haste.vim +unlet b:current_syntax " case is significant syn case match diff --git a/runtime/syntax/hb.vim b/runtime/syntax/hb.vim index d4de3ff1e..ab2fb7fba 100644 --- a/runtime/syntax/hb.vim +++ b/runtime/syntax/hb.vim @@ -4,11 +4,8 @@ " URL: http://bachue.com/hb/vim/syntax/hb.vim " Last Change: 2012 Jan 08 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -63,31 +60,23 @@ syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ syn match HBComment "^#.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_hb_syntax_inits") - if version < 508 - let did_hb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink HBhtmlString String - HiLink HBhtmlTagN Function - HiLink htmlSpecialChar String - - HiLink HBInvalidLine Error - HiLink HBFoobar Comment - hi HBFileName guibg=lightgray guifg=black - HiLink HBDirectiveError Error - HiLink HBDirectiveBlockEnd HBDirectiveKeyword - hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen - HiLink HBComment Comment - HiLink HBhtmlTagSk Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink HBhtmlString String +HiLink HBhtmlTagN Function +HiLink htmlSpecialChar String + +HiLink HBInvalidLine Error +HiLink HBFoobar Comment +hi HBFileName guibg=lightgray guifg=black +HiLink HBDirectiveError Error +HiLink HBDirectiveBlockEnd HBDirectiveKeyword +hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen +HiLink HBComment Comment +HiLink HBhtmlTagSk Statement + +delcommand HiLink syn sync match Normal grouphere NONE "^:\s*$" syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$" diff --git a/runtime/syntax/hercules.vim b/runtime/syntax/hercules.vim index 02d8e9bb7..2a786768d 100644 --- a/runtime/syntax/hercules.vim +++ b/runtime/syntax/hercules.vim @@ -7,11 +7,8 @@ " that an IC's physical design matches its logical design and " satisfies manufacturing rules. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -101,32 +98,23 @@ syn match herculesOutput "error\s*=\s*(.*)" syn sync lines=100 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_hercules_syntax_inits") - if version < 508 - let did_hercules_syntax_inits = 1 - " Default methods for highlighting. - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink herculesStatement Statement - HiLink herculesType Type - HiLink herculesComment Comment - HiLink herculesPreProc PreProc - HiLink herculesTodo Todo - HiLink herculesOutput Include - HiLink herculesCmdCmnt Identifier - HiLink herculesNumber Number - HiLink herculesBraceError herculesError - HiLink herculesCurlyError herculesError - HiLink herculesParenError herculesError - HiLink herculesError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink herculesStatement Statement +HiLink herculesType Type +HiLink herculesComment Comment +HiLink herculesPreProc PreProc +HiLink herculesTodo Todo +HiLink herculesOutput Include +HiLink herculesCmdCmnt Identifier +HiLink herculesNumber Number +HiLink herculesBraceError herculesError +HiLink herculesCurlyError herculesError +HiLink herculesParenError herculesError +HiLink herculesError Error + +delcommand HiLink let b:current_syntax = "hercules" diff --git a/runtime/syntax/hex.vim b/runtime/syntax/hex.vim index 40f7f0dd1..d2637eaae 100644 --- a/runtime/syntax/hex.vim +++ b/runtime/syntax/hex.vim @@ -25,11 +25,8 @@ " States in parentheses in the upper format description indicate that they " should not appear in a valid file. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -68,34 +65,26 @@ syn match hexChecksum "[0-9a-fA-F]\{2}$" contained syn region hexExtAdrBlock start="^:[0-9a-fA-F]\{7}[24]" skip="^:[0-9a-fA-F]\{7}0" end="^:"me=s-1 fold transparent " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_hex_syntax_inits") - if version < 508 - let did_hex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " The default methods for highlighting. Can be overridden later - HiLink hexRecStart hexRecType - HiLink hexDataByteCount Constant - hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic - HiLink hexDataAddress Comment - HiLink hexNoAddress DiffAdd - HiLink hexRecTypeUnknown hexRecType - HiLink hexRecType WarningMsg - hi def hexDataFieldUnknown term=italic cterm=italic gui=italic - hi def hexDataOdd term=bold cterm=bold gui=bold - hi def hexDataEven term=NONE cterm=NONE gui=NONE - HiLink hexDataUnexpected Error - HiLink hexExtendedAddress hexDataAddress - HiLink hexStartAddress hexDataAddress - HiLink hexChecksum DiffChange +" The default methods for highlighting. Can be overridden later +HiLink hexRecStart hexRecType +HiLink hexDataByteCount Constant +hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic +HiLink hexDataAddress Comment +HiLink hexNoAddress DiffAdd +HiLink hexRecTypeUnknown hexRecType +HiLink hexRecType WarningMsg +hi def hexDataFieldUnknown term=italic cterm=italic gui=italic +hi def hexDataOdd term=bold cterm=bold gui=bold +hi def hexDataEven term=NONE cterm=NONE gui=NONE +HiLink hexDataUnexpected Error +HiLink hexExtendedAddress hexDataAddress +HiLink hexStartAddress hexDataAddress +HiLink hexChecksum DiffChange - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "hex" diff --git a/runtime/syntax/hog.vim b/runtime/syntax/hog.vim index f37f7ae89..720681520 100644 --- a/runtime/syntax/hog.vim +++ b/runtime/syntax/hog.vim @@ -4,9 +4,8 @@ " Last Change: 2015 Oct 24 -> Rename syntax items from Snort -> Hog " 2012 Oct 24 -> Originalish release -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/hostsaccess.vim b/runtime/syntax/hostsaccess.vim index 8a9f02eff..7201816f4 100644 --- a/runtime/syntax/hostsaccess.vim +++ b/runtime/syntax/hostsaccess.vim @@ -15,12 +15,8 @@ if exists("b:current_syntax") endif " For a starter we just use conf.vim for highlighting -if version < 600 - so <sfile>:p:h/conf.vim -else - runtime! syntax/conf.vim - unlet b:current_syntax -endif +runtime! syntax/conf.vim +unlet b:current_syntax let b:current_syntax = "hostsaccess" diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index ab1f9b3c1..ac31e4848 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -7,12 +7,9 @@ " Please check :help html.vim for some comments and a description of the options -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif let main_syntax = 'html' @@ -22,11 +19,7 @@ let s:cpo_save = &cpo set cpo&vim " don't use standard HiLink, it will not work with included syntax files -if version < 508 - command! -nargs=+ HtmlHiLink hi link <args> -else - command! -nargs=+ HtmlHiLink hi def link <args> -endif +command! -nargs=+ HtmlHiLink hi def link <args> syntax spell toplevel @@ -221,72 +214,67 @@ if main_syntax == "html" endif " The default highlighting. -if version >= 508 || !exists("did_html_syn_inits") - if version < 508 - let did_html_syn_inits = 1 - endif - HtmlHiLink htmlTag Function - HtmlHiLink htmlEndTag Identifier - HtmlHiLink htmlArg Type - HtmlHiLink htmlTagName htmlStatement - HtmlHiLink htmlSpecialTagName Exception - HtmlHiLink htmlValue String - HtmlHiLink htmlSpecialChar Special - - if !exists("html_no_rendering") - HtmlHiLink htmlH1 Title - HtmlHiLink htmlH2 htmlH1 - HtmlHiLink htmlH3 htmlH2 - HtmlHiLink htmlH4 htmlH3 - HtmlHiLink htmlH5 htmlH4 - HtmlHiLink htmlH6 htmlH5 - HtmlHiLink htmlHead PreProc - HtmlHiLink htmlTitle Title - HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic - HtmlHiLink htmlUnderlineBold htmlBoldUnderline - HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic - HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic - HtmlHiLink htmlItalicUnderline htmlUnderlineItalic - HtmlHiLink htmlItalicBold htmlBoldItalic - HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic - HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic - HtmlHiLink htmlLink Underlined - HtmlHiLink htmlLeadingSpace None - if !exists("html_my_rendering") - hi def htmlBold term=bold cterm=bold gui=bold - hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline - hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic - hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline - hi def htmlUnderline term=underline cterm=underline gui=underline - hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline - hi def htmlItalic term=italic cterm=italic gui=italic - endif +HtmlHiLink htmlTag Function +HtmlHiLink htmlEndTag Identifier +HtmlHiLink htmlArg Type +HtmlHiLink htmlTagName htmlStatement +HtmlHiLink htmlSpecialTagName Exception +HtmlHiLink htmlValue String +HtmlHiLink htmlSpecialChar Special + +if !exists("html_no_rendering") + HtmlHiLink htmlH1 Title + HtmlHiLink htmlH2 htmlH1 + HtmlHiLink htmlH3 htmlH2 + HtmlHiLink htmlH4 htmlH3 + HtmlHiLink htmlH5 htmlH4 + HtmlHiLink htmlH6 htmlH5 + HtmlHiLink htmlHead PreProc + HtmlHiLink htmlTitle Title + HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBold htmlBoldUnderline + HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderline htmlUnderlineItalic + HtmlHiLink htmlItalicBold htmlBoldItalic + HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic + HtmlHiLink htmlLink Underlined + HtmlHiLink htmlLeadingSpace None + if !exists("html_my_rendering") + hi def htmlBold term=bold cterm=bold gui=bold + hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline + hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline + hi def htmlUnderline term=underline cterm=underline gui=underline + hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline + hi def htmlItalic term=italic cterm=italic gui=italic endif - - HtmlHiLink htmlPreStmt PreProc - HtmlHiLink htmlPreError Error - HtmlHiLink htmlPreProc PreProc - HtmlHiLink htmlPreAttr String - HtmlHiLink htmlPreProcAttrName PreProc - HtmlHiLink htmlPreProcAttrError Error - HtmlHiLink htmlSpecial Special - HtmlHiLink htmlSpecialChar Special - HtmlHiLink htmlString String - HtmlHiLink htmlStatement Statement - HtmlHiLink htmlComment Comment - HtmlHiLink htmlCommentPart Comment - HtmlHiLink htmlValue String - HtmlHiLink htmlCommentError htmlError - HtmlHiLink htmlTagError htmlError - HtmlHiLink htmlEvent javaScript - HtmlHiLink htmlError Error - - HtmlHiLink javaScript Special - HtmlHiLink javaScriptExpression javaScript - HtmlHiLink htmlCssStyleComment Comment - HtmlHiLink htmlCssDefinition Special endif +HtmlHiLink htmlPreStmt PreProc +HtmlHiLink htmlPreError Error +HtmlHiLink htmlPreProc PreProc +HtmlHiLink htmlPreAttr String +HtmlHiLink htmlPreProcAttrName PreProc +HtmlHiLink htmlPreProcAttrError Error +HtmlHiLink htmlSpecial Special +HtmlHiLink htmlSpecialChar Special +HtmlHiLink htmlString String +HtmlHiLink htmlStatement Statement +HtmlHiLink htmlComment Comment +HtmlHiLink htmlCommentPart Comment +HtmlHiLink htmlValue String +HtmlHiLink htmlCommentError htmlError +HtmlHiLink htmlTagError htmlError +HtmlHiLink htmlEvent javaScript +HtmlHiLink htmlError Error + +HtmlHiLink javaScript Special +HtmlHiLink javaScriptExpression javaScript +HtmlHiLink htmlCssStyleComment Comment +HtmlHiLink htmlCssDefinition Special + delcommand HtmlHiLink let b:current_syntax = "html" diff --git a/runtime/syntax/htmlcheetah.vim b/runtime/syntax/htmlcheetah.vim index f57df90de..0721c76b4 100644 --- a/runtime/syntax/htmlcheetah.vim +++ b/runtime/syntax/htmlcheetah.vim @@ -3,11 +3,8 @@ " Maintainer: Max Ischenko <mfi@ukr.net> " Last Change: 2003-05-11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -15,14 +12,9 @@ if !exists("main_syntax") let main_syntax = 'html' endif -if version < 600 - so <sfile>:p:h/cheetah.vim - so <sfile>:p:h/html.vim -else - runtime! syntax/cheetah.vim - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/cheetah.vim +runtime! syntax/html.vim +unlet b:current_syntax syntax cluster htmlPreproc add=cheetahPlaceHolder syntax cluster htmlString add=cheetahPlaceHolder diff --git a/runtime/syntax/htmldjango.vim b/runtime/syntax/htmldjango.vim index 58afd1b62..07b1c375e 100644 --- a/runtime/syntax/htmldjango.vim +++ b/runtime/syntax/htmldjango.vim @@ -3,11 +3,8 @@ " Maintainer: Dave Hodder <dmh@dmh.org.uk> " Last Change: 2014 Jul 13 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -15,14 +12,9 @@ if !exists("main_syntax") let main_syntax = 'html' endif -if version < 600 - so <sfile>:p:h/django.vim - so <sfile>:p:h/html.vim -else - runtime! syntax/django.vim - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/django.vim +runtime! syntax/html.vim +unlet b:current_syntax syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock diff --git a/runtime/syntax/htmlm4.vim b/runtime/syntax/htmlm4.vim index 3119d2d1a..ee1f06e5f 100644 --- a/runtime/syntax/htmlm4.vim +++ b/runtime/syntax/htmlm4.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/htmlm4.vim " Last Change: 2001 Apr 30 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -17,19 +14,12 @@ if !exists("main_syntax") let main_syntax='htmlm4' endif -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax syn case match -if version < 600 - so <sfile>:p:h/m4.vim -else - runtime! syntax/m4.vim -endif +runtime! syntax/m4.vim + unlet b:current_syntax syn cluster htmlPreproc add=@m4Top syn cluster m4StringContents add=htmlTag,htmlEndTag diff --git a/runtime/syntax/htmlos.vim b/runtime/syntax/htmlos.vim index f31b9f654..530c046ba 100644 --- a/runtime/syntax/htmlos.vim +++ b/runtime/syntax/htmlos.vim @@ -6,11 +6,8 @@ " Last Change: 2003 May 11 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -18,12 +15,8 @@ if !exists("main_syntax") let main_syntax = 'htmlos' endif -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreproc add=htmlosRegion @@ -121,42 +114,34 @@ else endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_htmlos_syn_inits") - if version < 508 - let did_htmlos_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink htmlosSpecialIdentifier Operator - HiLink htmlosIdentifier Identifier - HiLink htmlosStorageClass StorageClass - HiLink htmlosComment Comment - HiLink htmlosBoolean Boolean - HiLink htmlosStringSingle String - HiLink htmlosStringDouble String - HiLink htmlosNumber Number - HiLink htmlosFloat Float - HiLink htmlosFunctions Function - HiLink htmlosRepeat Repeat - HiLink htmlosConditional Conditional - HiLink htmlosLabel Label - HiLink htmlosStatement Statement - HiLink htmlosKeyword Statement - HiLink htmlosType Type - HiLink htmlosDefine Define - HiLink htmlosParent Delimiter - HiLink htmlosError Error - HiLink htmlosTodo Todo - HiLink htmlosOperator Operator - HiLink htmlosRelation Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink htmlosSpecialIdentifier Operator +HiLink htmlosIdentifier Identifier +HiLink htmlosStorageClass StorageClass +HiLink htmlosComment Comment +HiLink htmlosBoolean Boolean +HiLink htmlosStringSingle String +HiLink htmlosStringDouble String +HiLink htmlosNumber Number +HiLink htmlosFloat Float +HiLink htmlosFunctions Function +HiLink htmlosRepeat Repeat +HiLink htmlosConditional Conditional +HiLink htmlosLabel Label +HiLink htmlosStatement Statement +HiLink htmlosKeyword Statement +HiLink htmlosType Type +HiLink htmlosDefine Define +HiLink htmlosParent Delimiter +HiLink htmlosError Error +HiLink htmlosTodo Todo +HiLink htmlosOperator Operator +HiLink htmlosRelation Operator + +delcommand HiLink let b:current_syntax = "htmlos" if main_syntax == 'htmlos' diff --git a/runtime/syntax/ia64.vim b/runtime/syntax/ia64.vim index f0d510b94..8cc9ade83 100644 --- a/runtime/syntax/ia64.vim +++ b/runtime/syntax/ia64.vim @@ -6,11 +6,8 @@ " File Version: 0.7 " Last Change: 2006 Sep 08 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -19,11 +16,7 @@ endif syn case ignore " Identifier Keyword characters (defines \k) -if version >= 600 - setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ -else - set iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ -endif +setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ syn sync minlines=5 @@ -268,43 +261,35 @@ syn match ia64data "real\([48]\|1[06]\)\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\ syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ia64_syn_inits") - if version < 508 - let did_ia64_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - "put masm groups with our groups - HiLink masmOperator ia64operator - HiLink masmDirective ia64Directive - HiLink masmOpcode ia64Opcode - HiLink masmIdentifier ia64Identifier - HiLink masmFloat ia64Float +"put masm groups with our groups +HiLink masmOperator ia64operator +HiLink masmDirective ia64Directive +HiLink masmOpcode ia64Opcode +HiLink masmIdentifier ia64Identifier +HiLink masmFloat ia64Float - "ia64 specific stuff - HiLink ia64Label Define - HiLink ia64Comment Comment - HiLink ia64Directive Type - HiLink ia64opcode Statement - HiLink ia64registers Operator - HiLink ia64string String - HiLink ia64Hex Number - HiLink ia64Binary Number - HiLink ia64Octal Number - HiLink ia64Float Float - HiLink ia64Decimal Number - HiLink ia64Identifier Identifier - HiLink ia64data Type - HiLink ia64delimiter Delimiter - HiLink ia64operator Operator - HiLink ia64Todo Todo +"ia64 specific stuff +HiLink ia64Label Define +HiLink ia64Comment Comment +HiLink ia64Directive Type +HiLink ia64opcode Statement +HiLink ia64registers Operator +HiLink ia64string String +HiLink ia64Hex Number +HiLink ia64Binary Number +HiLink ia64Octal Number +HiLink ia64Float Float +HiLink ia64Decimal Number +HiLink ia64Identifier Identifier +HiLink ia64data Type +HiLink ia64delimiter Delimiter +HiLink ia64operator Operator +HiLink ia64Todo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "ia64" diff --git a/runtime/syntax/icemenu.vim b/runtime/syntax/icemenu.vim index d3a733d57..6513287df 100644 --- a/runtime/syntax/icemenu.vim +++ b/runtime/syntax/icemenu.vim @@ -6,10 +6,8 @@ " Comment: Icewm is a lightweight window manager. This adds syntax " highlighting when editing your user's menu file (~/.icewm/menu). -" clear existing syntax -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/icon.vim b/runtime/syntax/icon.vim index 1a73c43d8..1bd12d322 100644 --- a/runtime/syntax/icon.vim +++ b/runtime/syntax/icon.vim @@ -4,11 +4,8 @@ " URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim " Last Change: 2003 May 11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -157,56 +154,48 @@ exec "syn sync ccomment iconComment minlines=" . icon_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting -if version >= 508 || !exists("did_icon_syn_inits") - if version < 508 - let did_icon_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - - " HiLink iconSpecialCharacter iconSpecial - - HiLink iconOctalError iconError - HiLink iconParenError iconError - HiLink iconInParen iconError - HiLink iconCommentError iconError - HiLink iconSpaceError iconError - HiLink iconCommentError iconError - HiLink iconIncluded iconString - HiLink iconCommentString iconString - HiLink iconComment2String iconString - HiLink iconCommentSkip iconComment - - HiLink iconUserLabel Label - HiLink iconCharacter Character - HiLink iconNumber Number - HiLink iconRadix Number - HiLink iconFloat Float - HiLink iconInclude Include - HiLink iconPreProc PreProc - HiLink iconDefine Macro - HiLink iconError Error - HiLink iconStatement Statement - HiLink iconPreCondit PreCondit - HiLink iconString String - HiLink iconCset String - HiLink iconComment Comment - HiLink iconSpecial SpecialChar - HiLink iconTodo Todo - HiLink iconStorageClass StorageClass - HiLink iconFunction Statement - HiLink iconReserved Label - HiLink iconKeyword Operator - - "HiLink iconIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later + +" HiLink iconSpecialCharacter iconSpecial + +HiLink iconOctalError iconError +HiLink iconParenError iconError +HiLink iconInParen iconError +HiLink iconCommentError iconError +HiLink iconSpaceError iconError +HiLink iconCommentError iconError +HiLink iconIncluded iconString +HiLink iconCommentString iconString +HiLink iconComment2String iconString +HiLink iconCommentSkip iconComment + +HiLink iconUserLabel Label +HiLink iconCharacter Character +HiLink iconNumber Number +HiLink iconRadix Number +HiLink iconFloat Float +HiLink iconInclude Include +HiLink iconPreProc PreProc +HiLink iconDefine Macro +HiLink iconError Error +HiLink iconStatement Statement +HiLink iconPreCondit PreCondit +HiLink iconString String +HiLink iconCset String +HiLink iconComment Comment +HiLink iconSpecial SpecialChar +HiLink iconTodo Todo +HiLink iconStorageClass StorageClass +HiLink iconFunction Statement +HiLink iconReserved Label +HiLink iconKeyword Operator + +"HiLink iconIdentifier Identifier + +delcommand HiLink let b:current_syntax = "icon" diff --git a/runtime/syntax/idlang.vim b/runtime/syntax/idlang.vim index 670d080a7..6d639c9fa 100644 --- a/runtime/syntax/idlang.vim +++ b/runtime/syntax/idlang.vim @@ -4,11 +4,8 @@ " Created by: Hermann Rochholz <Hermann.Rochholz AT gmx.de> " Remove any old syntax stuff hanging around -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -219,35 +216,27 @@ syn keyword idlangRoutine XSQ_TEST XSURFACE XVAREDIT XVOLUME XVOLUME_ROTATE syn keyword idlangRoutine XVOLUME_WRITE_IMAGE XYOUTS ZOOM ZOOM_24 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_idlang_syn_inits") - if version < 508 - let did_idlang_syn_inits = 1 - command -nargs=+ HiLink hi link <args> -else - command -nargs=+ HiLink hi def link <args> -endif - - HiLink idlangConditional Conditional - HiLink idlangRoutine Type - HiLink idlangStatement Statement - HiLink idlangContinueLine Todo - HiLink idlangRealNumber Float - HiLink idlangNumber Number - HiLink idlangString String - HiLink idlangOperator Operator - HiLink idlangComment Comment - HiLink idlangTodo Todo - HiLink idlangPreCondit Identifier - HiLink idlangDblCommaError Error - HiLink idlangStop Error - HiLink idlangStrucvar PreProc - HiLink idlangSystem Identifier - HiLink idlangKeyword Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink idlangConditional Conditional +HiLink idlangRoutine Type +HiLink idlangStatement Statement +HiLink idlangContinueLine Todo +HiLink idlangRealNumber Float +HiLink idlangNumber Number +HiLink idlangString String +HiLink idlangOperator Operator +HiLink idlangComment Comment +HiLink idlangTodo Todo +HiLink idlangPreCondit Identifier +HiLink idlangDblCommaError Error +HiLink idlangStop Error +HiLink idlangStrucvar PreProc +HiLink idlangSystem Identifier +HiLink idlangKeyword Special + +delcommand HiLink let b:current_syntax = "idlang" " vim: ts=18 diff --git a/runtime/syntax/inform.vim b/runtime/syntax/inform.vim index d8ba43dce..4d833c7df 100644 --- a/runtime/syntax/inform.vim +++ b/runtime/syntax/inform.vim @@ -4,10 +4,8 @@ " URL: http://www.gowarthomas.com/informvim " Last Change: 2006 April 20 -" Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -294,13 +292,8 @@ endif " Handling for different versions of VIM. -if version >= 600 - setlocal iskeyword+=$ - command -nargs=+ SynDisplay syntax <args> display -else - set iskeyword+=$ - command -nargs=+ SynDisplay syntax <args> -endif +setlocal iskeyword+=$ +command -nargs=+ SynDisplay syntax <args> display " Grammar sections. @@ -347,61 +340,54 @@ syn sync maxlines=500 delcommand SynDisplay " The default highlighting. -if version >= 508 || !exists("did_inform_syn_inits") - if version < 508 - let did_inform_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink informDefine Define - HiLink informType Type - HiLink informInclude Include - HiLink informPreCondit PreCondit - HiLink informPreProc PreProc - HiLink informGramPreProc PreProc - HiLink informAsm Special - if !exists("inform_suppress_obsolete") - HiLink informAsmObsolete informError - HiLink informKeywordObsolete informError - else - HiLink informAsmObsolete Special - HiLink informKeywordObsolete Keyword - endif - HiLink informPredicate Operator - HiLink informSysFunc Identifier - HiLink informSysConst Identifier - HiLink informConditional Conditional - HiLink informRepeat Repeat - HiLink informStatement Statement - HiLink informOperator Operator - HiLink informKeyword Keyword - HiLink informGrammar Keyword - HiLink informDictString String - HiLink informNumber Number - HiLink informError Error - HiLink informString String - HiLink informComment Comment - HiLink informAccent Special - HiLink informStringUnicode Special - HiLink informStringCode Special - HiLink informTodo Todo - if !exists("inform_highlight_simple") - HiLink informLibAttrib Identifier - HiLink informLibProp Identifier - HiLink informLibObj Identifier - HiLink informLibRoutine Identifier - HiLink informLibVariable Identifier - HiLink informLibConst Identifier - HiLink informLibAction Identifier - endif - HiLink informBadDictString informError - HiLink informBadAccent informError - HiLink informBadStrUnicode informError - - delcommand HiLink +command -nargs=+ HiLink hi def link <args> + +HiLink informDefine Define +HiLink informType Type +HiLink informInclude Include +HiLink informPreCondit PreCondit +HiLink informPreProc PreProc +HiLink informGramPreProc PreProc +HiLink informAsm Special +if !exists("inform_suppress_obsolete") +HiLink informAsmObsolete informError +HiLink informKeywordObsolete informError +else +HiLink informAsmObsolete Special +HiLink informKeywordObsolete Keyword endif +HiLink informPredicate Operator +HiLink informSysFunc Identifier +HiLink informSysConst Identifier +HiLink informConditional Conditional +HiLink informRepeat Repeat +HiLink informStatement Statement +HiLink informOperator Operator +HiLink informKeyword Keyword +HiLink informGrammar Keyword +HiLink informDictString String +HiLink informNumber Number +HiLink informError Error +HiLink informString String +HiLink informComment Comment +HiLink informAccent Special +HiLink informStringUnicode Special +HiLink informStringCode Special +HiLink informTodo Todo +if !exists("inform_highlight_simple") +HiLink informLibAttrib Identifier +HiLink informLibProp Identifier +HiLink informLibObj Identifier +HiLink informLibRoutine Identifier +HiLink informLibVariable Identifier +HiLink informLibConst Identifier +HiLink informLibAction Identifier +endif +HiLink informBadDictString informError +HiLink informBadAccent informError +HiLink informBadStrUnicode informError + +delcommand HiLink let b:current_syntax = "inform" diff --git a/runtime/syntax/inittab.vim b/runtime/syntax/inittab.vim index b7472f9e0..a743c82f8 100644 --- a/runtime/syntax/inittab.vim +++ b/runtime/syntax/inittab.vim @@ -6,12 +6,9 @@ " URL: http://physics.muni.cz/~yeti/download/syntax/inittab.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -45,31 +42,24 @@ syn match inittabProcessPlus "+" contained nextgroup=inittabProcess,inittabError syn region inittabProcess start="/" end="$" transparent oneline contained contains=@inittabSh,inittabComment " Define the default highlighting -if version >= 508 || !exists("did_inittab_syntax_inits") - if version < 508 - let did_inittab_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink inittabComment Comment - HiLink inittabFixme Todo - HiLink inittabActionName Type - HiLink inittabError Error - HiLink inittabId Identifier - HiLink inittabRunLevels Special +HiLink inittabComment Comment +HiLink inittabFixme Todo +HiLink inittabActionName Type +HiLink inittabError Error +HiLink inittabId Identifier +HiLink inittabRunLevels Special - HiLink inittabColonProcess inittabColon - HiLink inittabColonAction inittabColon - HiLink inittabColonRunLevels inittabColon - HiLink inittabColon PreProc +HiLink inittabColonProcess inittabColon +HiLink inittabColonAction inittabColon +HiLink inittabColonRunLevels inittabColon +HiLink inittabColon PreProc - HiLink inittabShString String - HiLink inittabShOption Special - HiLink inittabShCommand Statement +HiLink inittabShString String +HiLink inittabShOption Special +HiLink inittabShCommand Statement - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "inittab" diff --git a/runtime/syntax/ipfilter.vim b/runtime/syntax/ipfilter.vim index db9981285..a7b7df2ba 100644 --- a/runtime/syntax/ipfilter.vim +++ b/runtime/syntax/ipfilter.vim @@ -9,11 +9,8 @@ " not correctly identified. " Please send comments to hendrik@scholz.net -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/ishd.vim b/runtime/syntax/ishd.vim index 1c011f1b9..78d88b9c1 100644 --- a/runtime/syntax/ishd.vim +++ b/runtime/syntax/ishd.vim @@ -3,11 +3,8 @@ " Maintainer: Robert M. Cortopassi <cortopar@mindspring.com> " Last Change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -387,35 +384,27 @@ syn cluster ishdPreProcGroup contains=ishdPreCondit,ishdIncluded,ishdInclude,ish syn region ishdDefine start="^\s*#\s*\(define\|undef\)\>" end="$" contains=ALLBUT,@ishdPreProcGroup " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_is_syntax_inits") - if version < 508 - let did_is_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink ishdNumber Number - HiLink ishdError Error - HiLink ishdStatement Statement - HiLink ishdString String - HiLink ishdComment Comment - HiLink ishdTodo Todo - HiLink ishdFunction Identifier - HiLink ishdConstant PreProc - HiLink ishdType Type - HiLink ishdInclude Include - HiLink ishdDefine Macro - HiLink ishdIncluded String - HiLink ishdPreCondit PreCondit - HiLink ishdHashIf0Skip ishdHashIf0 - HiLink ishdHashIf0End ishdHashIf0 - HiLink ishdHashIf0 Comment +HiLink ishdNumber Number +HiLink ishdError Error +HiLink ishdStatement Statement +HiLink ishdString String +HiLink ishdComment Comment +HiLink ishdTodo Todo +HiLink ishdFunction Identifier +HiLink ishdConstant PreProc +HiLink ishdType Type +HiLink ishdInclude Include +HiLink ishdDefine Macro +HiLink ishdIncluded String +HiLink ishdPreCondit PreCondit +HiLink ishdHashIf0Skip ishdHashIf0 +HiLink ishdHashIf0End ishdHashIf0 +HiLink ishdHashIf0 Comment - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "ishd" diff --git a/runtime/syntax/iss.vim b/runtime/syntax/iss.vim index 26d9150b5..63a453ada 100644 --- a/runtime/syntax/iss.vim +++ b/runtime/syntax/iss.vim @@ -9,11 +9,8 @@ " - Pascal scripting syntax is not recognized. " - Embedded double quotes confuse string matches. e.g. "asfd""asfa" -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -105,44 +102,36 @@ syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart uncheck " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_iss_syntax_inits") - if version < 508 - let did_iss_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink issSection Special - HiLink issComment Comment - HiLink issDirective Type - HiLink issParam Type - HiLink issFolder Special - HiLink issString String - HiLink issURL Include - HiLink issPreProc PreProc - - HiLink issDirsFlags Keyword - HiLink issFilesCopyMode Keyword - HiLink issFilesAttribs Keyword - HiLink issFilesPermissions Keyword - HiLink issFilesFlags Keyword - HiLink issIconsFlags Keyword - HiLink issINIFlags Keyword - HiLink issRegRootKey Keyword - HiLink issRegValueType Keyword - HiLink issRegFlags Keyword - HiLink issRunFlags Keyword - HiLink issTypesFlags Keyword - HiLink issComponentsFlags Keyword - HiLink issInstallDeleteType Keyword - HiLink issTasksFlags Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink issSection Special +HiLink issComment Comment +HiLink issDirective Type +HiLink issParam Type +HiLink issFolder Special +HiLink issString String +HiLink issURL Include +HiLink issPreProc PreProc + +HiLink issDirsFlags Keyword +HiLink issFilesCopyMode Keyword +HiLink issFilesAttribs Keyword +HiLink issFilesPermissions Keyword +HiLink issFilesFlags Keyword +HiLink issIconsFlags Keyword +HiLink issINIFlags Keyword +HiLink issRegRootKey Keyword +HiLink issRegValueType Keyword +HiLink issRegFlags Keyword +HiLink issRunFlags Keyword +HiLink issTypesFlags Keyword +HiLink issComponentsFlags Keyword +HiLink issInstallDeleteType Keyword +HiLink issTasksFlags Keyword + +delcommand HiLink let b:current_syntax = "iss" diff --git a/runtime/syntax/ist.vim b/runtime/syntax/ist.vim index 131d833cb..f3f005bf0 100644 --- a/runtime/syntax/ist.vim +++ b/runtime/syntax/ist.vim @@ -3,22 +3,15 @@ " Maintainer: Peter Meszaros <pmeszaros@effice.hu> " Last Change: 2012 Jan 08 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim -if version >= 600 - setlocal iskeyword=$,@,48-57,_ -else - set iskeyword=$,@,48-57,_ -endif +setlocal iskeyword=$,@,48-57,_ syn case ignore syn keyword IstInpSpec actual arg_close arg_open encap escape @@ -45,28 +38,20 @@ syn match IstSpecial "\\\\\|{\|}\|#\|\\n" contained syn match IstTodo "DEBUG\|TODO" contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_dummy_syn_inits") - if version < 508 - let did_dummy_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink IstInpSpec Type - HiLink IstOutSpec Identifier - HiLink IstString String - HiLink IstNumber Number - HiLink IstComment Comment - HiLink IstTodo Todo - HiLink IstSpecial Special - HiLink IstDoubleQuote Label - HiLink IstCharacter Label - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink IstInpSpec Type +HiLink IstOutSpec Identifier +HiLink IstString String +HiLink IstNumber Number +HiLink IstComment Comment +HiLink IstTodo Todo +HiLink IstSpecial Special +HiLink IstDoubleQuote Label +HiLink IstCharacter Label + +delcommand HiLink let b:current_syntax = "ist" diff --git a/runtime/syntax/jal.vim b/runtime/syntax/jal.vim index d0ba67285..ded2ecd3d 100644 --- a/runtime/syntax/jal.vim +++ b/runtime/syntax/jal.vim @@ -9,11 +9,8 @@ " " TODO test. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -171,77 +168,69 @@ endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jal_syn_inits") -if version < 508 - let did_jal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> -else - command -nargs=+ HiLink hi def link <args> -endif - - HiLink jalAcces jalStatement - HiLink jalBoolean Boolean - HiLink jalBit Boolean - HiLink jalComment Comment - HiLink jalConditional Conditional - HiLink jalConstant Constant - HiLink jalDelimiter Identifier - HiLink jalDirective PreProc - HiLink jalException Exception - HiLink jalFloat Float - HiLink jalFunction Function - HiLink jalPsudoVarsKey Function - HiLink jalLabel Label - HiLink jalMatrixDelimiter Identifier - HiLink jalModifier Type - HiLink jalNumber Number - HiLink jalBinNumber Number - HiLink jalHexNumber Number - HiLink jalOperator Operator - HiLink jalPredefined Constant - HiLink jalPreProc PreProc - HiLink jalRepeat Repeat - HiLink jalStatement Statement - HiLink jalString String - HiLink jalStringEscape Special - HiLink jalStringEscapeGPC Special - HiLink jalStringError Error - HiLink jalStruct jalStatement - HiLink jalSymbolOperator jalOperator - HiLink jalTodo Todo - HiLink jalType Type - HiLink jalUnclassified Statement - HiLink jalAsm Assembler - HiLink jalError Error - HiLink jalAsmKey Statement - HiLink jalPIC Statement - - HiLink jalShowTab Error - - HiLink picTodo Todo - HiLink picComment Comment - HiLink picDirective Statement - HiLink picLabel Label - HiLink picString String - - HiLink picOpcode Keyword - HiLink picRegister Structure - HiLink picRegisterPart Special - HiLink picPinDir SPecial - HiLink picPortDir SPecial - - HiLink picASCII String - HiLink picBinary Number - HiLink picDecimal Number - HiLink picHexadecimal Number - HiLink picOctal Number - - HiLink picIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink jalAcces jalStatement +HiLink jalBoolean Boolean +HiLink jalBit Boolean +HiLink jalComment Comment +HiLink jalConditional Conditional +HiLink jalConstant Constant +HiLink jalDelimiter Identifier +HiLink jalDirective PreProc +HiLink jalException Exception +HiLink jalFloat Float +HiLink jalFunction Function +HiLink jalPsudoVarsKey Function +HiLink jalLabel Label +HiLink jalMatrixDelimiter Identifier +HiLink jalModifier Type +HiLink jalNumber Number +HiLink jalBinNumber Number +HiLink jalHexNumber Number +HiLink jalOperator Operator +HiLink jalPredefined Constant +HiLink jalPreProc PreProc +HiLink jalRepeat Repeat +HiLink jalStatement Statement +HiLink jalString String +HiLink jalStringEscape Special +HiLink jalStringEscapeGPC Special +HiLink jalStringError Error +HiLink jalStruct jalStatement +HiLink jalSymbolOperator jalOperator +HiLink jalTodo Todo +HiLink jalType Type +HiLink jalUnclassified Statement +HiLink jalAsm Assembler +HiLink jalError Error +HiLink jalAsmKey Statement +HiLink jalPIC Statement + +HiLink jalShowTab Error + +HiLink picTodo Todo +HiLink picComment Comment +HiLink picDirective Statement +HiLink picLabel Label +HiLink picString String + +HiLink picOpcode Keyword +HiLink picRegister Structure +HiLink picRegisterPart Special +HiLink picPinDir SPecial +HiLink picPortDir SPecial + +HiLink picASCII String +HiLink picBinary Number +HiLink picDecimal Number +HiLink picHexadecimal Number +HiLink picOctal Number + +HiLink picIdentifier Identifier + +delcommand HiLink let b:current_syntax = "jal" diff --git a/runtime/syntax/jam.vim b/runtime/syntax/jam.vim index cbd99bb9c..f165a78ef 100644 --- a/runtime/syntax/jam.vim +++ b/runtime/syntax/jam.vim @@ -3,22 +3,15 @@ " Maintainer: Ralf Lemke (ralflemk@t-online.de) " Last change: 2012 Jan 08 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim -if version >= 600 - setlocal iskeyword=@,48-57,_,- -else - set iskeyword=@,48-57,_,- -endif +setlocal iskeyword=@,48-57,_,- " A bunch of useful jam keywords syn keyword jamStatement break call dbms flush global include msg parms proc public receive return send unload vars @@ -167,88 +160,80 @@ syntax match jamCommentError "\*/" syntax match jamOperator3Error "*/" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jam_syn_inits") - if version < 508 - let did_jam_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jamCommentL jamComment - HiLink jamCommentL2 jamComment - HiLink jamOperator3Error jamError - HiLink jamConditional Conditional - HiLink jamRepeat Repeat - HiLink jamCharacter Character - HiLink jamSpecialCharacter jamSpecial - HiLink jamNumber Number - HiLink jamParenError jamError - HiLink jamErrInParen jamError - HiLink jamErrInBracket jamError - HiLink jamCommentError jamError - HiLink jamSpaceError jamError - HiLink jamSpecialError jamError - HiLink jamOperator1 jamOperator - HiLink jamOperator2 jamOperator - HiLink jamOperator3 jamOperator - HiLink jamOperator4 jamOperator - HiLink jamOperator5 jamOperator - HiLink jamOperator6 jamOperator - HiLink jamOperator7 jamOperator - HiLink jamOperator8 jamOperator - HiLink jamOperator9 jamOperator - HiLink jamOperator10 jamOperator - HiLink jamOperator11 jamOperator - HiLink jamOperator12 jamOperator - HiLink jamOperator13 jamOperator - HiLink jamOperator14 jamOperator - HiLink jamError Error - HiLink jamStatement Statement - HiLink jamPreCondit PreCondit - HiLink jamCommentError jamError - HiLink jamCommentString jamString - HiLink jamComment2String jamString - HiLink jamCommentSkip jamComment - HiLink jamString String - HiLink jamComment Comment - HiLink jamSpecial SpecialChar - HiLink jamTodo Todo - HiLink jamCppSkip jamCppOut - HiLink jamCppOut2 jamCppOut - HiLink jamCppOut Comment - HiLink jamDBState1 Identifier - HiLink jamDBState2 Identifier - HiLink jamSQLState1 jamSQL - HiLink jamSQLState2 jamSQL - HiLink jamLibFunc1 jamLibFunc - HiLink jamLibFunc2 jamLibFunc - HiLink jamLibFunc3 jamLibFunc - HiLink jamLibFunc4 jamLibFunc - HiLink jamLibFunc5 jamLibFunc - HiLink jamLibFunc6 jamLibFunc - HiLink jamLibFunc7 jamLibFunc - HiLink jamLibFunc8 jamLibFunc - HiLink jamLibFunc9 jamLibFunc - HiLink jamVariable1 jamVariablen - HiLink jamVariable2 jamVariablen - HiLink jamVariable3 jamVariablen - HiLink jamVariable4 jamVariablen - HiLink jamVariable5 jamVariablen - HiLink jamVariable6 jamVariablen - HiLink jamVariable7 jamVariablen - HiLink jamVariable8 jamVariablen - HiLink jamVariable9 jamVariablen - HiLink jamVariable10 jamVariablen - HiLink jamVariablen Constant - HiLink jamSQL Type - HiLink jamLibFunc PreProc - HiLink jamOperator Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink jamCommentL jamComment +HiLink jamCommentL2 jamComment +HiLink jamOperator3Error jamError +HiLink jamConditional Conditional +HiLink jamRepeat Repeat +HiLink jamCharacter Character +HiLink jamSpecialCharacter jamSpecial +HiLink jamNumber Number +HiLink jamParenError jamError +HiLink jamErrInParen jamError +HiLink jamErrInBracket jamError +HiLink jamCommentError jamError +HiLink jamSpaceError jamError +HiLink jamSpecialError jamError +HiLink jamOperator1 jamOperator +HiLink jamOperator2 jamOperator +HiLink jamOperator3 jamOperator +HiLink jamOperator4 jamOperator +HiLink jamOperator5 jamOperator +HiLink jamOperator6 jamOperator +HiLink jamOperator7 jamOperator +HiLink jamOperator8 jamOperator +HiLink jamOperator9 jamOperator +HiLink jamOperator10 jamOperator +HiLink jamOperator11 jamOperator +HiLink jamOperator12 jamOperator +HiLink jamOperator13 jamOperator +HiLink jamOperator14 jamOperator +HiLink jamError Error +HiLink jamStatement Statement +HiLink jamPreCondit PreCondit +HiLink jamCommentError jamError +HiLink jamCommentString jamString +HiLink jamComment2String jamString +HiLink jamCommentSkip jamComment +HiLink jamString String +HiLink jamComment Comment +HiLink jamSpecial SpecialChar +HiLink jamTodo Todo +HiLink jamCppSkip jamCppOut +HiLink jamCppOut2 jamCppOut +HiLink jamCppOut Comment +HiLink jamDBState1 Identifier +HiLink jamDBState2 Identifier +HiLink jamSQLState1 jamSQL +HiLink jamSQLState2 jamSQL +HiLink jamLibFunc1 jamLibFunc +HiLink jamLibFunc2 jamLibFunc +HiLink jamLibFunc3 jamLibFunc +HiLink jamLibFunc4 jamLibFunc +HiLink jamLibFunc5 jamLibFunc +HiLink jamLibFunc6 jamLibFunc +HiLink jamLibFunc7 jamLibFunc +HiLink jamLibFunc8 jamLibFunc +HiLink jamLibFunc9 jamLibFunc +HiLink jamVariable1 jamVariablen +HiLink jamVariable2 jamVariablen +HiLink jamVariable3 jamVariablen +HiLink jamVariable4 jamVariablen +HiLink jamVariable5 jamVariablen +HiLink jamVariable6 jamVariablen +HiLink jamVariable7 jamVariablen +HiLink jamVariable8 jamVariablen +HiLink jamVariable9 jamVariablen +HiLink jamVariable10 jamVariablen +HiLink jamVariablen Constant +HiLink jamSQL Type +HiLink jamLibFunc PreProc +HiLink jamOperator Special + +delcommand HiLink let b:current_syntax = "jam" diff --git a/runtime/syntax/jargon.vim b/runtime/syntax/jargon.vim index 25a88bc98..97b03c347 100644 --- a/runtime/syntax/jargon.vim +++ b/runtime/syntax/jargon.vim @@ -3,11 +3,8 @@ " Maintainer: <rms@poczta.onet.pl> " Last Change: 2001 May 26 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -17,20 +14,12 @@ syn match jargonUrl +\(http\|ftp\)://[^\t )"]*+ syn match jargonMark /{[^}]*}/ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jargon_syntax_inits") - if version < 508 - let did_jargon_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink jargonChaptTitle Title - HiLink jargonEmailAddr Comment - HiLink jargonUrl Comment - HiLink jargonMark Label - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink jargonChaptTitle Title +HiLink jargonEmailAddr Comment +HiLink jargonUrl Comment +HiLink jargonMark Label +delcommand HiLink let b:current_syntax = "jargon" diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index e113a904c..c22c67bba 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -6,11 +6,9 @@ " Please check :help java.vim for comments on some of the options available. -" Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif " we define it here so that included files can test for it @@ -22,11 +20,7 @@ let s:cpo_save = &cpo set cpo&vim " don't use standard HiLink, it will not work with included syntax files -if version < 508 - command! -nargs=+ JavaHiLink hi link <args> -else - command! -nargs=+ JavaHiLink hi def link <args> -endif +command! -nargs=+ JavaHiLink hi def link <args> " some characters that cannot be in a java program (outside a string) syn match javaError "[\\@`]" @@ -242,23 +236,21 @@ if exists("java_highlight_debug") syn cluster javaTop add=javaDebug - if version >= 508 || !exists("did_c_syn_inits") - JavaHiLink javaDebug Debug - JavaHiLink javaDebugString DebugString - JavaHiLink javaDebugStringError javaError - JavaHiLink javaDebugType DebugType - JavaHiLink javaDebugBoolean DebugBoolean - JavaHiLink javaDebugNumber Debug - JavaHiLink javaDebugSpecial DebugSpecial - JavaHiLink javaDebugSpecialCharacter DebugSpecial - JavaHiLink javaDebugCharacter DebugString - JavaHiLink javaDebugParen Debug - - JavaHiLink DebugString String - JavaHiLink DebugSpecial Special - JavaHiLink DebugBoolean Boolean - JavaHiLink DebugType Type - endif + JavaHiLink javaDebug Debug + JavaHiLink javaDebugString DebugString + JavaHiLink javaDebugStringError javaError + JavaHiLink javaDebugType DebugType + JavaHiLink javaDebugBoolean DebugBoolean + JavaHiLink javaDebugNumber Debug + JavaHiLink javaDebugSpecial DebugSpecial + JavaHiLink javaDebugSpecialCharacter DebugSpecial + JavaHiLink javaDebugCharacter DebugString + JavaHiLink javaDebugParen Debug + + JavaHiLink DebugString String + JavaHiLink DebugSpecial Special + JavaHiLink DebugBoolean Boolean + JavaHiLink DebugType Type endif if exists("java_mark_braces_in_parens_as_errors") @@ -291,59 +283,54 @@ endif exec "syn sync ccomment javaComment minlines=" . java_minlines " The default highlighting. -if version >= 508 || !exists("did_java_syn_inits") - if version < 508 - let did_java_syn_inits = 1 - endif - JavaHiLink javaLambdaDef Function - JavaHiLink javaFuncDef Function - JavaHiLink javaVarArg Function - JavaHiLink javaBraces Function - JavaHiLink javaBranch Conditional - JavaHiLink javaUserLabelRef javaUserLabel - JavaHiLink javaLabel Label - JavaHiLink javaUserLabel Label - JavaHiLink javaConditional Conditional - JavaHiLink javaRepeat Repeat - JavaHiLink javaExceptions Exception - JavaHiLink javaAssert Statement - JavaHiLink javaStorageClass StorageClass - JavaHiLink javaMethodDecl javaStorageClass - JavaHiLink javaClassDecl javaStorageClass - JavaHiLink javaScopeDecl javaStorageClass - JavaHiLink javaBoolean Boolean - JavaHiLink javaSpecial Special - JavaHiLink javaSpecialError Error - JavaHiLink javaSpecialCharError Error - JavaHiLink javaString String - JavaHiLink javaCharacter Character - JavaHiLink javaSpecialChar SpecialChar - JavaHiLink javaNumber Number - JavaHiLink javaError Error - JavaHiLink javaStringError Error - JavaHiLink javaStatement Statement - JavaHiLink javaOperator Operator - JavaHiLink javaComment Comment - JavaHiLink javaDocComment Comment - JavaHiLink javaLineComment Comment - JavaHiLink javaConstant Constant - JavaHiLink javaTypedef Typedef - JavaHiLink javaTodo Todo - JavaHiLink javaAnnotation PreProc - - JavaHiLink javaCommentTitle SpecialComment - JavaHiLink javaDocTags Special - JavaHiLink javaDocParam Function - JavaHiLink javaDocSeeTagParam Function - JavaHiLink javaCommentStar javaComment - - JavaHiLink javaType Type - JavaHiLink javaExternal Include - - JavaHiLink htmlComment Special - JavaHiLink htmlCommentPart Special - JavaHiLink javaSpaceError Error -endif +JavaHiLink javaLambdaDef Function +JavaHiLink javaFuncDef Function +JavaHiLink javaVarArg Function +JavaHiLink javaBraces Function +JavaHiLink javaBranch Conditional +JavaHiLink javaUserLabelRef javaUserLabel +JavaHiLink javaLabel Label +JavaHiLink javaUserLabel Label +JavaHiLink javaConditional Conditional +JavaHiLink javaRepeat Repeat +JavaHiLink javaExceptions Exception +JavaHiLink javaAssert Statement +JavaHiLink javaStorageClass StorageClass +JavaHiLink javaMethodDecl javaStorageClass +JavaHiLink javaClassDecl javaStorageClass +JavaHiLink javaScopeDecl javaStorageClass +JavaHiLink javaBoolean Boolean +JavaHiLink javaSpecial Special +JavaHiLink javaSpecialError Error +JavaHiLink javaSpecialCharError Error +JavaHiLink javaString String +JavaHiLink javaCharacter Character +JavaHiLink javaSpecialChar SpecialChar +JavaHiLink javaNumber Number +JavaHiLink javaError Error +JavaHiLink javaStringError Error +JavaHiLink javaStatement Statement +JavaHiLink javaOperator Operator +JavaHiLink javaComment Comment +JavaHiLink javaDocComment Comment +JavaHiLink javaLineComment Comment +JavaHiLink javaConstant Constant +JavaHiLink javaTypedef Typedef +JavaHiLink javaTodo Todo +JavaHiLink javaAnnotation PreProc + +JavaHiLink javaCommentTitle SpecialComment +JavaHiLink javaDocTags Special +JavaHiLink javaDocParam Function +JavaHiLink javaDocSeeTagParam Function +JavaHiLink javaCommentStar javaComment + +JavaHiLink javaType Type +JavaHiLink javaExternal Include + +JavaHiLink htmlComment Special +JavaHiLink htmlCommentPart Special +JavaHiLink javaSpaceError Error delcommand JavaHiLink diff --git a/runtime/syntax/javacc.vim b/runtime/syntax/javacc.vim index 5458de754..93d174097 100644 --- a/runtime/syntax/javacc.vim +++ b/runtime/syntax/javacc.vim @@ -7,11 +7,8 @@ " Uses java.vim, and adds a few special things for JavaCC Parser files. " Those files usually have the extension *.jj -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -19,11 +16,7 @@ let s:cpo_save = &cpo set cpo&vim " source the java.vim file -if version < 600 - source <sfile>:p:h/java.vim -else - runtime! syntax/java.vim -endif +runtime! syntax/java.vim unlet b:current_syntax "remove catching errors caused by wrong parenthesis (does not work in javacc @@ -58,22 +51,14 @@ syn keyword javaccActionToken TOKEN SKIP MORE SPECIAL_TOKEN syn keyword javaccError DEBUG IGNORE_IN_BNF " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_css_syn_inits") - if version < 508 - let did_css_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink javaccSpecToken Statement - HiLink javaccActionToken Type - HiLink javaccPackages javaScopeDecl - HiLink javaccToken String - HiLink javaccError Error - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink javaccSpecToken Statement +HiLink javaccActionToken Type +HiLink javaccPackages javaScopeDecl +HiLink javaccToken String +HiLink javaccError Error +delcommand HiLink let b:current_syntax = "javacc" let &cpo = s:cpo_save diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index 1b20f987d..e3e8262d3 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -10,15 +10,12 @@ " Last Change: 2012 Oct 05 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded " tuning parameters: " unlet javaScript_fold if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + " quit when a syntax file was already loaded + if exists("b:current_syntax") finish endif let main_syntax = 'javascript' @@ -29,11 +26,6 @@ endif let s:cpo_save = &cpo set cpo&vim -" Drop fold if it set but vim doesn't support it. -if version < 600 && exists("javaScript_fold") - unlet javaScript_fold -endif - syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo @@ -87,51 +79,43 @@ if main_syntax == "javascript" endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_javascript_syn_inits") - if version < 508 - let did_javascript_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink javaScriptComment Comment - HiLink javaScriptLineComment Comment - HiLink javaScriptCommentTodo Todo - HiLink javaScriptSpecial Special - HiLink javaScriptStringS String - HiLink javaScriptStringD String - HiLink javaScriptCharacter Character - HiLink javaScriptSpecialCharacter javaScriptSpecial - HiLink javaScriptNumber javaScriptValue - HiLink javaScriptConditional Conditional - HiLink javaScriptRepeat Repeat - HiLink javaScriptBranch Conditional - HiLink javaScriptOperator Operator - HiLink javaScriptType Type - HiLink javaScriptStatement Statement - HiLink javaScriptFunction Function - HiLink javaScriptBraces Function - HiLink javaScriptError Error - HiLink javaScrParenError javaScriptError - HiLink javaScriptNull Keyword - HiLink javaScriptBoolean Boolean - HiLink javaScriptRegexpString String - - HiLink javaScriptIdentifier Identifier - HiLink javaScriptLabel Label - HiLink javaScriptException Exception - HiLink javaScriptMessage Keyword - HiLink javaScriptGlobal Keyword - HiLink javaScriptMember Keyword - HiLink javaScriptDeprecated Exception - HiLink javaScriptReserved Keyword - HiLink javaScriptDebug Debug - HiLink javaScriptConstant Label - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink javaScriptComment Comment +HiLink javaScriptLineComment Comment +HiLink javaScriptCommentTodo Todo +HiLink javaScriptSpecial Special +HiLink javaScriptStringS String +HiLink javaScriptStringD String +HiLink javaScriptCharacter Character +HiLink javaScriptSpecialCharacter javaScriptSpecial +HiLink javaScriptNumber javaScriptValue +HiLink javaScriptConditional Conditional +HiLink javaScriptRepeat Repeat +HiLink javaScriptBranch Conditional +HiLink javaScriptOperator Operator +HiLink javaScriptType Type +HiLink javaScriptStatement Statement +HiLink javaScriptFunction Function +HiLink javaScriptBraces Function +HiLink javaScriptError Error +HiLink javaScrParenError javaScriptError +HiLink javaScriptNull Keyword +HiLink javaScriptBoolean Boolean +HiLink javaScriptRegexpString String + +HiLink javaScriptIdentifier Identifier +HiLink javaScriptLabel Label +HiLink javaScriptException Exception +HiLink javaScriptMessage Keyword +HiLink javaScriptGlobal Keyword +HiLink javaScriptMember Keyword +HiLink javaScriptDeprecated Exception +HiLink javaScriptReserved Keyword +HiLink javaScriptDebug Debug +HiLink javaScriptConstant Label + +delcommand HiLink let b:current_syntax = "javascript" if main_syntax == 'javascript' diff --git a/runtime/syntax/jess.vim b/runtime/syntax/jess.vim index 243bab351..ad625ac73 100644 --- a/runtime/syntax/jess.vim +++ b/runtime/syntax/jess.vim @@ -4,19 +4,12 @@ " Last change: September 14, 2000 " Based on lisp.vim by : Dr. Charles E. Campbell, Jr. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version < 600 - set iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ -else - setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ -endif +setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ " Lists syn match jessSymbol ![^()'`,"; \t]\+! contained @@ -125,36 +118,28 @@ syn match jessComment ";.*$" syn sync lines=100 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jess_syntax_inits") - if version < 508 - let did_jess_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jessAtomNmbr jessNumber - HiLink jessAtomMark jessMark - - HiLink jessAtom Identifier - HiLink jessAtomBarSymbol Special - HiLink jessBarSymbol Special - HiLink jessComment Comment - HiLink jessConcat Statement - HiLink jessDeclaration Statement - HiLink jessFunc Statement - HiLink jessKey Type - HiLink jessMark Delimiter - HiLink jessNumber Number - HiLink jessParenError Error - HiLink jessSpecial Type - HiLink jessString String - HiLink jessVar Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink jessAtomNmbr jessNumber +HiLink jessAtomMark jessMark + +HiLink jessAtom Identifier +HiLink jessAtomBarSymbol Special +HiLink jessBarSymbol Special +HiLink jessComment Comment +HiLink jessConcat Statement +HiLink jessDeclaration Statement +HiLink jessFunc Statement +HiLink jessKey Type +HiLink jessMark Delimiter +HiLink jessNumber Number +HiLink jessParenError Error +HiLink jessSpecial Type +HiLink jessString String +HiLink jessVar Identifier + +delcommand HiLink let b:current_syntax = "jess" diff --git a/runtime/syntax/jgraph.vim b/runtime/syntax/jgraph.vim index 7ecd5afae..43fc4275d 100644 --- a/runtime/syntax/jgraph.vim +++ b/runtime/syntax/jgraph.vim @@ -5,11 +5,8 @@ " this syntax file is not yet complete -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -36,23 +33,15 @@ syn match jgraphNumber "\-\=\.\d\+\>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jgraph_syn_inits") - if version < 508 - let did_jgraph_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jgraphComment Comment - HiLink jgraphCmd Identifier - HiLink jgraphType Type - HiLink jgraphNumber Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink jgraphComment Comment +HiLink jgraphCmd Identifier +HiLink jgraphType Type +HiLink jgraphNumber Number + +delcommand HiLink let b:current_syntax = "jgraph" diff --git a/runtime/syntax/jproperties.vim b/runtime/syntax/jproperties.vim index 9343bd292..bde160b24 100644 --- a/runtime/syntax/jproperties.vim +++ b/runtime/syntax/jproperties.vim @@ -43,11 +43,8 @@ endif " ============================================================================= -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -120,28 +117,20 @@ syn match jpropertiesComment "^\s*[#!].*$" contains=jpropertiesTODO syn keyword jpropertiesTodo TODO FIXME XXX contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jproperties_syntax_inits") - if version < 508 - let did_jproperties_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jpropertiesComment Comment - HiLink jpropertiesTodo Todo - HiLink jpropertiesIdentifier Identifier - HiLink jpropertiesString String - HiLink jpropertiesExtendString String - HiLink jpropertiesCharacter Character - HiLink jpropertiesSpecial Special - HiLink jpropertiesSpecialChar SpecialChar - HiLink jpropertiesError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink jpropertiesComment Comment +HiLink jpropertiesTodo Todo +HiLink jpropertiesIdentifier Identifier +HiLink jpropertiesString String +HiLink jpropertiesExtendString String +HiLink jpropertiesCharacter Character +HiLink jpropertiesSpecial Special +HiLink jpropertiesSpecialChar SpecialChar +HiLink jpropertiesError Error + +delcommand HiLink let b:current_syntax = "jproperties" diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim index 1fdfea2d0..34c26d37d 100644 --- a/runtime/syntax/json.vim +++ b/runtime/syntax/json.vim @@ -5,9 +5,8 @@ " Version: 0.12 if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + " quit when a syntax file was already loaded + if exists("b:current_syntax") finish endif let main_syntax = 'json' @@ -93,39 +92,31 @@ syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\ syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_json_syn_inits") - if version < 508 - let did_json_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink jsonPadding Operator - HiLink jsonString String - HiLink jsonTest Label - HiLink jsonEscape Special - HiLink jsonNumber Number - HiLink jsonBraces Delimiter - HiLink jsonNull Function - HiLink jsonBoolean Boolean - HiLink jsonKeyword Label - - if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) - HiLink jsonNumError Error - HiLink jsonCommentError Error - HiLink jsonSemicolonError Error - HiLink jsonTrailingCommaError Error - HiLink jsonMissingCommaError Error - HiLink jsonStringSQError Error - HiLink jsonNoQuotesError Error - HiLink jsonTripleQuotesError Error - endif - HiLink jsonQuote Quote - HiLink jsonNoise Noise - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink jsonPadding Operator +HiLink jsonString String +HiLink jsonTest Label +HiLink jsonEscape Special +HiLink jsonNumber Number +HiLink jsonBraces Delimiter +HiLink jsonNull Function +HiLink jsonBoolean Boolean +HiLink jsonKeyword Label + +if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) +HiLink jsonNumError Error +HiLink jsonCommentError Error +HiLink jsonSemicolonError Error +HiLink jsonTrailingCommaError Error +HiLink jsonMissingCommaError Error +HiLink jsonStringSQError Error +HiLink jsonNoQuotesError Error +HiLink jsonTripleQuotesError Error endif +HiLink jsonQuote Quote +HiLink jsonNoise Noise +delcommand HiLink let b:current_syntax = "json" if main_syntax == 'json' diff --git a/runtime/syntax/jsp.vim b/runtime/syntax/jsp.vim index 976665759..812a81465 100644 --- a/runtime/syntax/jsp.vim +++ b/runtime/syntax/jsp.vim @@ -6,11 +6,8 @@ " Credits : Patch by Darren Greaves (recognizes <jsp:...> tags) " Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -19,11 +16,7 @@ if !exists("main_syntax") endif " Source HTML syntax -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax " Next syntax items are case-sensitive @@ -52,29 +45,21 @@ syn clear htmlTag syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jsp_syn_inits") - if version < 508 - let did_jsp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " java.vim has redefined htmlComment highlighting - HiLink htmlComment Comment - HiLink htmlCommentPart Comment - " Be consistent with html highlight settings - HiLink jspComment htmlComment - HiLink jspTag htmlTag - HiLink jspDirective jspTag - HiLink jspDirName htmlTagName - HiLink jspDirArg htmlArg - HiLink jspCommand jspTag - HiLink jspCommandName htmlTagName - HiLink jspCommandArg htmlArg - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +" java.vim has redefined htmlComment highlighting +HiLink htmlComment Comment +HiLink htmlCommentPart Comment +" Be consistent with html highlight settings +HiLink jspComment htmlComment +HiLink jspTag htmlTag +HiLink jspDirective jspTag +HiLink jspDirName htmlTagName +HiLink jspDirArg htmlArg +HiLink jspCommand jspTag +HiLink jspCommandName htmlTagName +HiLink jspCommandArg htmlArg +delcommand HiLink if main_syntax == 'jsp' unlet main_syntax diff --git a/runtime/syntax/kix.vim b/runtime/syntax/kix.vim index 62dc3253e..a86d66c4b 100644 --- a/runtime/syntax/kix.vim +++ b/runtime/syntax/kix.vim @@ -19,10 +19,8 @@ " Work out how to error too many "(", i.e. (() should be an error. " Similarly, "if" without "endif" and similar constructs should error. -" Clear legacy syntax rules for version 5.x, exit if already processed for version 6+ -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -130,52 +128,44 @@ syn match kixExpression "<\|>\|<=\|>=\|<>" " Default highlighting. -" Version < 5.8 set default highlight if file not already processed. -" Version >= 5.8 set default highlight only if it doesn't already have a value. -if version > 508 || !exists("did_kix_syn_inits") - if version < 508 - let did_kix_syn_inits=1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink kixDoubleString String - HiLink kixSingleString String - HiLink kixStatement Statement - HiLink kixRepeat Repeat - HiLink kixComment Comment - HiLink kixBuiltin Function - HiLink kixLocalVar Special - HiLink kixMacro Special - HiLink kixEnvVar Special - HiLink kixLabel Type - HiLink kixFunction Function - HiLink kixInteger Number - HiLink kixHex Number - HiLink kixFloat Number - HiLink kixOperator Operator - HiLink kixExpression Operator - - HiLink kixParenCloseError Error - HiLink kixBrackCloseError Error - HiLink kixStringError Error - - HiLink kixWhileError Error - HiLink kixWhileOK Conditional - HiLink kixDoError Error - HiLink kixDoOK Conditional - HiLink kixIfError Error - HiLink kixIfOK Conditional - HiLink kixSelectError Error - HiLink kixSelectOK Conditional - HiLink kixForNextError Error - HiLink kixForNextOK Conditional - HiLink kixForEachError Error - HiLink kixForEachOK Conditional - - delcommand HiLink -endif +" Set default highlight only if it doesn't already have a value. +command -nargs=+ HiLink hi def link <args> + +HiLink kixDoubleString String +HiLink kixSingleString String +HiLink kixStatement Statement +HiLink kixRepeat Repeat +HiLink kixComment Comment +HiLink kixBuiltin Function +HiLink kixLocalVar Special +HiLink kixMacro Special +HiLink kixEnvVar Special +HiLink kixLabel Type +HiLink kixFunction Function +HiLink kixInteger Number +HiLink kixHex Number +HiLink kixFloat Number +HiLink kixOperator Operator +HiLink kixExpression Operator + +HiLink kixParenCloseError Error +HiLink kixBrackCloseError Error +HiLink kixStringError Error + +HiLink kixWhileError Error +HiLink kixWhileOK Conditional +HiLink kixDoError Error +HiLink kixDoOK Conditional +HiLink kixIfError Error +HiLink kixIfOK Conditional +HiLink kixSelectError Error +HiLink kixSelectOK Conditional +HiLink kixForNextError Error +HiLink kixForNextOK Conditional +HiLink kixForEachError Error +HiLink kixForEachOK Conditional + +delcommand HiLink let b:current_syntax = "kix" diff --git a/runtime/syntax/kscript.vim b/runtime/syntax/kscript.vim index cefbe39a2..e06b49d88 100644 --- a/runtime/syntax/kscript.vim +++ b/runtime/syntax/kscript.vim @@ -4,11 +4,8 @@ " URL: http://aquila.rezel.enst.fr/thomas/vim/kscript.vim " CVS: $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -37,33 +34,25 @@ syn region kscriptString start=+"""+ end=+"""+ syn region kscriptString start=+'''+ end=+'''+ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_kscript_syntax_inits") - if version < 508 - let did_kscript_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink kscriptConditional Conditional - HiLink kscriptRepeat Repeat - HiLink kscriptExceptions Statement - HiLink kscriptFunction Function - HiLink kscriptConst Constant - HiLink kscriptStatement Statement - HiLink kscriptLabel Label - HiLink kscriptStorageClass StorageClass - HiLink kscriptType Type - HiLink kscriptTodo Todo - HiLink kscriptComment Comment - HiLink kscriptString String - HiLink kscriptPreCondit PreCondit - HiLink kscriptHardCoded Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink kscriptConditional Conditional +HiLink kscriptRepeat Repeat +HiLink kscriptExceptions Statement +HiLink kscriptFunction Function +HiLink kscriptConst Constant +HiLink kscriptStatement Statement +HiLink kscriptLabel Label +HiLink kscriptStorageClass StorageClass +HiLink kscriptType Type +HiLink kscriptTodo Todo +HiLink kscriptComment Comment +HiLink kscriptString String +HiLink kscriptPreCondit PreCondit +HiLink kscriptHardCoded Statement + +delcommand HiLink let b:current_syntax = "kscript" diff --git a/runtime/syntax/kwt.vim b/runtime/syntax/kwt.vim index 4c2c9d9dc..b711663c4 100644 --- a/runtime/syntax/kwt.vim +++ b/runtime/syntax/kwt.vim @@ -3,21 +3,14 @@ " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 2 May 2001 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C++ syntax to start with -if version < 600 - source <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim - unlet b:current_syntax -endif +runtime! syntax/cpp.vim +unlet b:current_syntax " kimwitu++ extentions @@ -58,27 +51,19 @@ syn region kwtUnpBody transparent keepend extend fold start="->\s*\[" start="^\ syn region kwtRewBody transparent keepend extend fold start="->\s*<" start="^\s*<" end="\s>\s\=;\=$" end="^>\s\=;\=$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_kwt_syn_inits") - if version < 508 - let did_kwt_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink kwtStatement cppStatement - HiLink kwtDecl cppStatement - HiLink kwtCast cppStatement - HiLink kwtSep Delimiter - HiLink kwtViews Label - HiLink kwtPhylum Type - HiLink kwtOption PreProc - "HiLink cText Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink kwtStatement cppStatement +HiLink kwtDecl cppStatement +HiLink kwtCast cppStatement +HiLink kwtSep Delimiter +HiLink kwtViews Label +HiLink kwtPhylum Type +HiLink kwtOption PreProc +"HiLink cText Comment + +delcommand HiLink syn sync lines=300 diff --git a/runtime/syntax/lace.vim b/runtime/syntax/lace.vim index 9e64eea7d..dbdaf8bec 100644 --- a/runtime/syntax/lace.vim +++ b/runtime/syntax/lace.vim @@ -9,11 +9,8 @@ " it to the maintainer at <utilities@eiffel.com> -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -85,50 +82,42 @@ syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenErr syn sync lines=40 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lace_syntax_inits") - if version < 508 - let did_lace_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink laceTopStruct PreProc - - HiLink laceOptionClause Statement - HiLink laceOptionMark Constant - HiLink laceClusterProp Label - HiLink laceAdaptClassName Label - HiLink laceExternal Statement - HiLink laceCluster ModeMsg - - HiLink laceEscape Special - - HiLink laceBool Boolean - HiLink laceString String - HiLink laceCharacter Character - HiLink laceClassName Type - HiLink laceNumber Number - - HiLink laceOperator Special - HiLink laceArray Special - HiLink laceExport Special - HiLink laceCreation Special - HiLink laceBrackets Special - HiLink laceConstraint Special - - HiLink laceComment Comment - - HiLink laceError Error - HiLink laceStringError Error - HiLink laceParenError Error - HiLink laceBracketError Error - HiLink laceTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink laceTopStruct PreProc + +HiLink laceOptionClause Statement +HiLink laceOptionMark Constant +HiLink laceClusterProp Label +HiLink laceAdaptClassName Label +HiLink laceExternal Statement +HiLink laceCluster ModeMsg + +HiLink laceEscape Special + +HiLink laceBool Boolean +HiLink laceString String +HiLink laceCharacter Character +HiLink laceClassName Type +HiLink laceNumber Number + +HiLink laceOperator Special +HiLink laceArray Special +HiLink laceExport Special +HiLink laceCreation Special +HiLink laceBrackets Special +HiLink laceConstraint Special + +HiLink laceComment Comment + +HiLink laceError Error +HiLink laceStringError Error +HiLink laceParenError Error +HiLink laceBracketError Error +HiLink laceTodo Todo + +delcommand HiLink let b:current_syntax = "lace" diff --git a/runtime/syntax/latte.vim b/runtime/syntax/latte.vim index e2a8729f3..f95c7b5c7 100644 --- a/runtime/syntax/latte.vim +++ b/runtime/syntax/latte.vim @@ -7,11 +7,8 @@ " I based this on the TeX and Scheme syntax files (but mostly scheme). " See http://www.latte.org for info on the language. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -20,11 +17,7 @@ syn match latteOther "\\{" syn match latteOther "\\}" syn match latteOther "\\\\" -if version < 600 - set iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ -else - setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ -endif +setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther @@ -70,29 +63,21 @@ syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_latte_syntax_inits") - if version < 508 - let did_latte_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink latteSyntax Statement - HiLink latteVar Function +HiLink latteSyntax Statement +HiLink latteVar Function - HiLink latteString String - HiLink latteQuote String +HiLink latteString String +HiLink latteQuote String - HiLink latteDelimiter Delimiter - HiLink latteOperator Operator +HiLink latteDelimiter Delimiter +HiLink latteOperator Operator - HiLink latteComment Comment - HiLink latteError Error +HiLink latteComment Comment +HiLink latteError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "latte" diff --git a/runtime/syntax/ldif.vim b/runtime/syntax/ldif.vim index 9f67b57f5..704a590ec 100644 --- a/runtime/syntax/ldif.vim +++ b/runtime/syntax/ldif.vim @@ -3,9 +3,8 @@ " Maintainer: Zak Johnson <zakj@nox.cx> " Last Change: 2003-12-30 -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -21,23 +20,16 @@ syn region ldifFileValue matchgroup=ldifPunctuation start=/:< / end=/\_$/ skip syn region ldifComment start=/^#/ end=/\_$/ skip=/\n / -if version >= 508 || !exists("did_ldif_syn_inits") - if version < 508 - let did_ldif_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ldifAttribute Type - HiLink ldifOption Identifier - HiLink ldifPunctuation Normal - HiLink ldifStringValue String - HiLink ldifBase64Value Special - HiLink ldifFileValue Special - HiLink ldifComment Comment - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink ldifAttribute Type +HiLink ldifOption Identifier +HiLink ldifPunctuation Normal +HiLink ldifStringValue String +HiLink ldifBase64Value Special +HiLink ldifFileValue Special +HiLink ldifComment Comment + +delcommand HiLink let b:current_syntax = "ldif" diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim index b7aff34d6..83eb212f2 100644 --- a/runtime/syntax/lex.vim +++ b/runtime/syntax/lex.vim @@ -8,11 +8,8 @@ " Option: " lex_uses_cpp : if this variable exists, then C++ is loaded rather than C -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/lhaskell.vim b/runtime/syntax/lhaskell.vim index 077549a0c..78207812f 100644 --- a/runtime/syntax/lhaskell.vim +++ b/runtime/syntax/lhaskell.vim @@ -36,11 +36,8 @@ " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -84,15 +81,10 @@ endif " If user wants us to highlight TeX syntax or guess thinks it's TeX, read it. if b:lhs_markup == "tex" - if version < 600 - source <sfile>:p:h/tex.vim - set isk+=_ - else - runtime! syntax/tex.vim - unlet b:current_syntax - " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell. - setlocal isk+=_ - endif + runtime! syntax/tex.vim + unlet b:current_syntax + " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell. + setlocal isk+=_ syntax cluster lhsTeXContainer contains=tex.*Zone,texAbstract else syntax cluster lhsTeXContainer contains=.* @@ -100,11 +92,7 @@ endif " Literate Haskell is Haskell in between text, so at least read Haskell " highlighting -if version < 600 - syntax include @haskellTop <sfile>:p:h/haskell.vim -else - syntax include @haskellTop syntax/haskell.vim -endif +syntax include @haskellTop syntax/haskell.vim syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedin=@lhsTeXContainer syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,beginCodeBegin containedin=@lhsTeXContainer @@ -115,23 +103,15 @@ syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tex_syntax_inits") - if version < 508 - let did_tex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink lhsBirdTrack Comment - - HiLink beginCodeBegin texCmdName - HiLink beginCodeCode texSection - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink lhsBirdTrack Comment + +HiLink beginCodeBegin texCmdName +HiLink beginCodeCode texSection + +delcommand HiLink " Restore cursor to original position, as it may have been disturbed " by the searches in our guessing code diff --git a/runtime/syntax/lifelines.vim b/runtime/syntax/lifelines.vim index f8bea015b..041c50963 100644 --- a/runtime/syntax/lifelines.vim +++ b/runtime/syntax/lifelines.vim @@ -11,9 +11,8 @@ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -110,9 +109,7 @@ syn match lifelinesNumber "-\=\<\d\+\.\d*\>" syn match lifelinesNumber "-\=\.\d\+\>" " folding using {} -if version >= 600 - syn region lifelinesFoldBlock start="{" end="}" transparent fold -endif +syn region lifelinesFoldBlock start="{" end="}" transparent fold "catch errors caused by wrong parenthesis "adapted from original c.vim written by Bram Moolenaar @@ -123,44 +120,36 @@ syn match lifelinesParenError ")" syn match lifelinesErrInParen contained "[{}]" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet - -if version >= 508 || !exists("did_lifelines_syn_inits") - if version < 508 - let did_lifelines_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink lifelinesConditional Conditional - HiLink lifelinesArithm Operator - HiLink lifelinesLogical Conditional - HiLink lifelinesInclude Include - HiLink lifelinesComment Comment - HiLink lifelinesStatement Statement - HiLink lifelinesUser Statement - HiLink lifelinesFunct Statement - HiLink lifelinesTable Statement - HiLink lifelinesGedcom Statement - HiLink lifelinesList Statement - HiLink lifelinesRepeat Repeat - HiLink lifelinesFam Statement - HiLink lifelinesIndi Statement - HiLink lifelinesProc Statement - HiLink lifelinesDef Statement - HiLink lifelinesString String - HiLink lifelinesSpecial Special - HiLink lifelinesNumber Number - HiLink lifelinesParenError Error - HiLink lifelinesErrInParen Error - HiLink lifelinesError Error - HiLink lifelinesTodo Todo - HiLink lifelinesDecl PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +command -nargs=+ HiLink hi def link <args> + +HiLink lifelinesConditional Conditional +HiLink lifelinesArithm Operator +HiLink lifelinesLogical Conditional +HiLink lifelinesInclude Include +HiLink lifelinesComment Comment +HiLink lifelinesStatement Statement +HiLink lifelinesUser Statement +HiLink lifelinesFunct Statement +HiLink lifelinesTable Statement +HiLink lifelinesGedcom Statement +HiLink lifelinesList Statement +HiLink lifelinesRepeat Repeat +HiLink lifelinesFam Statement +HiLink lifelinesIndi Statement +HiLink lifelinesProc Statement +HiLink lifelinesDef Statement +HiLink lifelinesString String +HiLink lifelinesSpecial Special +HiLink lifelinesNumber Number +HiLink lifelinesParenError Error +HiLink lifelinesErrInParen Error +HiLink lifelinesError Error +HiLink lifelinesTodo Todo +HiLink lifelinesDecl PreProc + +delcommand HiLink let b:current_syntax = "lifelines" diff --git a/runtime/syntax/lilo.vim b/runtime/syntax/lilo.vim index 3e9459267..f58e34061 100644 --- a/runtime/syntax/lilo.vim +++ b/runtime/syntax/lilo.vim @@ -5,21 +5,12 @@ " Last Change: 2010-02-03 " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - command -nargs=1 SetIsk setlocal iskeyword=<args> -else - command -nargs=1 SetIsk set iskeyword=<args> -endif -SetIsk @,48-57,.,-,_ -delcommand SetIsk +setlocal iskeyword=@,48-57,.,-,_ syn case ignore @@ -128,65 +119,58 @@ syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPLis syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty " Define the default highlighting -if version >= 508 || !exists("did_lilo_syntax_inits") - if version < 508 - let did_lilo_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink liloEqPath liloEquals - HiLink liloEqWord liloEquals - HiLink liloEqVga liloEquals - HiLink liloEqDecNumber liloEquals - HiLink liloEqHexNumber liloEquals - HiLink liloEqNumber liloEquals - HiLink liloEqString liloEquals - HiLink liloEqAnything liloEquals - HiLink liloEquals Special - - HiLink liloError Error - - HiLink liloEqPathComment liloComment - HiLink liloEqVgaComment liloComment - HiLink liloEqDecNumberComment liloComment - HiLink liloEqHexNumberComment liloComment - HiLink liloEqStringComment liloComment - HiLink liloEqAnythingComment liloComment - HiLink liloPathComment liloComment - HiLink liloVgaComment liloComment - HiLink liloDecNumberComment liloComment - HiLink liloHexNumberComment liloComment - HiLink liloNumberComment liloComment - HiLink liloStringComment liloComment - HiLink liloAnythingComment liloComment - HiLink liloComment Comment - - HiLink liloDiskOpt liloOption - HiLink liloKernelOpt liloOption - HiLink liloImageOpt liloOption - HiLink liloOption Keyword - - HiLink liloDecNumber liloNumber - HiLink liloHexNumber liloNumber - HiLink liloDecNumberP liloNumber - HiLink liloNumber Number - HiLink liloString String - HiLink liloPath Constant - - HiLink liloSpecial Special - HiLink liloLabel Title - HiLink liloDecNumberList Special - HiLink liloDecNumberPList Special - HiLink liloAnything Normal - HiLink liloEnviron Identifier - HiLink liloVgaKeyword Identifier - HiLink liloImage Type - HiLink liloChRules Preproc - HiLink liloDisk Preproc - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink liloEqPath liloEquals +HiLink liloEqWord liloEquals +HiLink liloEqVga liloEquals +HiLink liloEqDecNumber liloEquals +HiLink liloEqHexNumber liloEquals +HiLink liloEqNumber liloEquals +HiLink liloEqString liloEquals +HiLink liloEqAnything liloEquals +HiLink liloEquals Special + +HiLink liloError Error + +HiLink liloEqPathComment liloComment +HiLink liloEqVgaComment liloComment +HiLink liloEqDecNumberComment liloComment +HiLink liloEqHexNumberComment liloComment +HiLink liloEqStringComment liloComment +HiLink liloEqAnythingComment liloComment +HiLink liloPathComment liloComment +HiLink liloVgaComment liloComment +HiLink liloDecNumberComment liloComment +HiLink liloHexNumberComment liloComment +HiLink liloNumberComment liloComment +HiLink liloStringComment liloComment +HiLink liloAnythingComment liloComment +HiLink liloComment Comment + +HiLink liloDiskOpt liloOption +HiLink liloKernelOpt liloOption +HiLink liloImageOpt liloOption +HiLink liloOption Keyword + +HiLink liloDecNumber liloNumber +HiLink liloHexNumber liloNumber +HiLink liloDecNumberP liloNumber +HiLink liloNumber Number +HiLink liloString String +HiLink liloPath Constant + +HiLink liloSpecial Special +HiLink liloLabel Title +HiLink liloDecNumberList Special +HiLink liloDecNumberPList Special +HiLink liloAnything Normal +HiLink liloEnviron Identifier +HiLink liloVgaKeyword Identifier +HiLink liloImage Type +HiLink liloChRules Preproc +HiLink liloDisk Preproc + +delcommand HiLink let b:current_syntax = "lilo" diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim index a40245238..f55507003 100644 --- a/runtime/syntax/lisp.vim +++ b/runtime/syntax/lisp.vim @@ -561,61 +561,58 @@ syn sync lines=100 " --------------------------------------------------------------------- " Define Highlighting: {{{1 -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 - command -nargs=+ HiLink hi def link <args> +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink lispCommentRegion lispComment - HiLink lispAtomNmbr lispNumber - HiLink lispAtomMark lispMark - HiLink lispInStringString lispString +HiLink lispCommentRegion lispComment +HiLink lispAtomNmbr lispNumber +HiLink lispAtomMark lispMark +HiLink lispInStringString lispString - HiLink lispAtom Identifier - HiLink lispAtomBarSymbol Special - HiLink lispBarSymbol Special - HiLink lispComment Comment - HiLink lispConcat Statement - HiLink lispDecl Statement - HiLink lispFunc Statement - HiLink lispKey Type - HiLink lispMark Delimiter - HiLink lispNumber Number - HiLink lispParenError Error - HiLink lispEscapeSpecial Type - HiLink lispString String - HiLink lispTodo Todo - HiLink lispVar Statement +HiLink lispAtom Identifier +HiLink lispAtomBarSymbol Special +HiLink lispBarSymbol Special +HiLink lispComment Comment +HiLink lispConcat Statement +HiLink lispDecl Statement +HiLink lispFunc Statement +HiLink lispKey Type +HiLink lispMark Delimiter +HiLink lispNumber Number +HiLink lispParenError Error +HiLink lispEscapeSpecial Type +HiLink lispString String +HiLink lispTodo Todo +HiLink lispVar Statement - if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 - if &bg == "dark" - hi def hlLevel0 ctermfg=red guifg=red1 - hi def hlLevel1 ctermfg=yellow guifg=orange1 - hi def hlLevel2 ctermfg=green guifg=yellow1 - hi def hlLevel3 ctermfg=cyan guifg=greenyellow - hi def hlLevel4 ctermfg=magenta guifg=green1 - hi def hlLevel5 ctermfg=red guifg=springgreen1 - hi def hlLevel6 ctermfg=yellow guifg=cyan1 - hi def hlLevel7 ctermfg=green guifg=slateblue1 - hi def hlLevel8 ctermfg=cyan guifg=magenta1 - hi def hlLevel9 ctermfg=magenta guifg=purple1 - else - hi def hlLevel0 ctermfg=red guifg=red3 - hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 - hi def hlLevel2 ctermfg=darkgreen guifg=orange2 - hi def hlLevel3 ctermfg=blue guifg=yellow3 - hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 - hi def hlLevel5 ctermfg=red guifg=green4 - hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 - hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 - hi def hlLevel8 ctermfg=blue guifg=darkslateblue - hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet - endif - endif - - delcommand HiLink +if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 + if &bg == "dark" + hi def hlLevel0 ctermfg=red guifg=red1 + hi def hlLevel1 ctermfg=yellow guifg=orange1 + hi def hlLevel2 ctermfg=green guifg=yellow1 + hi def hlLevel3 ctermfg=cyan guifg=greenyellow + hi def hlLevel4 ctermfg=magenta guifg=green1 + hi def hlLevel5 ctermfg=red guifg=springgreen1 + hi def hlLevel6 ctermfg=yellow guifg=cyan1 + hi def hlLevel7 ctermfg=green guifg=slateblue1 + hi def hlLevel8 ctermfg=cyan guifg=magenta1 + hi def hlLevel9 ctermfg=magenta guifg=purple1 + else + hi def hlLevel0 ctermfg=red guifg=red3 + hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 + hi def hlLevel2 ctermfg=darkgreen guifg=orange2 + hi def hlLevel3 ctermfg=blue guifg=yellow3 + hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 + hi def hlLevel5 ctermfg=red guifg=green4 + hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 + hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 + hi def hlLevel8 ctermfg=blue guifg=darkslateblue + hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet + endif endif +delcommand HiLink + let b:current_syntax = "lisp" " --------------------------------------------------------------------- diff --git a/runtime/syntax/lite.vim b/runtime/syntax/lite.vim index 8abc51dea..1a76e6c7f 100644 --- a/runtime/syntax/lite.vim +++ b/runtime/syntax/lite.vim @@ -8,11 +8,8 @@ " Options lite_sql_query = 1 for SQL syntax highligthing inside strings " lite_minlines = x to sync at least x lines backwards -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -138,39 +135,31 @@ if main_syntax == 'lite' endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lite_syn_inits") - if version < 508 - let did_lite_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink liteComment Comment - HiLink liteString String - HiLink liteNumber Number - HiLink liteFloat Float - HiLink liteIdentifier Identifier - HiLink liteGlobalIdentifier Identifier - HiLink liteIntVar Identifier - HiLink liteFunctions Function - HiLink liteRepeat Repeat - HiLink liteConditional Conditional - HiLink liteStatement Statement - HiLink liteType Type - HiLink liteInclude Include - HiLink liteDefine Define - HiLink liteSpecialChar SpecialChar - HiLink liteParentError liteError - HiLink liteError Error - HiLink liteTodo Todo - HiLink liteOperator Operator - HiLink liteRelation Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink liteComment Comment +HiLink liteString String +HiLink liteNumber Number +HiLink liteFloat Float +HiLink liteIdentifier Identifier +HiLink liteGlobalIdentifier Identifier +HiLink liteIntVar Identifier +HiLink liteFunctions Function +HiLink liteRepeat Repeat +HiLink liteConditional Conditional +HiLink liteStatement Statement +HiLink liteType Type +HiLink liteInclude Include +HiLink liteDefine Define +HiLink liteSpecialChar SpecialChar +HiLink liteParentError liteError +HiLink liteError Error +HiLink liteTodo Todo +HiLink liteOperator Operator +HiLink liteRelation Operator + +delcommand HiLink let b:current_syntax = "lite" diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim index be34c7ed7..e4decf2ef 100644 --- a/runtime/syntax/logtalk.vim +++ b/runtime/syntax/logtalk.vim @@ -5,11 +5,8 @@ " Last Change: February 4, 2012 -" Quit when a syntax file was already loaded: - -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -389,59 +386,49 @@ syn sync ccomment logtalkBlockComment maxlines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet - -if version >= 508 || !exists("did_logtalk_syn_inits") - if version < 508 - let did_logtalk_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink logtalkBlockComment Comment - HiLink logtalkLineComment Comment +HiLink logtalkBlockComment Comment +HiLink logtalkLineComment Comment - HiLink logtalkOpenEntityDir Normal - HiLink logtalkOpenEntityDirTag PreProc +HiLink logtalkOpenEntityDir Normal +HiLink logtalkOpenEntityDirTag PreProc - HiLink logtalkIfContainer PreProc - HiLink logtalkIf PreProc - HiLink logtalkElseIf PreProc - HiLink logtalkElse PreProc +HiLink logtalkIfContainer PreProc +HiLink logtalkIf PreProc +HiLink logtalkElseIf PreProc +HiLink logtalkElse PreProc - HiLink logtalkEntity Normal +HiLink logtalkEntity Normal - HiLink logtalkEntityRel Normal - HiLink logtalkEntityRelTag PreProc +HiLink logtalkEntityRel Normal +HiLink logtalkEntityRelTag PreProc - HiLink logtalkCloseEntityDir PreProc +HiLink logtalkCloseEntityDir PreProc - HiLink logtalkDir Normal - HiLink logtalkDirTag PreProc +HiLink logtalkDir Normal +HiLink logtalkDirTag PreProc - HiLink logtalkAtom String - HiLink logtalkString String - HiLink logtalkEscapeSequence SpecialChar +HiLink logtalkAtom String +HiLink logtalkString String +HiLink logtalkEscapeSequence SpecialChar - HiLink logtalkNumber Number +HiLink logtalkNumber Number - HiLink logtalkKeyword Keyword +HiLink logtalkKeyword Keyword - HiLink logtalkBuiltIn Keyword - HiLink logtalkBuiltInMethod Keyword +HiLink logtalkBuiltIn Keyword +HiLink logtalkBuiltInMethod Keyword - HiLink logtalkOperator Operator +HiLink logtalkOperator Operator - HiLink logtalkExtCall Normal - HiLink logtalkExtCallTag Operator +HiLink logtalkExtCall Normal +HiLink logtalkExtCallTag Operator - HiLink logtalkVariable Identifier +HiLink logtalkVariable Identifier - delcommand HiLink - -endif +delcommand HiLink let b:current_syntax = "logtalk" diff --git a/runtime/syntax/lotos.vim b/runtime/syntax/lotos.vim index 3cd83c4d8..e617bdb08 100644 --- a/runtime/syntax/lotos.vim +++ b/runtime/syntax/lotos.vim @@ -7,11 +7,8 @@ " I'm not sure I understand all of the syntax highlight language, " but this file seems to do the job for standard LOTOS. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -56,26 +53,18 @@ syn keyword lotosType using syn sync lines=250 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lotos_syntax_inits") - if version < 508 - let did_lotos_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink lotosStatement Statement - HiLink lotosProcess Label - HiLink lotosOperator Operator - HiLink lotosSort Function - HiLink lotosType Type - HiLink lotosComment Comment - HiLink lotosDelimiter String +HiLink lotosStatement Statement +HiLink lotosProcess Label +HiLink lotosOperator Operator +HiLink lotosSort Function +HiLink lotosType Type +HiLink lotosComment Comment +HiLink lotosDelimiter String - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "lotos" diff --git a/runtime/syntax/lout.vim b/runtime/syntax/lout.vim index 9a34328ac..e7a1e1562 100644 --- a/runtime/syntax/lout.vim +++ b/runtime/syntax/lout.vim @@ -16,11 +16,8 @@ " See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -36,11 +33,7 @@ syn sync lines=1000 " Characters allowed in keywords " I don't know if 128-255 are allowed in ANS-FORHT -if version >= 600 - setlocal iskeyword=@,48-57,.,@-@,_,192-255 -else - set iskeyword=@,48-57,.,@-@,_,192-255 -endif +setlocal iskeyword=@,48-57,.,@-@,_,192-255 " Some special keywords syn keyword loutTodo contained TODO lout Lout LOUT @@ -106,44 +99,36 @@ syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=lou syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lout_syn_inits") - if version < 508 - let did_lout_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overrriden later. - HiLink loutTodo Todo - HiLink loutDefine Define - HiLink loutEOmlDef Define - HiLink loutFunction Function - HiLink loutBraceError Error - HiLink loutNULL Special - HiLink loutComment Comment - HiLink loutSpecial Special - HiLink loutSymbols Character - HiLink loutInclude Include - HiLink loutKeyword Keyword - HiLink loutTag Tag - HiLink loutMath Number - - " HiLink Not really needed here, but I think it is more consistent. - HiLink loutMBraces loutMath - hi loutItalic term=italic cterm=italic gui=italic - HiLink loutIBraces loutItalic - hi loutBold term=bold cterm=bold gui=bold - HiLink loutBBraces loutBold - hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic - HiLink loutBIBraces loutBoldItalic - hi loutHeadings term=bold cterm=bold guifg=indianred - HiLink loutHeads loutHeadings - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overrriden later. +HiLink loutTodo Todo +HiLink loutDefine Define +HiLink loutEOmlDef Define +HiLink loutFunction Function +HiLink loutBraceError Error +HiLink loutNULL Special +HiLink loutComment Comment +HiLink loutSpecial Special +HiLink loutSymbols Character +HiLink loutInclude Include +HiLink loutKeyword Keyword +HiLink loutTag Tag +HiLink loutMath Number + +" HiLink Not really needed here, but I think it is more consistent. +HiLink loutMBraces loutMath +hi loutItalic term=italic cterm=italic gui=italic +HiLink loutIBraces loutItalic +hi loutBold term=bold cterm=bold gui=bold +HiLink loutBBraces loutBold +hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic +HiLink loutBIBraces loutBoldItalic +hi loutHeadings term=bold cterm=bold guifg=indianred +HiLink loutHeads loutHeadings + +delcommand HiLink let b:current_syntax = "lout" diff --git a/runtime/syntax/lpc.vim b/runtime/syntax/lpc.vim index e948f3d70..45aba9215 100644 --- a/runtime/syntax/lpc.vim +++ b/runtime/syntax/lpc.vim @@ -9,11 +9,8 @@ " Nodule: This is the start nodule. {{{1 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -360,94 +357,86 @@ endif " Nodule: Highlight links {{{1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lpc_syn_inits") - if version < 508 - let did_lpc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink lpcModifier lpcStorageClass + +HiLink lpcQuotedFmt lpcFormat +HiLink lpcFormat lpcSpecial +HiLink lpcCppString lpcString " Cpp means + " C Pre-Processor +HiLink lpcCommentL lpcComment +HiLink lpcCommentStart lpcComment +HiLink lpcUserLabel lpcLabel +HiLink lpcSpecialCharacter lpcSpecial +HiLink lpcOctal lpcPreProc +HiLink lpcOctalZero lpcSpecial " LPC will treat octal numbers + " as decimals, programmers should + " be aware of that. +HiLink lpcEfunError lpcError +HiLink lpcKeywdError lpcError +HiLink lpcOctalError lpcError +HiLink lpcParenError lpcError +HiLink lpcErrInParen lpcError +HiLink lpcErrInBracket lpcError +HiLink lpcCommentError lpcError +HiLink lpcCommentStartError lpcError +HiLink lpcSpaceError lpcError +HiLink lpcSpecialError lpcError +HiLink lpcErrFunc lpcError - HiLink lpcModifier lpcStorageClass - - HiLink lpcQuotedFmt lpcFormat - HiLink lpcFormat lpcSpecial - HiLink lpcCppString lpcString " Cpp means - " C Pre-Processor - HiLink lpcCommentL lpcComment - HiLink lpcCommentStart lpcComment - HiLink lpcUserLabel lpcLabel - HiLink lpcSpecialCharacter lpcSpecial - HiLink lpcOctal lpcPreProc - HiLink lpcOctalZero lpcSpecial " LPC will treat octal numbers - " as decimals, programmers should - " be aware of that. - HiLink lpcEfunError lpcError - HiLink lpcKeywdError lpcError - HiLink lpcOctalError lpcError - HiLink lpcParenError lpcError - HiLink lpcErrInParen lpcError - HiLink lpcErrInBracket lpcError - HiLink lpcCommentError lpcError - HiLink lpcCommentStartError lpcError - HiLink lpcSpaceError lpcError - HiLink lpcSpecialError lpcError - HiLink lpcErrFunc lpcError - - if exists("lpc_pre_v22") - HiLink lpcOldEfuns lpc_efuns - HiLink lpcNewEfuns lpcError - else - HiLink lpcOldEfuns lpcReserved - HiLink lpcNewEfuns lpc_efuns - endif - HiLink lpc_efuns lpcFunction - - HiLink lpcReserved lpcPreProc - HiLink lpcTextString lpcString " This should be preprocessors, but - HiLink lpcArrayString lpcPreProc " let's make some difference - " between text and array - - HiLink lpcIncluded lpcString - HiLink lpcCommentString lpcString - HiLink lpcComment2String lpcString - HiLink lpcCommentSkip lpcComment - HiLink lpcCommentFunc lpcComment - - HiLink lpcCppSkip lpcCppOut - HiLink lpcCppOut2 lpcCppOut - HiLink lpcCppOut lpcComment - - " Standard type below - HiLink lpcApplies Special - HiLink lpcCharacter Character - HiLink lpcComment Comment - HiLink lpcConditional Conditional - HiLink lpcConstant Constant - HiLink lpcDefine Macro - HiLink lpcError Error - HiLink lpcFloat Float - HiLink lpcFunction Function - HiLink lpcIdentifier Identifier - HiLink lpcInclude Include - HiLink lpcLabel Label - HiLink lpcNumber Number - HiLink lpcOperator Operator - HiLink lpcPreCondit PreCondit - HiLink lpcPreProc PreProc - HiLink lpcRepeat Repeat - HiLink lpcStatement Statement - HiLink lpcStorageClass StorageClass - HiLink lpcString String - HiLink lpcStructure Structure - HiLink lpcSpecial LineNr - HiLink lpcTodo Todo - HiLink lpcType Type - - delcommand HiLink +if exists("lpc_pre_v22") + HiLink lpcOldEfuns lpc_efuns + HiLink lpcNewEfuns lpcError +else + HiLink lpcOldEfuns lpcReserved + HiLink lpcNewEfuns lpc_efuns endif +HiLink lpc_efuns lpcFunction + +HiLink lpcReserved lpcPreProc +HiLink lpcTextString lpcString " This should be preprocessors, but +HiLink lpcArrayString lpcPreProc " let's make some difference + " between text and array + +HiLink lpcIncluded lpcString +HiLink lpcCommentString lpcString +HiLink lpcComment2String lpcString +HiLink lpcCommentSkip lpcComment +HiLink lpcCommentFunc lpcComment + +HiLink lpcCppSkip lpcCppOut +HiLink lpcCppOut2 lpcCppOut +HiLink lpcCppOut lpcComment + +" Standard type below +HiLink lpcApplies Special +HiLink lpcCharacter Character +HiLink lpcComment Comment +HiLink lpcConditional Conditional +HiLink lpcConstant Constant +HiLink lpcDefine Macro +HiLink lpcError Error +HiLink lpcFloat Float +HiLink lpcFunction Function +HiLink lpcIdentifier Identifier +HiLink lpcInclude Include +HiLink lpcLabel Label +HiLink lpcNumber Number +HiLink lpcOperator Operator +HiLink lpcPreCondit PreCondit +HiLink lpcPreProc PreProc +HiLink lpcRepeat Repeat +HiLink lpcStatement Statement +HiLink lpcStorageClass StorageClass +HiLink lpcString String +HiLink lpcStructure Structure +HiLink lpcSpecial LineNr +HiLink lpcTodo Todo +HiLink lpcType Type + +delcommand HiLink " Nodule: This is the end nodule. {{{1 diff --git a/runtime/syntax/lprolog.vim b/runtime/syntax/lprolog.vim index 086c00fd5..125675804 100644 --- a/runtime/syntax/lprolog.vim +++ b/runtime/syntax/lprolog.vim @@ -7,11 +7,8 @@ " 2001 Apr 26 - Upgraded for new Vim version " 2000 Jun 5 - Initial release -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -96,41 +93,33 @@ syn sync maxlines=500 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lprolog_syntax_inits") - if version < 508 - let did_lprolog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink lprologComment Comment - HiLink lprologTodo Todo - - HiLink lprologKeyword Keyword - HiLink lprologSpecial Special - HiLink lprologOperator Operator - HiLink lprologIdentifier Normal - - HiLink lprologInteger Number - HiLink lprologReal Number - HiLink lprologString String - - HiLink lprologCommentErr Error - HiLink lprologBrackErr Error - HiLink lprologParenErr Error - - HiLink lprologModuleName Special - HiLink lprologTypeName Identifier - - HiLink lprologVariable Keyword - HiLink lprologAtom Normal - HiLink lprologClause Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink lprologComment Comment +HiLink lprologTodo Todo + +HiLink lprologKeyword Keyword +HiLink lprologSpecial Special +HiLink lprologOperator Operator +HiLink lprologIdentifier Normal + +HiLink lprologInteger Number +HiLink lprologReal Number +HiLink lprologString String + +HiLink lprologCommentErr Error +HiLink lprologBrackErr Error +HiLink lprologParenErr Error + +HiLink lprologModuleName Special +HiLink lprologTypeName Identifier + +HiLink lprologVariable Keyword +HiLink lprologAtom Normal +HiLink lprologClause Type + +delcommand HiLink let b:current_syntax = "lprolog" diff --git a/runtime/syntax/lscript.vim b/runtime/syntax/lscript.vim index 648a0ebea..2dbd33ddb 100644 --- a/runtime/syntax/lscript.vim +++ b/runtime/syntax/lscript.vim @@ -9,11 +9,8 @@ " and b) I'm not so crash hot at LotusScript either. If you see any problems " feel free to email me with them. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -179,34 +176,26 @@ syn region lscriptLineNumber start="^\d" end="\s" syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lscript_syntax_inits") - if version < 508 - let did_lscript_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold - - HiLink lscriptNotesConst lscriptNotesType - HiLink lscriptLineNumber Comment - HiLink lscriptDatatype Type - HiLink lscriptNumber Number - HiLink lscriptError Error - HiLink lscriptStatement Statement - HiLink lscriptString String - HiLink lscriptComment Comment - HiLink lscriptTodo Todo - HiLink lscriptFunction Identifier - HiLink lscriptMethods PreProc - HiLink lscriptEvents Special - HiLink lscriptTypeSpecifier Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold + +HiLink lscriptNotesConst lscriptNotesType +HiLink lscriptLineNumber Comment +HiLink lscriptDatatype Type +HiLink lscriptNumber Number +HiLink lscriptError Error +HiLink lscriptStatement Statement +HiLink lscriptString String +HiLink lscriptComment Comment +HiLink lscriptTodo Todo +HiLink lscriptFunction Identifier +HiLink lscriptMethods PreProc +HiLink lscriptEvents Special +HiLink lscriptTypeSpecifier Type + +delcommand HiLink let b:current_syntax = "lscript" diff --git a/runtime/syntax/lss.vim b/runtime/syntax/lss.vim index 6620707f9..6ee717bcb 100644 --- a/runtime/syntax/lss.vim +++ b/runtime/syntax/lss.vim @@ -3,11 +3,8 @@ " Maintainer: Scott Bigham <dsb@killerbunnies.org> " Last Change: 2004 Oct 06 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -70,64 +67,57 @@ syn case match syn match lssComment "#.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lss_syntax_inits") - if version < 508 - let did_lss_syntax_inits = 1 - endif - - hi def link lssComment Comment - hi def link lssElement Identifier - - hi def lssBold term=bold cterm=bold - hi def lssReverse term=reverse cterm=reverse - hi def lssUnderline term=underline cterm=underline - hi def lssStandout term=standout cterm=standout - - hi def lssRedFg ctermfg=red - hi def lssBlueFg ctermfg=blue - hi def lssGreenFg ctermfg=green - hi def lssBrownFg ctermfg=brown - hi def lssMagentaFg ctermfg=magenta - hi def lssCyanFg ctermfg=cyan - hi def lssGrayFg ctermfg=gray - if $COLORTERM == "rxvt" - " On rxvt's, bright colors are activated by setting the bold attribute. - hi def lssLightgrayFg ctermfg=gray cterm=bold - hi def lssBrightredFg ctermfg=red cterm=bold - hi def lssBrightgreenFg ctermfg=green cterm=bold - hi def lssYellowFg ctermfg=yellow cterm=bold - hi def lssBrightblueFg ctermfg=blue cterm=bold - hi def lssBrightmagentaFg ctermfg=magenta cterm=bold - hi def lssBrightcyanFg ctermfg=cyan cterm=bold - else - hi def lssLightgrayFg ctermfg=lightgray - hi def lssBrightredFg ctermfg=lightred - hi def lssBrightgreenFg ctermfg=lightgreen - hi def lssYellowFg ctermfg=yellow - hi def lssBrightblueFg ctermfg=lightblue - hi def lssBrightmagentaFg ctermfg=lightmagenta - hi def lssBrightcyanFg ctermfg=lightcyan - endif - - hi def lssRedBg ctermbg=red - hi def lssBlueBg ctermbg=blue - hi def lssGreenBg ctermbg=green - hi def lssBrownBg ctermbg=brown - hi def lssMagentaBg ctermbg=magenta - hi def lssCyanBg ctermbg=cyan - hi def lssLightgrayBg ctermbg=lightgray - hi def lssGrayBg ctermbg=gray - hi def lssBrightredBg ctermbg=lightred - hi def lssBrightgreenBg ctermbg=lightgreen - hi def lssYellowBg ctermbg=yellow - hi def lssBrightblueBg ctermbg=lightblue - hi def lssBrightmagentaBg ctermbg=lightmagenta - hi def lssBrightcyanBg ctermbg=lightcyan - hi def lssWhiteBg ctermbg=white ctermfg=black +" Only when an item doesn't have highlighting yet +hi def link lssComment Comment +hi def link lssElement Identifier + +hi def lssBold term=bold cterm=bold +hi def lssReverse term=reverse cterm=reverse +hi def lssUnderline term=underline cterm=underline +hi def lssStandout term=standout cterm=standout + +hi def lssRedFg ctermfg=red +hi def lssBlueFg ctermfg=blue +hi def lssGreenFg ctermfg=green +hi def lssBrownFg ctermfg=brown +hi def lssMagentaFg ctermfg=magenta +hi def lssCyanFg ctermfg=cyan +hi def lssGrayFg ctermfg=gray +if $COLORTERM == "rxvt" + " On rxvt's, bright colors are activated by setting the bold attribute. + hi def lssLightgrayFg ctermfg=gray cterm=bold + hi def lssBrightredFg ctermfg=red cterm=bold + hi def lssBrightgreenFg ctermfg=green cterm=bold + hi def lssYellowFg ctermfg=yellow cterm=bold + hi def lssBrightblueFg ctermfg=blue cterm=bold + hi def lssBrightmagentaFg ctermfg=magenta cterm=bold + hi def lssBrightcyanFg ctermfg=cyan cterm=bold +else + hi def lssLightgrayFg ctermfg=lightgray + hi def lssBrightredFg ctermfg=lightred + hi def lssBrightgreenFg ctermfg=lightgreen + hi def lssYellowFg ctermfg=yellow + hi def lssBrightblueFg ctermfg=lightblue + hi def lssBrightmagentaFg ctermfg=lightmagenta + hi def lssBrightcyanFg ctermfg=lightcyan endif +hi def lssRedBg ctermbg=red +hi def lssBlueBg ctermbg=blue +hi def lssGreenBg ctermbg=green +hi def lssBrownBg ctermbg=brown +hi def lssMagentaBg ctermbg=magenta +hi def lssCyanBg ctermbg=cyan +hi def lssLightgrayBg ctermbg=lightgray +hi def lssGrayBg ctermbg=gray +hi def lssBrightredBg ctermbg=lightred +hi def lssBrightgreenBg ctermbg=lightgreen +hi def lssYellowBg ctermbg=yellow +hi def lssBrightblueBg ctermbg=lightblue +hi def lssBrightmagentaBg ctermbg=lightmagenta +hi def lssBrightcyanBg ctermbg=lightcyan +hi def lssWhiteBg ctermbg=white ctermfg=black + let b:current_syntax = "lss" " vim: ts=8 diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim index 3ff80b1eb..5ef771bb7 100644 --- a/runtime/syntax/lua.vim +++ b/runtime/syntax/lua.vim @@ -7,11 +7,8 @@ " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) " default 5.2 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -325,40 +322,32 @@ elseif lua_version == 5 endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lua_syntax_inits") - if version < 508 - let did_lua_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink luaStatement Statement - HiLink luaRepeat Repeat - HiLink luaFor Repeat - HiLink luaString String - HiLink luaString2 String - HiLink luaNumber Number - HiLink luaOperator Operator - HiLink luaIn Operator - HiLink luaConstant Constant - HiLink luaCond Conditional - HiLink luaElse Conditional - HiLink luaFunction Function - HiLink luaComment Comment - HiLink luaTodo Todo - HiLink luaTable Structure - HiLink luaError Error - HiLink luaParenError Error - HiLink luaBraceError Error - HiLink luaSpecial SpecialChar - HiLink luaFunc Identifier - HiLink luaLabel Label +HiLink luaStatement Statement +HiLink luaRepeat Repeat +HiLink luaFor Repeat +HiLink luaString String +HiLink luaString2 String +HiLink luaNumber Number +HiLink luaOperator Operator +HiLink luaIn Operator +HiLink luaConstant Constant +HiLink luaCond Conditional +HiLink luaElse Conditional +HiLink luaFunction Function +HiLink luaComment Comment +HiLink luaTodo Todo +HiLink luaTable Structure +HiLink luaError Error +HiLink luaParenError Error +HiLink luaBraceError Error +HiLink luaSpecial SpecialChar +HiLink luaFunc Identifier +HiLink luaLabel Label - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "lua" diff --git a/runtime/syntax/m4.vim b/runtime/syntax/m4.vim index ba7a294d1..832540526 100644 --- a/runtime/syntax/m4.vim +++ b/runtime/syntax/m4.vim @@ -8,15 +8,12 @@ " capital letters and have at least one argument (i.e. the '(' " must be there). Let me know if this is a problem. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish -endif -" we define it here so that included files can test for it + if exists("b:current_syntax") + finish + endif + " we define it here so that included files can test for it let main_syntax='m4' endif @@ -39,30 +36,22 @@ syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringConte syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_m4_syn_inits") - if version < 508 - let did_m4_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink m4Delimiter Delimiter - HiLink m4Comment Comment - HiLink m4Function Function - HiLink m4Keyword Keyword - HiLink m4Special Special - HiLink m4String String - HiLink m4Statement Statement - HiLink m4Preproc PreProc - HiLink m4Type Type - HiLink m4Special Special - HiLink m4Variable Special - HiLink m4Constants Constant - HiLink m4Builtin Statement - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink m4Delimiter Delimiter +HiLink m4Comment Comment +HiLink m4Function Function +HiLink m4Keyword Keyword +HiLink m4Special Special +HiLink m4String String +HiLink m4Statement Statement +HiLink m4Preproc PreProc +HiLink m4Type Type +HiLink m4Special Special +HiLink m4Variable Special +HiLink m4Constants Constant +HiLink m4Builtin Statement +delcommand HiLink let b:current_syntax = "m4" diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index 35b09341a..f022a4e9a 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/make.vim " Last Change: 2015 Feb 28 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -101,40 +98,32 @@ syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Z syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}\s*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_make_syn_inits") - if version < 508 - let did_make_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink makeNextLine makeSpecial - HiLink makeCmdNextLine makeSpecial - HiLink makeSpecTarget Statement - if !exists("make_no_commands") - HiLink makeCommands Number - endif - HiLink makeImplicit Function - HiLink makeTarget Function - HiLink makeInclude Include - HiLink makePreCondit PreCondit - HiLink makeStatement Statement - HiLink makeIdent Identifier - HiLink makeSpecial Special - HiLink makeComment Comment - HiLink makeDString String - HiLink makeSString String - HiLink makeBString Function - HiLink makeError Error - HiLink makeTodo Todo - HiLink makeDefine Define - HiLink makeCommandError Error - HiLink makeConfig PreCondit - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink makeNextLine makeSpecial +HiLink makeCmdNextLine makeSpecial +HiLink makeSpecTarget Statement +if !exists("make_no_commands") +HiLink makeCommands Number endif +HiLink makeImplicit Function +HiLink makeTarget Function +HiLink makeInclude Include +HiLink makePreCondit PreCondit +HiLink makeStatement Statement +HiLink makeIdent Identifier +HiLink makeSpecial Special +HiLink makeComment Comment +HiLink makeDString String +HiLink makeSString String +HiLink makeBString Function +HiLink makeError Error +HiLink makeTodo Todo +HiLink makeDefine Define +HiLink makeCommandError Error +HiLink makeConfig PreCondit +delcommand HiLink let b:current_syntax = "make" diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim index fbc1847e6..d6c87649f 100644 --- a/runtime/syntax/man.vim +++ b/runtime/syntax/man.vim @@ -9,20 +9,13 @@ " * manSubHeading " * manSynopsis (only for sections 2 and 3) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Get the CTRL-H syntax to handle backspaced text -if version >= 600 - runtime! syntax/ctrlh.vim -else - source <sfile>:p:h/ctrlh.vim -endif +runtime! syntax/ctrlh.vim syn case ignore syn match manReference "\f\+([1-9][a-z]\=)" @@ -41,26 +34,18 @@ endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_man_syn_inits") - if version < 508 - let did_man_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink manTitle Title - HiLink manSectionHeading Statement - HiLink manOptionDesc Constant - HiLink manLongOptionDesc Constant - HiLink manReference PreProc - HiLink manSubHeading Function - HiLink manCFuncDefinition Function - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink manTitle Title +HiLink manSectionHeading Statement +HiLink manOptionDesc Constant +HiLink manLongOptionDesc Constant +HiLink manReference PreProc +HiLink manSubHeading Function +HiLink manCFuncDefinition Function + +delcommand HiLink let b:current_syntax = "man" diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim index 77b1507b3..ad94053b3 100644 --- a/runtime/syntax/maple.vim +++ b/runtime/syntax/maple.vim @@ -21,11 +21,8 @@ " but only the contents of packages of Maple V Release 4, and the top-level " routines of Release 4. <Jacques Carette - carette@mcmaster.ca> -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -551,82 +548,74 @@ endif " ===================================================================== " Highlighting: Define the default highlighting. {{{1 -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_maplev_syntax_inits") - if version < 508 - let did_maplev_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Maple->Maple Links {{{2 - HiLink mvBraceError mvError - HiLink mvCurlyError mvError - HiLink mvDebug mvTodo - HiLink mvParenError mvError - HiLink mvPkg_DEtools mvPkgFunc - HiLink mvPkg_Galois mvPkgFunc - HiLink mvPkg_GaussInt mvPkgFunc - HiLink mvPkg_LREtools mvPkgFunc - HiLink mvPkg_combinat mvPkgFunc - HiLink mvPkg_combstruct mvPkgFunc - HiLink mvPkg_difforms mvPkgFunc - HiLink mvPkg_finance mvPkgFunc - HiLink mvPkg_genfunc mvPkgFunc - HiLink mvPkg_geometry mvPkgFunc - HiLink mvPkg_grobner mvPkgFunc - HiLink mvPkg_group mvPkgFunc - HiLink mvPkg_inttrans mvPkgFunc - HiLink mvPkg_liesymm mvPkgFunc - HiLink mvPkg_linalg mvPkgFunc - HiLink mvPkg_logic mvPkgFunc - HiLink mvPkg_networks mvPkgFunc - HiLink mvPkg_numapprox mvPkgFunc - HiLink mvPkg_numtheory mvPkgFunc - HiLink mvPkg_orthopoly mvPkgFunc - HiLink mvPkg_padic mvPkgFunc - HiLink mvPkg_plots mvPkgFunc - HiLink mvPkg_plottools mvPkgFunc - HiLink mvPkg_powseries mvPkgFunc - HiLink mvPkg_process mvPkgFunc - HiLink mvPkg_simplex mvPkgFunc - HiLink mvPkg_stats mvPkgFunc - HiLink mvPkg_student mvPkgFunc - HiLink mvPkg_sumtools mvPkgFunc - HiLink mvPkg_tensor mvPkgFunc - HiLink mvPkg_totorder mvPkgFunc - HiLink mvRange mvOper - HiLink mvSemiError mvError - HiLink mvDelim Delimiter - - " Maple->Standard Links {{{2 - HiLink mvAssign Delimiter - HiLink mvBool Boolean - HiLink mvComma Delimiter - HiLink mvComment Comment - HiLink mvCond Conditional - HiLink mvConstant Number - HiLink mvDelayEval Label - HiLink mvDcolon Delimiter - HiLink mvError Error - HiLink mvLibrary Statement - HiLink mvNumber Number - HiLink mvOper Operator - HiLink mvAssign Delimiter - HiLink mvPackage Type - HiLink mvPkgFunc Function - HiLink mvPktOption Special - HiLink mvRepeat Repeat - HiLink mvSpecial Special - HiLink mvStatement Statement - HiLink mvName String - HiLink mvString String - HiLink mvTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" Maple->Maple Links {{{2 +HiLink mvBraceError mvError +HiLink mvCurlyError mvError +HiLink mvDebug mvTodo +HiLink mvParenError mvError +HiLink mvPkg_DEtools mvPkgFunc +HiLink mvPkg_Galois mvPkgFunc +HiLink mvPkg_GaussInt mvPkgFunc +HiLink mvPkg_LREtools mvPkgFunc +HiLink mvPkg_combinat mvPkgFunc +HiLink mvPkg_combstruct mvPkgFunc +HiLink mvPkg_difforms mvPkgFunc +HiLink mvPkg_finance mvPkgFunc +HiLink mvPkg_genfunc mvPkgFunc +HiLink mvPkg_geometry mvPkgFunc +HiLink mvPkg_grobner mvPkgFunc +HiLink mvPkg_group mvPkgFunc +HiLink mvPkg_inttrans mvPkgFunc +HiLink mvPkg_liesymm mvPkgFunc +HiLink mvPkg_linalg mvPkgFunc +HiLink mvPkg_logic mvPkgFunc +HiLink mvPkg_networks mvPkgFunc +HiLink mvPkg_numapprox mvPkgFunc +HiLink mvPkg_numtheory mvPkgFunc +HiLink mvPkg_orthopoly mvPkgFunc +HiLink mvPkg_padic mvPkgFunc +HiLink mvPkg_plots mvPkgFunc +HiLink mvPkg_plottools mvPkgFunc +HiLink mvPkg_powseries mvPkgFunc +HiLink mvPkg_process mvPkgFunc +HiLink mvPkg_simplex mvPkgFunc +HiLink mvPkg_stats mvPkgFunc +HiLink mvPkg_student mvPkgFunc +HiLink mvPkg_sumtools mvPkgFunc +HiLink mvPkg_tensor mvPkgFunc +HiLink mvPkg_totorder mvPkgFunc +HiLink mvRange mvOper +HiLink mvSemiError mvError +HiLink mvDelim Delimiter + +" Maple->Standard Links {{{2 +HiLink mvAssign Delimiter +HiLink mvBool Boolean +HiLink mvComma Delimiter +HiLink mvComment Comment +HiLink mvCond Conditional +HiLink mvConstant Number +HiLink mvDelayEval Label +HiLink mvDcolon Delimiter +HiLink mvError Error +HiLink mvLibrary Statement +HiLink mvNumber Number +HiLink mvOper Operator +HiLink mvAssign Delimiter +HiLink mvPackage Type +HiLink mvPkgFunc Function +HiLink mvPktOption Special +HiLink mvRepeat Repeat +HiLink mvSpecial Special +HiLink mvStatement Statement +HiLink mvName String +HiLink mvString String +HiLink mvTodo Todo + +delcommand HiLink " Current Syntax: {{{1 let b:current_syntax = "maple" diff --git a/runtime/syntax/markdown.vim b/runtime/syntax/markdown.vim index 068115e92..1955a7443 100644 --- a/runtime/syntax/markdown.vim +++ b/runtime/syntax/markdown.vim @@ -2,7 +2,7 @@ " Language: Markdown " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.markdown -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -70,29 +70,34 @@ syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+ syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained -syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" keepend nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart +syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline -syn region markdownItalic start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart -syn region markdownItalic start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart -syn region markdownBold start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic -syn region markdownBold start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic -syn region markdownBoldItalic start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart -syn region markdownBoldItalic start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart +let s:concealends = has('conceal') ? ' concealends' : '' +exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends +exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends +exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends +exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends +exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart' . s:concealends +exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart' . s:concealends + syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend +syn match markdownFootnote "\[^[^\]]\+\]" +syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:" + if main_syntax ==# 'markdown' for s:type in g:markdown_fenced_languages - exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') + exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') endfor unlet! s:type endif -syn match markdownEscape "\\[][\\`*_{}()#+.!-]" +syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]" syn match markdownError "\w\@<=_\w\@=" hi def link markdownH1 htmlH1 @@ -108,6 +113,9 @@ hi def link markdownListMarker htmlTagName hi def link markdownBlockquote Comment hi def link markdownRule PreProc +hi def link markdownFootnote Typedef +hi def link markdownFootnoteDefinition Typedef + hi def link markdownLinkText htmlLink hi def link markdownIdDeclaration Typedef hi def link markdownId Type @@ -119,8 +127,11 @@ hi def link markdownUrlDelimiter htmlTag hi def link markdownUrlTitleDelimiter Delimiter hi def link markdownItalic htmlItalic +hi def link markdownItalicDelimiter markdownItalic hi def link markdownBold htmlBold +hi def link markdownBoldDelimiter markdownBold hi def link markdownBoldItalic htmlBoldItalic +hi def link markdownBoldItalicDelimiter markdownBoldItalic hi def link markdownCodeDelimiter Delimiter hi def link markdownEscape Special diff --git a/runtime/syntax/mason.vim b/runtime/syntax/mason.vim index 40bdb0eaa..6789e11ae 100644 --- a/runtime/syntax/mason.vim +++ b/runtime/syntax/mason.vim @@ -13,12 +13,8 @@ " - Fix <%text> blocks to show HTML tags but ignore Mason tags. " -" Clear previous syntax settings unless this is v6 or above, in which case just -" exit without doing anything. -" -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -30,22 +26,14 @@ endif " First pull in the HTML syntax. " -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreproc add=@masonTop " Now pull in the Perl syntax. " -if version < 600 - syn include @perlTop <sfile>:p:h/perl.vim -else - syn include @perlTop syntax/perl.vim -endif +syn include @perlTop syntax/perl.vim " It's hard to reduce down to the correct sub-set of Perl to highlight in some " of these cases so I've taken the safe option of just using perlTop in all of @@ -78,19 +66,7 @@ syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs, " Set up default highlighting. Almost all of this is done in the included " syntax files. -" -if version >= 508 || !exists("did_mason_syn_inits") - if version < 508 - let did_mason_syn_inits = 1 - com -nargs=+ HiLink hi link <args> - else - com -nargs=+ HiLink hi def link <args> - endif - - HiLink masonDoc Comment - - delc HiLink -endif +hi def link masonDoc Comment let b:current_syntax = "mason" diff --git a/runtime/syntax/master.vim b/runtime/syntax/master.vim index 40d644eef..14440ee13 100644 --- a/runtime/syntax/master.vim +++ b/runtime/syntax/master.vim @@ -8,11 +8,8 @@ " this is a very simple syntax file - I will be improving it " add entire DEFINE syntax -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -28,22 +25,14 @@ syn region masterString start=+'+ end=+'+ syn match masterComment "\$.*" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_master_syntax_inits") - if version < 508 - let did_master_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink masterKeyword Keyword - HiLink masterComment Comment - HiLink masterString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink masterKeyword Keyword +HiLink masterComment Comment +HiLink masterString String + +delcommand HiLink let b:current_syntax = "master" diff --git a/runtime/syntax/matlab.vim b/runtime/syntax/matlab.vim index 3828f3e8a..9cc2be877 100644 --- a/runtime/syntax/matlab.vim +++ b/runtime/syntax/matlab.vim @@ -8,11 +8,8 @@ " Change History: " - 'global' and 'persistent' keyword are now recognized -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -76,49 +73,41 @@ syn match matlabError "-\=\<\d\+\.\d\+\.[^*/\\^]" syn match matlabError "-\=\<\d\+\.\d\+[eEdD][-+]\=\d\+\.\([^*/\\^]\)" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_matlab_syntax_inits") - if version < 508 - let did_matlab_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink matlabTransposeOperator matlabOperator - HiLink matlabOperator Operator - HiLink matlabLineContinuation Special - HiLink matlabLabel Label - HiLink matlabConditional Conditional - HiLink matlabExceptions Conditional - HiLink matlabRepeat Repeat - HiLink matlabTodo Todo - HiLink matlabString String - HiLink matlabDelimiter Identifier - HiLink matlabTransposeOther Identifier - HiLink matlabNumber Number - HiLink matlabFloat Float - HiLink matlabFunction Function - HiLink matlabError Error - HiLink matlabImplicit matlabStatement - HiLink matlabStatement Statement - HiLink matlabOO Statement - HiLink matlabSemicolon SpecialChar - HiLink matlabComment Comment - HiLink matlabMultilineComment Comment - HiLink matlabScope Type - - HiLink matlabArithmeticOperator matlabOperator - HiLink matlabRelationalOperator matlabOperator - HiLink matlabLogicalOperator matlabOperator +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink matlabTransposeOperator matlabOperator +HiLink matlabOperator Operator +HiLink matlabLineContinuation Special +HiLink matlabLabel Label +HiLink matlabConditional Conditional +HiLink matlabExceptions Conditional +HiLink matlabRepeat Repeat +HiLink matlabTodo Todo +HiLink matlabString String +HiLink matlabDelimiter Identifier +HiLink matlabTransposeOther Identifier +HiLink matlabNumber Number +HiLink matlabFloat Float +HiLink matlabFunction Function +HiLink matlabError Error +HiLink matlabImplicit matlabStatement +HiLink matlabStatement Statement +HiLink matlabOO Statement +HiLink matlabSemicolon SpecialChar +HiLink matlabComment Comment +HiLink matlabMultilineComment Comment +HiLink matlabScope Type + +HiLink matlabArithmeticOperator matlabOperator +HiLink matlabRelationalOperator matlabOperator +HiLink matlabLogicalOperator matlabOperator "optional highlighting - "HiLink matlabIdentifier Identifier - "HiLink matlabTab Error +"HiLink matlabIdentifier Identifier +"HiLink matlabTab Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "matlab" diff --git a/runtime/syntax/maxima.vim b/runtime/syntax/maxima.vim index 27dcc1884..be13b0ef2 100644 --- a/runtime/syntax/maxima.vim +++ b/runtime/syntax/maxima.vim @@ -6,11 +6,8 @@ " Adapted mostly from xmath.vim " Number formats adapted from r.vim " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -234,41 +231,33 @@ syn sync match maximaSyncComment grouphere maximaCommentBlock "/*" syn sync match maximaSyncComment groupthere NONE "*/" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_maxima_syntax_inits") - if version < 508 - let did_maxima_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink maximaBraceError maximaError - HiLink maximaCmd maximaStatement - HiLink maximaCurlyError maximaError - HiLink maximaFuncCmd maximaStatement - HiLink maximaParenError maximaError +HiLink maximaBraceError maximaError +HiLink maximaCmd maximaStatement +HiLink maximaCurlyError maximaError +HiLink maximaFuncCmd maximaStatement +HiLink maximaParenError maximaError - " The default methods for highlighting. Can be overridden later - HiLink maximaCharacter Character - HiLink maximaComma Function - HiLink maximaCommentBlock Comment - HiLink maximaConditional Conditional - HiLink maximaError Error - HiLink maximaFunc Delimiter - HiLink maximaOp Delimiter - HiLink maximaLabel PreProc - HiLink maximaNumber Number - HiLink maximaFloat Float - HiLink maximaRepeat Repeat - HiLink maximaSpecial Type - HiLink maximaSpecialChar SpecialChar - HiLink maximaStatement Statement - HiLink maximaString String - HiLink maximaTodo Todo +" The default methods for highlighting. Can be overridden later +HiLink maximaCharacter Character +HiLink maximaComma Function +HiLink maximaCommentBlock Comment +HiLink maximaConditional Conditional +HiLink maximaError Error +HiLink maximaFunc Delimiter +HiLink maximaOp Delimiter +HiLink maximaLabel PreProc +HiLink maximaNumber Number +HiLink maximaFloat Float +HiLink maximaRepeat Repeat +HiLink maximaSpecial Type +HiLink maximaSpecialChar SpecialChar +HiLink maximaStatement Statement +HiLink maximaString String +HiLink maximaTodo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "maxima" diff --git a/runtime/syntax/mel.vim b/runtime/syntax/mel.vim index dab894865..9f4d5fc46 100644 --- a/runtime/syntax/mel.vim +++ b/runtime/syntax/mel.vim @@ -4,11 +4,8 @@ " Last Change: May 27 1999 " Based on: Bram Moolenaar <Bram@vim.org> C syntax file -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -77,45 +74,37 @@ endif exec "sy sync ccomment melComment minlines=" . mel_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_mel_syntax_inits") - if version < 508 - let did_mel_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink melBoolean Boolean - HiLink melFunction Function - HiLink melIdentifier Identifier - HiLink melStatement Statement - HiLink melConditional Conditional - HiLink melRepeat Repeat - HiLink melLabel Label - HiLink melOperator Operator - HiLink melKeyword Keyword - HiLink melException Exception - HiLink melInclude Include - HiLink melType Type - HiLink melStorageClass StorageClass - HiLink melDebug Debug - HiLink melTodo Todo - HiLink melCharSpecial SpecialChar - HiLink melString String - HiLink melInteger Number - HiLink melFloat Float - HiLink melMatrixVector Float - HiLink melComment Comment - HiLink melError Error - HiLink melSpaceError melError - HiLink melCharError melError - HiLink melParenError melError - HiLink melInParen melError - HiLink melCommentError melError - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink melBoolean Boolean +HiLink melFunction Function +HiLink melIdentifier Identifier +HiLink melStatement Statement +HiLink melConditional Conditional +HiLink melRepeat Repeat +HiLink melLabel Label +HiLink melOperator Operator +HiLink melKeyword Keyword +HiLink melException Exception +HiLink melInclude Include +HiLink melType Type +HiLink melStorageClass StorageClass +HiLink melDebug Debug +HiLink melTodo Todo +HiLink melCharSpecial SpecialChar +HiLink melString String +HiLink melInteger Number +HiLink melFloat Float +HiLink melMatrixVector Float +HiLink melComment Comment +HiLink melError Error +HiLink melSpaceError melError +HiLink melCharError melError +HiLink melParenError melError +HiLink melInParen melError +HiLink melCommentError melError + +delcommand HiLink let b:current_syntax = "mel" diff --git a/runtime/syntax/mf.vim b/runtime/syntax/mf.vim index 8bc48fee4..e277c2d6c 100644 --- a/runtime/syntax/mf.vim +++ b/runtime/syntax/mf.vim @@ -3,11 +3,8 @@ " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> " Last Change: April 25, 2001 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -157,40 +154,32 @@ syn match mfComment "%.*$" syn sync maxlines=50 " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_mf_syntax_inits") - if version < 508 - let did_mf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink mfBoolExp Statement - HiLink mfNumExp Statement - HiLink mfInternal Identifier - HiLink mfPairExp Statement - HiLink mfPathExp Statement - HiLink mfPenExp Statement - HiLink mfPicExp Statement - HiLink mfStringExp Statement - HiLink mfCommand Statement - HiLink mfType Type - HiLink mfStatement Statement - HiLink mfDefinition Statement - HiLink mfCondition Conditional - HiLink mfPrimitive Statement - HiLink mfMacro Macro - HiLink mfCoord Identifier - HiLink mfPoint Identifier - HiLink mfNumeric Number - HiLink mfLength Number - HiLink mfComment Comment - HiLink mfString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink mfBoolExp Statement +HiLink mfNumExp Statement +HiLink mfInternal Identifier +HiLink mfPairExp Statement +HiLink mfPathExp Statement +HiLink mfPenExp Statement +HiLink mfPicExp Statement +HiLink mfStringExp Statement +HiLink mfCommand Statement +HiLink mfType Type +HiLink mfStatement Statement +HiLink mfDefinition Statement +HiLink mfCondition Conditional +HiLink mfPrimitive Statement +HiLink mfMacro Macro +HiLink mfCoord Identifier +HiLink mfPoint Identifier +HiLink mfNumeric Number +HiLink mfLength Number +HiLink mfComment Comment +HiLink mfString String + +delcommand HiLink let b:current_syntax = "mf" diff --git a/runtime/syntax/mgl.vim b/runtime/syntax/mgl.vim index 55ae137f2..4fd718e05 100644 --- a/runtime/syntax/mgl.vim +++ b/runtime/syntax/mgl.vim @@ -6,9 +6,8 @@ " " $Id: mgl.vim,v 1.1 2006/02/21 22:08:20 vimboss Exp $ " -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -84,43 +83,35 @@ syn keyword mglPredefined exception " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_mgl_syn_inits") - if version < 508 - let did_mgl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink mglBoolean Boolean - HiLink mglComment Comment - HiLink mglConditional Conditional - HiLink mglConstant Constant - HiLink mglException Exception - HiLink mglFunction Function - HiLink mglLabel Label - HiLink mglMatrixDelimiter Identifier - HiLink mglNumber Number - HiLink mglHexNumber Number - HiLink mglCharacter Number - HiLink mglIpAddr Number - HiLink mglOperator Operator - HiLink mglPredefined mglFunction - HiLink mglPreProc PreProc - HiLink mglRepeat Repeat - HiLink mglStatement Statement - HiLink mglString String - HiLink mglStringEscape Special - HiLink mglStringEscapeGPC Special - HiLink mglStringError Error - HiLink mglStruct mglStatement - HiLink mglSymbolOperator mglOperator - HiLink mglType Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink mglBoolean Boolean +HiLink mglComment Comment +HiLink mglConditional Conditional +HiLink mglConstant Constant +HiLink mglException Exception +HiLink mglFunction Function +HiLink mglLabel Label +HiLink mglMatrixDelimiter Identifier +HiLink mglNumber Number +HiLink mglHexNumber Number +HiLink mglCharacter Number +HiLink mglIpAddr Number +HiLink mglOperator Operator +HiLink mglPredefined mglFunction +HiLink mglPreProc PreProc +HiLink mglRepeat Repeat +HiLink mglStatement Statement +HiLink mglString String +HiLink mglStringEscape Special +HiLink mglStringEscapeGPC Special +HiLink mglStringError Error +HiLink mglStruct mglStatement +HiLink mglSymbolOperator mglOperator +HiLink mglType Type + +delcommand HiLink let b:current_syntax = "mgl" diff --git a/runtime/syntax/mgp.vim b/runtime/syntax/mgp.vim index 76b96612e..a5c6186c4 100644 --- a/runtime/syntax/mgp.vim +++ b/runtime/syntax/mgp.vim @@ -10,11 +10,8 @@ " SPAM is _NOT_ welcome - be ready to be reported! -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -48,36 +45,27 @@ syn match mgpNoDefault +^%nodefault$+ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_mgp_syn_inits") - let did_mgp_syn_inits = 1 - if version < 508 - let did_mgp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink mgpLineSkip Special +HiLink mgpLineSkip Special - HiLink mgpHash mgpComment - HiLink mgpPercent mgpComment - HiLink mgpComment Comment +HiLink mgpHash mgpComment +HiLink mgpPercent mgpComment +HiLink mgpComment Comment - HiLink mgpCommand Identifier +HiLink mgpCommand Identifier - HiLink mgpLine Type +HiLink mgpLine Type - HiLink mgpFile String - HiLink mgpSize Number - HiLink mgpValue Number +HiLink mgpFile String +HiLink mgpSize Number +HiLink mgpValue Number - HiLink mgpPage mgpDefine - HiLink mgpNoDefault mgpDefine - HiLink mgpDefine Define +HiLink mgpPage mgpDefine +HiLink mgpNoDefault mgpDefine +HiLink mgpDefine Define - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "mgp" diff --git a/runtime/syntax/mma.vim b/runtime/syntax/mma.vim index c63beb119..9bdb7019b 100644 --- a/runtime/syntax/mma.vim +++ b/runtime/syntax/mma.vim @@ -35,9 +35,8 @@ " fix nesting " finish populating popular symbols -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -283,47 +282,40 @@ syntax sync fromstart "set foldnestmax=1 "set foldminlines=15 -if version >= 508 || !exists("did_mma_syn_inits") - if version < 508 - let did_mma_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " NOTE - the following links are not guaranteed to - " look good under all colorschemes. You might need to - " :so $VIMRUNTIME/syntax/hitest.vim and tweak these to - " look good in yours - - - HiLink mmaComment Comment - HiLink mmaCommentStar Comment - HiLink mmaFunctionComment Comment - HiLink mmaLooseQuote Comment - HiLink mmaGenericFunction Function - HiLink mmaVariable Identifier +command -nargs=+ HiLink hi def link <args> + +" NOTE - the following links are not guaranteed to +" look good under all colorschemes. You might need to +" :so $VIMRUNTIME/syntax/hitest.vim and tweak these to +" look good in yours + + +HiLink mmaComment Comment +HiLink mmaCommentStar Comment +HiLink mmaFunctionComment Comment +HiLink mmaLooseQuote Comment +HiLink mmaGenericFunction Function +HiLink mmaVariable Identifier " HiLink mmaSymbol Identifier - HiLink mmaOperator Operator - HiLink mmaPatternOp Operator - HiLink mmaPureFunction Operator - HiLink mmaString String - HiLink mmaCommentString String - HiLink mmaUnicode String - HiLink mmaMessage Type - HiLink mmaNumber Type - HiLink mmaPattern Type - HiLink mmaError Error - HiLink mmaFixme Error - HiLink mmaPatternError Error - HiLink mmaTodo Todo - HiLink mmaemPHAsis Special - HiLink mmaFunctionTitle Special - HiLink mmaMessageType Special - HiLink mmaItem Preproc - - delcommand HiLink -endif +HiLink mmaOperator Operator +HiLink mmaPatternOp Operator +HiLink mmaPureFunction Operator +HiLink mmaString String +HiLink mmaCommentString String +HiLink mmaUnicode String +HiLink mmaMessage Type +HiLink mmaNumber Type +HiLink mmaPattern Type +HiLink mmaError Error +HiLink mmaFixme Error +HiLink mmaPatternError Error +HiLink mmaTodo Todo +HiLink mmaemPHAsis Special +HiLink mmaFunctionTitle Special +HiLink mmaMessageType Special +HiLink mmaItem Preproc + +delcommand HiLink let b:current_syntax = "mma" diff --git a/runtime/syntax/mmix.vim b/runtime/syntax/mmix.vim index 79ca78140..724bdd35e 100644 --- a/runtime/syntax/mmix.vim +++ b/runtime/syntax/mmix.vim @@ -9,9 +9,8 @@ " Limitations: Comments must start with either % or // " (preferably %, Knuth-Style) -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -119,44 +118,36 @@ syn match mmixRegister "r[A-Z]" syn keyword mmixRegister rBB rTT rWW rXX rYY rZZ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_mmix_syntax_inits") - if version < 508 - let did_mmix_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink mmixAt Type - HiLink mmixPseudo Type - HiLink mmixRegister Special - HiLink mmixSegments Type - - HiLink mmixLabel Special - HiLink mmixComment Comment - HiLink mmixOpcode Keyword - - HiLink hexNumber Number - HiLink decNumber Number - HiLink octNumber Number - - HiLink mmixString String - HiLink mmixChar String - - HiLink mmixType Type - HiLink mmixIdentifier Normal - HiLink mmixSpecialComment Comment - - " My default color overrides: - " hi mmixSpecialComment ctermfg=red - "hi mmixLabel ctermfg=lightcyan - " hi mmixType ctermbg=black ctermfg=brown - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink mmixAt Type +HiLink mmixPseudo Type +HiLink mmixRegister Special +HiLink mmixSegments Type + +HiLink mmixLabel Special +HiLink mmixComment Comment +HiLink mmixOpcode Keyword + +HiLink hexNumber Number +HiLink decNumber Number +HiLink octNumber Number + +HiLink mmixString String +HiLink mmixChar String + +HiLink mmixType Type +HiLink mmixIdentifier Normal +HiLink mmixSpecialComment Comment + +" My default color overrides: +" hi mmixSpecialComment ctermfg=red +"hi mmixLabel ctermfg=lightcyan +" hi mmixType ctermbg=black ctermfg=brown + +delcommand HiLink let b:current_syntax = "mmix" diff --git a/runtime/syntax/mmp.vim b/runtime/syntax/mmp.vim index 0117e7792..d0b9f7cfb 100644 --- a/runtime/syntax/mmp.vim +++ b/runtime/syntax/mmp.vim @@ -5,11 +5,8 @@ " URL: http://ronware.org/wiki/vim/mmp " Filetypes: *.mmp -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -34,8 +31,7 @@ syn match mmpNumber "0x\x\+" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet +" Only when an item doesn't have highlighting yet if !exists("did_mmp_syntax_inits") let did_mmp_syntax_inits=1 diff --git a/runtime/syntax/modsim3.vim b/runtime/syntax/modsim3.vim index 04e9ab9ab..ba1963b69 100644 --- a/runtime/syntax/modsim3.vim +++ b/runtime/syntax/modsim3.vim @@ -12,10 +12,8 @@ " " very basic things only (based on the modula2 and c files). -if version < 600 - " Remove any old syntax stuff hanging around - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -77,31 +75,23 @@ syn region modsim3String start=+"+ end=+"+ syn match modsim3Literal "'[^']'\|''''" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_modsim3_syntax_inits") - if version < 508 - let did_modsim3_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink modsim3Keyword Statement - HiLink modsim3Block Statement - HiLink modsim3Comment1 Comment - HiLink modsim3Comment2 Comment - HiLink modsim3String String - HiLink modsim3Literal Character - HiLink modsim3Include Statement - HiLink modsim3Type Type - HiLink modsim3ParenError Error - HiLink modsim3Builtin Function - HiLink modsim3BuiltinNoParen Function - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink modsim3Keyword Statement +HiLink modsim3Block Statement +HiLink modsim3Comment1 Comment +HiLink modsim3Comment2 Comment +HiLink modsim3String String +HiLink modsim3Literal Character +HiLink modsim3Include Statement +HiLink modsim3Type Type +HiLink modsim3ParenError Error +HiLink modsim3Builtin Function +HiLink modsim3BuiltinNoParen Function + +delcommand HiLink let b:current_syntax = "modsim3" diff --git a/runtime/syntax/modula2.vim b/runtime/syntax/modula2.vim index 3018900e8..9873201cd 100644 --- a/runtime/syntax/modula2.vim +++ b/runtime/syntax/modula2.vim @@ -4,11 +4,8 @@ " based on original work of Bram Moolenaar <Bram@vim.org> " Last Change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -54,32 +51,24 @@ syn region modula2String start="'" end="'" syn region modula2Set start="{" end="}" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_modula2_syntax_inits") - if version < 508 - let did_modula2_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink modula2Ident Identifier - HiLink modula2StdConst Boolean - HiLink modula2Type Identifier - HiLink modula2StdFunc Identifier - HiLink modula2Header Type - HiLink modula2Keyword Statement - HiLink modula2AttKeyword PreProc - HiLink modula2Comment Comment - " The following is just a matter of taste (you want to try this instead): - " hi modula2Comment term=bold ctermfg=DarkBlue guifg=Blue gui=bold - HiLink modula2Todo Todo - HiLink modula2String String - HiLink modula2Set String +HiLink modula2Ident Identifier +HiLink modula2StdConst Boolean +HiLink modula2Type Identifier +HiLink modula2StdFunc Identifier +HiLink modula2Header Type +HiLink modula2Keyword Statement +HiLink modula2AttKeyword PreProc +HiLink modula2Comment Comment +" The following is just a matter of taste (you want to try this instead): +" hi modula2Comment term=bold ctermfg=DarkBlue guifg=Blue gui=bold +HiLink modula2Todo Todo +HiLink modula2String String +HiLink modula2Set String - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "modula2" diff --git a/runtime/syntax/modula3.vim b/runtime/syntax/modula3.vim index d6f72afbc..5f00efb76 100644 --- a/runtime/syntax/modula3.vim +++ b/runtime/syntax/modula3.vim @@ -6,11 +6,8 @@ " Basic things only... " Based on the modula 2 syntax file -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -46,24 +43,16 @@ syn region modula3String start=+"+ end=+"+ syn region modula3String start=+'+ end=+'+ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_modula3_syntax_inits") - if version < 508 - let did_modula3_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " The default methods for highlighting. Can be overridden later - HiLink modula3Keyword Statement - HiLink modula3Block PreProc - HiLink modula3Comment Comment - HiLink modula3String String +" The default methods for highlighting. Can be overridden later +HiLink modula3Keyword Statement +HiLink modula3Block PreProc +HiLink modula3Comment Comment +HiLink modula3String String - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "modula3" diff --git a/runtime/syntax/monk.vim b/runtime/syntax/monk.vim index afe2b5619..851560a3a 100644 --- a/runtime/syntax/monk.vim +++ b/runtime/syntax/monk.vim @@ -21,11 +21,8 @@ " Initializing: -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -60,11 +57,7 @@ syn region monkUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT " R5RS Scheme Functions and Syntax: -if version < 600 - set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -else - setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -endif +setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ syn keyword monkSyntax lambda and or if cond case define let let* letrec syn keyword monkSyntax begin do delay set! else => @@ -201,32 +194,24 @@ syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_monk_syntax_inits") - if version < 508 - let did_monk_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink monkSyntax Statement - HiLink monkFunc Function - - HiLink monkString String - HiLink monkChar Character - HiLink monkNumber Number - HiLink monkBoolean Boolean - - HiLink monkDelimiter Delimiter - HiLink monkConstant Constant - - HiLink monkComment Comment - HiLink monkError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink monkSyntax Statement +HiLink monkFunc Function + +HiLink monkString String +HiLink monkChar Character +HiLink monkNumber Number +HiLink monkBoolean Boolean + +HiLink monkDelimiter Delimiter +HiLink monkConstant Constant + +HiLink monkComment Comment +HiLink monkError Error + +delcommand HiLink let b:current_syntax = "monk" diff --git a/runtime/syntax/moo.vim b/runtime/syntax/moo.vim index 10c5d3b4b..617058f8e 100644 --- a/runtime/syntax/moo.vim +++ b/runtime/syntax/moo.vim @@ -4,8 +4,8 @@ " Last Change: 2001 Oct 06 " Note: Requires Vim 6.0 or above -" Quit when a syntax file was already loaded -if version < 600 || exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/mp.vim b/runtime/syntax/mp.vim index c0fd60b3d..480db2a1b 100644 --- a/runtime/syntax/mp.vim +++ b/runtime/syntax/mp.vim @@ -3,11 +3,8 @@ " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> " Last Change: April 30, 2001 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -15,11 +12,7 @@ let plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost let other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither " Read the Metafont syntax to start with -if version < 600 - source <sfile>:p:h/mf.vim -else - runtime! syntax/mf.vim -endif +runtime! syntax/mf.vim " MetaPost has TeX inserts for typeset labels " verbatimtex, btex, and etex will be treated as keywords @@ -108,24 +101,16 @@ if other_mp_macros endif " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_mp_syntax_inits") - if version < 508 - let did_mp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink mpTeXinsert String - HiLink mpTeXbegin Statement - HiLink mpTeXend Statement - HiLink mpInternal mfInternal - HiLink mpMacro Macro +HiLink mpTeXinsert String +HiLink mpTeXbegin Statement +HiLink mpTeXend Statement +HiLink mpInternal mfInternal +HiLink mpMacro Macro - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "mp" diff --git a/runtime/syntax/msidl.vim b/runtime/syntax/msidl.vim index 79585bebc..3bf5940a8 100644 --- a/runtime/syntax/msidl.vim +++ b/runtime/syntax/msidl.vim @@ -3,11 +3,8 @@ " Maintainer: Vadim Zeitlin <vadim@wxwindows.org> " Last Change: 2012 Feb 12 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -56,39 +53,31 @@ syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandar syn sync lines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_msidl_syntax_inits") - if version < 508 - let did_msidl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink msidlInclude Include - HiLink msidlPreProc PreProc - HiLink msidlPreCondit PreCondit - HiLink msidlDefine Macro - HiLink msidlIncluded String - HiLink msidlString String - HiLink msidlComment Comment - HiLink msidlTodo Todo - HiLink msidlSpecial SpecialChar - HiLink msidlLiteral Number - HiLink msidlUUID Number - - HiLink msidlImport Include - HiLink msidlEnum StorageClass - HiLink msidlStruct Structure - HiLink msidlTypedef Typedef - HiLink msidlAttribute StorageClass - - HiLink msidlStandardType Type - HiLink msidlSafeArray Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink msidlInclude Include +HiLink msidlPreProc PreProc +HiLink msidlPreCondit PreCondit +HiLink msidlDefine Macro +HiLink msidlIncluded String +HiLink msidlString String +HiLink msidlComment Comment +HiLink msidlTodo Todo +HiLink msidlSpecial SpecialChar +HiLink msidlLiteral Number +HiLink msidlUUID Number + +HiLink msidlImport Include +HiLink msidlEnum StorageClass +HiLink msidlStruct Structure +HiLink msidlTypedef Typedef +HiLink msidlAttribute StorageClass + +HiLink msidlStandardType Type +HiLink msidlSafeArray Type + +delcommand HiLink let b:current_syntax = "msidl" diff --git a/runtime/syntax/msmessages.vim b/runtime/syntax/msmessages.vim index 60588571c..5faee978b 100644 --- a/runtime/syntax/msmessages.vim +++ b/runtime/syntax/msmessages.vim @@ -7,11 +7,8 @@ " See format description at <http://msdn2.microsoft.com/en-us/library/aa385646.aspx> " This file is based on the rc.vim and c.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/msql.vim b/runtime/syntax/msql.vim index 0716fbb1f..619578626 100644 --- a/runtime/syntax/msql.vim +++ b/runtime/syntax/msql.vim @@ -8,11 +8,8 @@ " Options msql_sql_query = 1 for SQL syntax highligthing inside strings " msql_minlines = x to sync at least x lines backwards -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -20,12 +17,8 @@ if !exists("main_syntax") let main_syntax = 'msql' endif -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreproc add=msqlRegion @@ -57,39 +50,31 @@ else endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_msql_syn_inits") - if version < 508 - let did_msql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink msqlComment Comment - HiLink msqlString String - HiLink msqlNumber Number - HiLink msqlFloat Float - HiLink msqlIdentifier Identifier - HiLink msqlGlobalIdentifier Identifier - HiLink msqlIntVar Identifier - HiLink msqlEnvVar Identifier - HiLink msqlFunctions Function - HiLink msqlRepeat Repeat - HiLink msqlConditional Conditional - HiLink msqlStatement Statement - HiLink msqlType Type - HiLink msqlInclude Include - HiLink msqlDefine Define - HiLink msqlSpecialChar SpecialChar - HiLink msqlParentError Error - HiLink msqlTodo Todo - HiLink msqlOperator Operator - HiLink msqlRelation Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink msqlComment Comment +HiLink msqlString String +HiLink msqlNumber Number +HiLink msqlFloat Float +HiLink msqlIdentifier Identifier +HiLink msqlGlobalIdentifier Identifier +HiLink msqlIntVar Identifier +HiLink msqlEnvVar Identifier +HiLink msqlFunctions Function +HiLink msqlRepeat Repeat +HiLink msqlConditional Conditional +HiLink msqlStatement Statement +HiLink msqlType Type +HiLink msqlInclude Include +HiLink msqlDefine Define +HiLink msqlSpecialChar SpecialChar +HiLink msqlParentError Error +HiLink msqlTodo Todo +HiLink msqlOperator Operator +HiLink msqlRelation Operator + +delcommand HiLink let b:current_syntax = "msql" diff --git a/runtime/syntax/mupad.vim b/runtime/syntax/mupad.vim index 109f880ee..7f981f0b7 100644 --- a/runtime/syntax/mupad.vim +++ b/runtime/syntax/mupad.vim @@ -5,11 +5,8 @@ " Date: 6/30/2004 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -268,28 +265,21 @@ syn keyword mupadIdentifier Tubular " graphics meta-documentation Attributes syn keyword mupadIdentifier objectGroupsListed -if version >= 508 || !exists("did_mupad_syntax_inits") - if version < 508 - let did_mupad_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink mupadComment Comment - HiLink mupadString String - HiLink mupadOperator Operator - HiLink mupadSpecial Special - HiLink mupadStatement Statement - HiLink mupadUnderlined Underlined - HiLink mupadConditional Conditional - HiLink mupadRepeat Repeat - HiLink mupadFunction Function - HiLink mupadType Type - HiLink mupadDefine Define - HiLink mupadIdentifier Identifier +HiLink mupadComment Comment +HiLink mupadString String +HiLink mupadOperator Operator +HiLink mupadSpecial Special +HiLink mupadStatement Statement +HiLink mupadUnderlined Underlined +HiLink mupadConditional Conditional +HiLink mupadRepeat Repeat +HiLink mupadFunction Function +HiLink mupadType Type +HiLink mupadDefine Define +HiLink mupadIdentifier Identifier - delcommand HiLink -endif +delcommand HiLink " TODO More comprehensive listing. diff --git a/runtime/syntax/mush.vim b/runtime/syntax/mush.vim index 0645f3356..cf95d2a9e 100644 --- a/runtime/syntax/mush.vim +++ b/runtime/syntax/mush.vim @@ -3,11 +3,8 @@ " Based on vim Syntax file by: Bek Oberin <gossamer@tertius.net.au> " Last Updated: Fri Nov 04 20:28:15 2005 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -185,42 +182,35 @@ syntax keyword mushAttribute use va vb vc vd ve vf vg vh vi vj vk vl vm vn syntax keyword mushAttribute vo vp vq vr vs vt vu vv vw vx vy vz -if version >= 508 || !exists("did_mush_syntax_inits") - if version < 508 - let did_mush_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink mushAttribute Constant - HiLink mushCommand Function - HiLink mushNumber Number - HiLink mushSetting PreProc - HiLink mushFunction Statement - HiLink mushVariable Identifier - HiLink mushSpecial Special - HiLink mushTodo Todo - HiLink mushFlag Special - HiLink mushIdentifier Identifier - HiLink mushDefine Macro - HiLink mushPreProc PreProc - HiLink mushPreProcGroup PreProc - HiLink mushPreCondit PreCondit - HiLink mushIncluded cString - HiLink mushInclude Include +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink mushAttribute Constant +HiLink mushCommand Function +HiLink mushNumber Number +HiLink mushSetting PreProc +HiLink mushFunction Statement +HiLink mushVariable Identifier +HiLink mushSpecial Special +HiLink mushTodo Todo +HiLink mushFlag Special +HiLink mushIdentifier Identifier +HiLink mushDefine Macro +HiLink mushPreProc PreProc +HiLink mushPreProcGroup PreProc +HiLink mushPreCondit PreCondit +HiLink mushIncluded cString +HiLink mushInclude Include " Comments - HiLink mushCommentStart mushComment - HiLink mushComment Comment - HiLink mushCommentString mushString +HiLink mushCommentStart mushComment +HiLink mushComment Comment +HiLink mushCommentString mushString - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "mush" diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index 94b27313b..4e073b887 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -6,11 +6,8 @@ " This file covers mutt version 1.7.0 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -18,11 +15,7 @@ let s:cpo_save = &cpo set cpo&vim " Set the keyword characters -if version < 600 - set isk=@,48-57,_,- -else - setlocal isk=@,48-57,_,- -endif +setlocal isk=@,48-57,_,- " handling optional variables if !exists("use_mutt_sidebar") @@ -636,160 +629,152 @@ syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_muttrc_syntax_inits") - if version < 508 - let did_muttrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink muttrcComment Comment - HiLink muttrcEscape SpecialChar - HiLink muttrcRXChars SpecialChar - HiLink muttrcString String - HiLink muttrcRXString String - HiLink muttrcRXString2 String - HiLink muttrcSpecial Special - HiLink muttrcHooks Type - HiLink muttrcGroupFlag Type - HiLink muttrcGroupDef Macro - HiLink muttrcAddrDef muttrcGroupFlag - HiLink muttrcRXDef muttrcGroupFlag - HiLink muttrcRXPat String - HiLink muttrcAliasGroupName Macro - HiLink muttrcAliasKey Identifier - HiLink muttrcUnAliasKey Identifier - HiLink muttrcAliasEncEmail Identifier - HiLink muttrcAliasParens Type - HiLink muttrcSetNumAssignment Number - HiLink muttrcSetBoolAssignment Boolean - HiLink muttrcSetQuadAssignment Boolean - HiLink muttrcSetStrAssignment String - HiLink muttrcEmail Special - HiLink muttrcVariableInner Special - HiLink muttrcEscapedVariable String - HiLink muttrcHeader Type - HiLink muttrcKeySpecial SpecialChar - HiLink muttrcKey Type - HiLink muttrcKeyName SpecialChar - HiLink muttrcVarBool Identifier - HiLink muttrcVarQuad Identifier - HiLink muttrcVarNum Identifier - HiLink muttrcVarStr Identifier - HiLink muttrcMenu Identifier - HiLink muttrcCommand Keyword - HiLink muttrcMacroDescr String - HiLink muttrcAction Macro - HiLink muttrcBadAction Error - HiLink muttrcBindFunction Error - HiLink muttrcBindMenuList Error - HiLink muttrcFunction Macro - HiLink muttrcGroupKeyword muttrcCommand - HiLink muttrcGroupLine Error - HiLink muttrcSubscribeKeyword muttrcCommand - HiLink muttrcSubscribeLine Error - HiLink muttrcListsKeyword muttrcCommand - HiLink muttrcListsLine Error - HiLink muttrcAlternateKeyword muttrcCommand - HiLink muttrcAlternatesLine Error - HiLink muttrcAttachmentsLine muttrcCommand - HiLink muttrcAttachmentsFlag Type - HiLink muttrcAttachmentsMimeType String - HiLink muttrcColorLine Error - HiLink muttrcColorContext Error - HiLink muttrcColorContextI Identifier - HiLink muttrcColorContextH Identifier - HiLink muttrcColorKeyword muttrcCommand - HiLink muttrcColorKeywordI muttrcColorKeyword - HiLink muttrcColorKeywordH muttrcColorKeyword - HiLink muttrcColorField Identifier - HiLink muttrcColor Type - HiLink muttrcColorFG Error - HiLink muttrcColorFGI Error - HiLink muttrcColorFGH Error - HiLink muttrcColorBG Error - HiLink muttrcColorBGI Error - HiLink muttrcColorBGH Error - HiLink muttrcMonoAttrib muttrcColor - HiLink muttrcMono muttrcCommand - HiLink muttrcSimplePat Identifier - HiLink muttrcSimplePatString Macro - HiLink muttrcSimplePatMetas Special - HiLink muttrcPattern Error - HiLink muttrcUnColorLine Error - HiLink muttrcUnColorKeyword muttrcCommand - HiLink muttrcUnColorIndex Identifier - HiLink muttrcShellString muttrcEscape - HiLink muttrcRXHooks muttrcCommand - HiLink muttrcRXHookNot Type - HiLink muttrcPatHooks muttrcCommand - HiLink muttrcPatHookNot Type - HiLink muttrcFormatConditionals2 Type - HiLink muttrcIndexFormatStr muttrcString - HiLink muttrcIndexFormatEscapes muttrcEscape - HiLink muttrcIndexFormatConditionals muttrcFormatConditionals2 - HiLink muttrcAliasFormatStr muttrcString - HiLink muttrcAliasFormatEscapes muttrcEscape - HiLink muttrcAttachFormatStr muttrcString - HiLink muttrcAttachFormatEscapes muttrcEscape - HiLink muttrcAttachFormatConditionals muttrcFormatConditionals2 - HiLink muttrcComposeFormatStr muttrcString - HiLink muttrcComposeFormatEscapes muttrcEscape - HiLink muttrcFolderFormatStr muttrcString - HiLink muttrcFolderFormatEscapes muttrcEscape - HiLink muttrcFolderFormatConditionals muttrcFormatConditionals2 - HiLink muttrcMixFormatStr muttrcString - HiLink muttrcMixFormatEscapes muttrcEscape - HiLink muttrcMixFormatConditionals muttrcFormatConditionals2 - HiLink muttrcPGPFormatStr muttrcString - HiLink muttrcPGPFormatEscapes muttrcEscape - HiLink muttrcPGPFormatConditionals muttrcFormatConditionals2 - HiLink muttrcPGPCmdFormatStr muttrcString - HiLink muttrcPGPCmdFormatEscapes muttrcEscape - HiLink muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 - HiLink muttrcStatusFormatStr muttrcString - HiLink muttrcStatusFormatEscapes muttrcEscape - HiLink muttrcStatusFormatConditionals muttrcFormatConditionals2 - HiLink muttrcPGPGetKeysFormatStr muttrcString - HiLink muttrcPGPGetKeysFormatEscapes muttrcEscape - HiLink muttrcSmimeFormatStr muttrcString - HiLink muttrcSmimeFormatEscapes muttrcEscape - HiLink muttrcSmimeFormatConditionals muttrcFormatConditionals2 - HiLink muttrcTimeEscapes muttrcEscape - HiLink muttrcPGPTimeEscapes muttrcEscape - HiLink muttrcStrftimeEscapes Type - HiLink muttrcStrftimeFormatStr muttrcString - HiLink muttrcFormatErrors Error - - HiLink muttrcBindFunctionNL SpecialChar - HiLink muttrcBindKeyNL SpecialChar - HiLink muttrcBindMenuListNL SpecialChar - HiLink muttrcMacroDescrNL SpecialChar - HiLink muttrcMacroBodyNL SpecialChar - HiLink muttrcMacroKeyNL SpecialChar - HiLink muttrcMacroMenuListNL SpecialChar - HiLink muttrcColorMatchCountNL SpecialChar - HiLink muttrcColorNL SpecialChar - HiLink muttrcColorRXNL SpecialChar - HiLink muttrcColorBGNL SpecialChar - HiLink muttrcColorFGNL SpecialChar - HiLink muttrcAliasNameNL SpecialChar - HiLink muttrcAliasENNL SpecialChar - HiLink muttrcAliasNL SpecialChar - HiLink muttrcUnAliasNL SpecialChar - HiLink muttrcAliasGroupDefNL SpecialChar - HiLink muttrcAliasEncEmailNL SpecialChar - HiLink muttrcPatternNL SpecialChar - HiLink muttrcUnColorPatNL SpecialChar - HiLink muttrcUnColorAPNL SpecialChar - HiLink muttrcUnColorIndexNL SpecialChar - HiLink muttrcStringNL SpecialChar - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink muttrcComment Comment +HiLink muttrcEscape SpecialChar +HiLink muttrcRXChars SpecialChar +HiLink muttrcString String +HiLink muttrcRXString String +HiLink muttrcRXString2 String +HiLink muttrcSpecial Special +HiLink muttrcHooks Type +HiLink muttrcGroupFlag Type +HiLink muttrcGroupDef Macro +HiLink muttrcAddrDef muttrcGroupFlag +HiLink muttrcRXDef muttrcGroupFlag +HiLink muttrcRXPat String +HiLink muttrcAliasGroupName Macro +HiLink muttrcAliasKey Identifier +HiLink muttrcUnAliasKey Identifier +HiLink muttrcAliasEncEmail Identifier +HiLink muttrcAliasParens Type +HiLink muttrcSetNumAssignment Number +HiLink muttrcSetBoolAssignment Boolean +HiLink muttrcSetQuadAssignment Boolean +HiLink muttrcSetStrAssignment String +HiLink muttrcEmail Special +HiLink muttrcVariableInner Special +HiLink muttrcEscapedVariable String +HiLink muttrcHeader Type +HiLink muttrcKeySpecial SpecialChar +HiLink muttrcKey Type +HiLink muttrcKeyName SpecialChar +HiLink muttrcVarBool Identifier +HiLink muttrcVarQuad Identifier +HiLink muttrcVarNum Identifier +HiLink muttrcVarStr Identifier +HiLink muttrcMenu Identifier +HiLink muttrcCommand Keyword +HiLink muttrcMacroDescr String +HiLink muttrcAction Macro +HiLink muttrcBadAction Error +HiLink muttrcBindFunction Error +HiLink muttrcBindMenuList Error +HiLink muttrcFunction Macro +HiLink muttrcGroupKeyword muttrcCommand +HiLink muttrcGroupLine Error +HiLink muttrcSubscribeKeyword muttrcCommand +HiLink muttrcSubscribeLine Error +HiLink muttrcListsKeyword muttrcCommand +HiLink muttrcListsLine Error +HiLink muttrcAlternateKeyword muttrcCommand +HiLink muttrcAlternatesLine Error +HiLink muttrcAttachmentsLine muttrcCommand +HiLink muttrcAttachmentsFlag Type +HiLink muttrcAttachmentsMimeType String +HiLink muttrcColorLine Error +HiLink muttrcColorContext Error +HiLink muttrcColorContextI Identifier +HiLink muttrcColorContextH Identifier +HiLink muttrcColorKeyword muttrcCommand +HiLink muttrcColorKeywordI muttrcColorKeyword +HiLink muttrcColorKeywordH muttrcColorKeyword +HiLink muttrcColorField Identifier +HiLink muttrcColor Type +HiLink muttrcColorFG Error +HiLink muttrcColorFGI Error +HiLink muttrcColorFGH Error +HiLink muttrcColorBG Error +HiLink muttrcColorBGI Error +HiLink muttrcColorBGH Error +HiLink muttrcMonoAttrib muttrcColor +HiLink muttrcMono muttrcCommand +HiLink muttrcSimplePat Identifier +HiLink muttrcSimplePatString Macro +HiLink muttrcSimplePatMetas Special +HiLink muttrcPattern Error +HiLink muttrcUnColorLine Error +HiLink muttrcUnColorKeyword muttrcCommand +HiLink muttrcUnColorIndex Identifier +HiLink muttrcShellString muttrcEscape +HiLink muttrcRXHooks muttrcCommand +HiLink muttrcRXHookNot Type +HiLink muttrcPatHooks muttrcCommand +HiLink muttrcPatHookNot Type +HiLink muttrcFormatConditionals2 Type +HiLink muttrcIndexFormatStr muttrcString +HiLink muttrcIndexFormatEscapes muttrcEscape +HiLink muttrcIndexFormatConditionals muttrcFormatConditionals2 +HiLink muttrcAliasFormatStr muttrcString +HiLink muttrcAliasFormatEscapes muttrcEscape +HiLink muttrcAttachFormatStr muttrcString +HiLink muttrcAttachFormatEscapes muttrcEscape +HiLink muttrcAttachFormatConditionals muttrcFormatConditionals2 +HiLink muttrcComposeFormatStr muttrcString +HiLink muttrcComposeFormatEscapes muttrcEscape +HiLink muttrcFolderFormatStr muttrcString +HiLink muttrcFolderFormatEscapes muttrcEscape +HiLink muttrcFolderFormatConditionals muttrcFormatConditionals2 +HiLink muttrcMixFormatStr muttrcString +HiLink muttrcMixFormatEscapes muttrcEscape +HiLink muttrcMixFormatConditionals muttrcFormatConditionals2 +HiLink muttrcPGPFormatStr muttrcString +HiLink muttrcPGPFormatEscapes muttrcEscape +HiLink muttrcPGPFormatConditionals muttrcFormatConditionals2 +HiLink muttrcPGPCmdFormatStr muttrcString +HiLink muttrcPGPCmdFormatEscapes muttrcEscape +HiLink muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 +HiLink muttrcStatusFormatStr muttrcString +HiLink muttrcStatusFormatEscapes muttrcEscape +HiLink muttrcStatusFormatConditionals muttrcFormatConditionals2 +HiLink muttrcPGPGetKeysFormatStr muttrcString +HiLink muttrcPGPGetKeysFormatEscapes muttrcEscape +HiLink muttrcSmimeFormatStr muttrcString +HiLink muttrcSmimeFormatEscapes muttrcEscape +HiLink muttrcSmimeFormatConditionals muttrcFormatConditionals2 +HiLink muttrcTimeEscapes muttrcEscape +HiLink muttrcPGPTimeEscapes muttrcEscape +HiLink muttrcStrftimeEscapes Type +HiLink muttrcStrftimeFormatStr muttrcString +HiLink muttrcFormatErrors Error + +HiLink muttrcBindFunctionNL SpecialChar +HiLink muttrcBindKeyNL SpecialChar +HiLink muttrcBindMenuListNL SpecialChar +HiLink muttrcMacroDescrNL SpecialChar +HiLink muttrcMacroBodyNL SpecialChar +HiLink muttrcMacroKeyNL SpecialChar +HiLink muttrcMacroMenuListNL SpecialChar +HiLink muttrcColorMatchCountNL SpecialChar +HiLink muttrcColorNL SpecialChar +HiLink muttrcColorRXNL SpecialChar +HiLink muttrcColorBGNL SpecialChar +HiLink muttrcColorFGNL SpecialChar +HiLink muttrcAliasNameNL SpecialChar +HiLink muttrcAliasENNL SpecialChar +HiLink muttrcAliasNL SpecialChar +HiLink muttrcUnAliasNL SpecialChar +HiLink muttrcAliasGroupDefNL SpecialChar +HiLink muttrcAliasEncEmailNL SpecialChar +HiLink muttrcPatternNL SpecialChar +HiLink muttrcUnColorPatNL SpecialChar +HiLink muttrcUnColorAPNL SpecialChar +HiLink muttrcUnColorIndexNL SpecialChar +HiLink muttrcStringNL SpecialChar + +delcommand HiLink let b:current_syntax = "muttrc" diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim index d7cf74710..8d0361c22 100644 --- a/runtime/syntax/mysql.vim +++ b/runtime/syntax/mysql.vim @@ -6,11 +6,8 @@ " 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 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -273,29 +270,21 @@ syn region mysqlFunction start="weekday(" end=")" contains=ALL syn region mysqlFunction start="yearweek(" end=")" contains=ALL " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_mysql_syn_inits") - if version < 508 - let did_mysql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink mysqlKeyword Statement - HiLink mysqlSpecial Special - HiLink mysqlString String - HiLink mysqlNumber Number - HiLink mysqlVariable Identifier - HiLink mysqlComment Comment - HiLink mysqlType Type - HiLink mysqlOperator Statement - HiLink mysqlFlow Statement - HiLink mysqlFunction Function +HiLink mysqlKeyword Statement +HiLink mysqlSpecial Special +HiLink mysqlString String +HiLink mysqlNumber Number +HiLink mysqlVariable Identifier +HiLink mysqlComment Comment +HiLink mysqlType Type +HiLink mysqlOperator Statement +HiLink mysqlFlow Statement +HiLink mysqlFunction Function - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "mysql" diff --git a/runtime/syntax/named.vim b/runtime/syntax/named.vim index faec5f68e..6d6cbd484 100644 --- a/runtime/syntax/named.vim +++ b/runtime/syntax/named.vim @@ -11,25 +11,16 @@ " This file could do with a lot of improvements, so comments are welcome. " Please submit the named.conf (segment) with any comments. " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif syn case match -if version >= 600 - setlocal iskeyword=.,-,48-58,A-Z,a-z,_ -else - set iskeyword=.,-,48-58,A-Z,a-z,_ -endif +setlocal iskeyword=.,-,48-58,A-Z,a-z,_ -if version >= 600 - syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" -endif +syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" let s:save_cpo = &cpo set cpo-=C @@ -197,48 +188,40 @@ syn match namedEParenError contained +{+ syn match namedParenError +}\([^;]\|$\)+ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_named_syn_inits") - if version < 508 - let did_named_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink namedComment Comment - HiLink namedInclude Include - HiLink namedKeyword Keyword - HiLink namedIntKeyword Keyword - HiLink namedIdentifier Identifier - HiLink namedIntIdent Identifier - - HiLink namedString String - HiLink namedBool Type - HiLink namedNotBool Error - HiLink namedNumber Number - HiLink namedNotNumber Error - - HiLink namedOption namedKeyword - HiLink namedLogOption namedKeyword - HiLink namedCNOption namedKeyword - HiLink namedQSKeywords Type - HiLink namedCNKeywords Type - HiLink namedLogCategory Type - HiLink namedIPaddr Number - HiLink namedDomain Identifier - HiLink namedZoneOpt namedKeyword - HiLink namedZoneType Type - HiLink namedParenError Error - HiLink namedEParenError Error - HiLink namedIllegalDom Error - HiLink namedIPerror Error - HiLink namedSpareDot Error - HiLink namedError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink namedComment Comment +HiLink namedInclude Include +HiLink namedKeyword Keyword +HiLink namedIntKeyword Keyword +HiLink namedIdentifier Identifier +HiLink namedIntIdent Identifier + +HiLink namedString String +HiLink namedBool Type +HiLink namedNotBool Error +HiLink namedNumber Number +HiLink namedNotNumber Error + +HiLink namedOption namedKeyword +HiLink namedLogOption namedKeyword +HiLink namedCNOption namedKeyword +HiLink namedQSKeywords Type +HiLink namedCNKeywords Type +HiLink namedLogCategory Type +HiLink namedIPaddr Number +HiLink namedDomain Identifier +HiLink namedZoneOpt namedKeyword +HiLink namedZoneType Type +HiLink namedParenError Error +HiLink namedEParenError Error +HiLink namedIllegalDom Error +HiLink namedIPerror Error +HiLink namedSpareDot Error +HiLink namedError Error + +delcommand HiLink let &cpo = s:save_cpo unlet s:save_cpo diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim index a6ed05665..0f81ceb5a 100644 --- a/runtime/syntax/nasm.vim +++ b/runtime/syntax/nasm.vim @@ -9,10 +9,8 @@ " Setup Syntax: -" Clear old syntax settings -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Assembler syntax is case insensetive @@ -21,18 +19,10 @@ syn case ignore " Vim search and movement commands on identifers -if version < 600 - " Comments at start of a line inside which to skip search for indentifiers - set comments=:; - " Identifier Keyword characters (defines \k) - set iskeyword=@,48-57,#,$,.,?,@-@,_,~ -else - " Comments at start of a line inside which to skip search for indentifiers - setlocal comments=:; - " Identifier Keyword characters (defines \k) - setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~ -endif - +" Comments at start of a line inside which to skip search for indentifiers +setlocal comments=:; +" Identifier Keyword characters (defines \k) +setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~ " Comments: @@ -431,96 +421,88 @@ syn sync match nasmSync grouphere NONE "^\s*%endmacro\>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later : only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_nasm_syntax_inits") - if version < 508 - let did_nasm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Sub Links: - HiLink nasmInMacDirective nasmDirective - HiLink nasmInMacLabel nasmLocalLabel - HiLink nasmInMacLblWarn nasmLabelWarn - HiLink nasmInMacMacro nasmMacro - HiLink nasmInMacParam nasmMacro - HiLink nasmInMacParamNum nasmDecNumber - HiLink nasmInMacPreCondit nasmPreCondit - HiLink nasmInMacPreProc nasmPreProc - HiLink nasmInPreCondit nasmPreCondit - HiLink nasmInStructure nasmStructure - HiLink nasmStructureLabel nasmStructure - - " Comment Group: - HiLink nasmComment Comment - HiLink nasmSpecialComment SpecialComment - HiLink nasmInCommentTodo Todo - - " Constant Group: - HiLink nasmString String - HiLink nasmStringError Error - HiLink nasmBinNumber Number - HiLink nasmOctNumber Number - HiLink nasmDecNumber Number - HiLink nasmHexNumber Number - HiLink nasmFltNumber Float - HiLink nasmNumberError Error - - " Identifier Group: - HiLink nasmLabel Identifier - HiLink nasmLocalLabel Identifier - HiLink nasmSpecialLabel Special - HiLink nasmLabelError Error - HiLink nasmLabelWarn Todo - - " PreProc Group: - HiLink nasmPreProc PreProc - HiLink nasmDefine Define - HiLink nasmInclude Include - HiLink nasmMacro Macro - HiLink nasmPreCondit PreCondit - HiLink nasmPreProcError Error - HiLink nasmPreProcWarn Todo - - " Type Group: - HiLink nasmType Type - HiLink nasmStorage StorageClass - HiLink nasmStructure Structure - HiLink nasmTypeError Error - - " Directive Group: - HiLink nasmConstant Constant - HiLink nasmInstrModifier Operator - HiLink nasmRepeat Repeat - HiLink nasmDirective Keyword - HiLink nasmStdDirective Operator - HiLink nasmFmtDirective Keyword - - " Register Group: - HiLink nasmCtrlRegister Special - HiLink nasmDebugRegister Debug - HiLink nasmTestRegister Special - HiLink nasmRegisterError Error - HiLink nasmMemRefError Error - - " Instruction Group: - HiLink nasmStdInstruction Statement - HiLink nasmSysInstruction Statement - HiLink nasmDbgInstruction Debug - HiLink nasmFpuInstruction Statement - HiLink nasmMmxInstruction Statement - HiLink nasmSseInstruction Statement - HiLink nasmNowInstruction Statement - HiLink nasmAmdInstruction Special - HiLink nasmCrxInstruction Special - HiLink nasmUndInstruction Todo - HiLink nasmInstructnError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" Sub Links: +HiLink nasmInMacDirective nasmDirective +HiLink nasmInMacLabel nasmLocalLabel +HiLink nasmInMacLblWarn nasmLabelWarn +HiLink nasmInMacMacro nasmMacro +HiLink nasmInMacParam nasmMacro +HiLink nasmInMacParamNum nasmDecNumber +HiLink nasmInMacPreCondit nasmPreCondit +HiLink nasmInMacPreProc nasmPreProc +HiLink nasmInPreCondit nasmPreCondit +HiLink nasmInStructure nasmStructure +HiLink nasmStructureLabel nasmStructure + +" Comment Group: +HiLink nasmComment Comment +HiLink nasmSpecialComment SpecialComment +HiLink nasmInCommentTodo Todo + +" Constant Group: +HiLink nasmString String +HiLink nasmStringError Error +HiLink nasmBinNumber Number +HiLink nasmOctNumber Number +HiLink nasmDecNumber Number +HiLink nasmHexNumber Number +HiLink nasmFltNumber Float +HiLink nasmNumberError Error + +" Identifier Group: +HiLink nasmLabel Identifier +HiLink nasmLocalLabel Identifier +HiLink nasmSpecialLabel Special +HiLink nasmLabelError Error +HiLink nasmLabelWarn Todo + +" PreProc Group: +HiLink nasmPreProc PreProc +HiLink nasmDefine Define +HiLink nasmInclude Include +HiLink nasmMacro Macro +HiLink nasmPreCondit PreCondit +HiLink nasmPreProcError Error +HiLink nasmPreProcWarn Todo + +" Type Group: +HiLink nasmType Type +HiLink nasmStorage StorageClass +HiLink nasmStructure Structure +HiLink nasmTypeError Error + +" Directive Group: +HiLink nasmConstant Constant +HiLink nasmInstrModifier Operator +HiLink nasmRepeat Repeat +HiLink nasmDirective Keyword +HiLink nasmStdDirective Operator +HiLink nasmFmtDirective Keyword + +" Register Group: +HiLink nasmCtrlRegister Special +HiLink nasmDebugRegister Debug +HiLink nasmTestRegister Special +HiLink nasmRegisterError Error +HiLink nasmMemRefError Error + +" Instruction Group: +HiLink nasmStdInstruction Statement +HiLink nasmSysInstruction Statement +HiLink nasmDbgInstruction Debug +HiLink nasmFpuInstruction Statement +HiLink nasmMmxInstruction Statement +HiLink nasmSseInstruction Statement +HiLink nasmNowInstruction Statement +HiLink nasmAmdInstruction Special +HiLink nasmCrxInstruction Special +HiLink nasmUndInstruction Todo +HiLink nasmInstructnError Error + +delcommand HiLink let b:current_syntax = "nasm" diff --git a/runtime/syntax/nastran.vim b/runtime/syntax/nastran.vim index f7927693f..34ad1bf37 100644 --- a/runtime/syntax/nastran.vim +++ b/runtime/syntax/nastran.vim @@ -6,11 +6,8 @@ " Since DMAP shares some traits with fortran, this syntax file " is based on the fortran.vim syntax file. "---------------------------------------------------------------------- -" Remove any old syntax stuff hanging around -"syn clear -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " DMAP is not case dependent @@ -156,37 +153,30 @@ syn region nastranBulkData start=+ *[Bb][Uu][Ll][Kk] *$+ end=+^ [Ee][Nn][Dd] *[D syn keyword nastranUtilCard ECHOON ECHOOFF INCLUDE PARAM -if version >= 508 || !exists("did_nastran_syntax_inits") - if version < 508 - let did_nastran_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi link <args> - endif - " The default methods for highlighting. Can be overridden later - HiLink nastranDmapexecmod Statement - HiLink nastranDmapType Type - HiLink nastranDmapPreCondit Error - HiLink nastranDmapUtilmod PreProc - HiLink nastranDmapMatmod nastranDmapUtilmod - HiLink nastranDmapString String - HiLink nastranDmapNumber Constant - HiLink nastranDmapFloat nastranDmapNumber - HiLink nastranDmapInitTab nastranDmapNumber - HiLink nastranDmapTab nastranDmapNumber - HiLink nastranDmapLogical nastranDmapExecmod - HiLink nastranDmapImplicit Identifier - HiLink nastranDmapComment Comment - HiLink nastranDmapRepeat nastranDmapexecmod - HiLink nastranNastranCard nastranDmapPreCondit - HiLink nastranECSCard nastranDmapUtilmod - HiLink nastranFMSCard nastranNastranCard - HiLink nastranCC nastranDmapexecmod - HiLink nastranDelimiter Special - HiLink nastranBulkData nastranDmapType - HiLink nastranUtilCard nastranDmapexecmod - delcommand HiLink -endif +command -nargs=+ HiLink hi link <args> +" The default methods for highlighting. Can be overridden later +HiLink nastranDmapexecmod Statement +HiLink nastranDmapType Type +HiLink nastranDmapPreCondit Error +HiLink nastranDmapUtilmod PreProc +HiLink nastranDmapMatmod nastranDmapUtilmod +HiLink nastranDmapString String +HiLink nastranDmapNumber Constant +HiLink nastranDmapFloat nastranDmapNumber +HiLink nastranDmapInitTab nastranDmapNumber +HiLink nastranDmapTab nastranDmapNumber +HiLink nastranDmapLogical nastranDmapExecmod +HiLink nastranDmapImplicit Identifier +HiLink nastranDmapComment Comment +HiLink nastranDmapRepeat nastranDmapexecmod +HiLink nastranNastranCard nastranDmapPreCondit +HiLink nastranECSCard nastranDmapUtilmod +HiLink nastranFMSCard nastranNastranCard +HiLink nastranCC nastranDmapexecmod +HiLink nastranDelimiter Special +HiLink nastranBulkData nastranDmapType +HiLink nastranUtilCard nastranDmapexecmod +delcommand HiLink let b:current_syntax = "nastran" diff --git a/runtime/syntax/natural.vim b/runtime/syntax/natural.vim index 4fbc916be..c94231d9f 100644 --- a/runtime/syntax/natural.vim +++ b/runtime/syntax/natural.vim @@ -6,16 +6,11 @@ " Last Changed: 2012-02-05 18:50:43 " Support: http://www.von-oppen.com/ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when this syntax file was already loaded -if v:version < 600 - syntax clear - set iskeyword+=-,*,#,+,_,/ -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish -else - setlocal iskeyword+=-,*,#,+,_,/ endif +setlocal iskeyword+=-,*,#,+,_,/ let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/syntax/ncf.vim b/runtime/syntax/ncf.vim index 2019c0372..b458e630f 100644 --- a/runtime/syntax/ncf.vim +++ b/runtime/syntax/ncf.vim @@ -4,10 +4,8 @@ " Last Change: Tue, 04 Sep 2001 16:20:33 CDT " $Id: ncf.vim,v 1.1 2004/06/13 16:31:58 vimboss Exp $ -" Remove any old syntax stuff hanging around -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -217,42 +215,35 @@ if exists("ncf_highlight_unknowns") syn match Error "[^ \t]*" contains=ALL endif -if version >= 508 || !exists("did_ncf_syntax_inits") - if version < 508 - let did_ncf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink ncfCommands Statement +HiLink ncfSetCommands ncfCommands +HiLink ncfLogins ncfCommands +HiLink ncfString String +HiLink ncfContString ncfString +HiLink ncfComment Comment +HiLink ncfImplicit Type +HiLink ncfBoolean Boolean +HiLink ncfScript Identifier +HiLink ncfNumber Number +HiLink ncfIPAddr ncfNumber +HiLink ncfHexNumber ncfNumber +HiLink ncfTime ncfNumber +HiLink ncfDSTTime ncfNumber +HiLink ncfPath Constant +HiLink ncfServerName Special +HiLink ncfIPXNet ncfServerName +HiLink ncfTimeTypes Constant +HiLink ncfSetCommandsNum ncfSetCommands +HiLink ncfSetCommandsBool ncfSetCommands +HiLink ncfSetCommandsStr ncfSetCommands +HiLink ncfSetCommandsTime ncfSetCommands +HiLink ncfSetCommandsTimeDate ncfSetCommands +HiLink ncfSetCommandsBindCon ncfSetCommands + +delcommand HiLink - " The default methods for highlighting. Can be overridden later - HiLink ncfCommands Statement - HiLink ncfSetCommands ncfCommands - HiLink ncfLogins ncfCommands - HiLink ncfString String - HiLink ncfContString ncfString - HiLink ncfComment Comment - HiLink ncfImplicit Type - HiLink ncfBoolean Boolean - HiLink ncfScript Identifier - HiLink ncfNumber Number - HiLink ncfIPAddr ncfNumber - HiLink ncfHexNumber ncfNumber - HiLink ncfTime ncfNumber - HiLink ncfDSTTime ncfNumber - HiLink ncfPath Constant - HiLink ncfServerName Special - HiLink ncfIPXNet ncfServerName - HiLink ncfTimeTypes Constant - HiLink ncfSetCommandsNum ncfSetCommands - HiLink ncfSetCommandsBool ncfSetCommands - HiLink ncfSetCommandsStr ncfSetCommands - HiLink ncfSetCommandsTime ncfSetCommands - HiLink ncfSetCommandsTimeDate ncfSetCommands - HiLink ncfSetCommandsBindCon ncfSetCommands - - delcommand HiLink - -endif let b:current_syntax = "ncf" diff --git a/runtime/syntax/netrw.vim b/runtime/syntax/netrw.vim index 718cee142..3d3aa993b 100644 --- a/runtime/syntax/netrw.vim +++ b/runtime/syntax/netrw.vim @@ -5,9 +5,8 @@ " --------------------------------------------------------------------- " Syntax Clearing: {{{1 -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/nqc.vim b/runtime/syntax/nqc.vim index 0a3cd6bc7..910570524 100644 --- a/runtime/syntax/nqc.vim +++ b/runtime/syntax/nqc.vim @@ -6,11 +6,8 @@ " URL: http://www.enotes.de/twiki/pub/Home/LegoMindstorms/nqc.vim " Filenames: .nqc -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -326,52 +323,44 @@ endif exec "syn sync ccomment nqcComment minlines=" . nqc_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_nqc_syn_inits") - if version < 508 - let did_nqc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink nqcLabel Label - HiLink nqcConditional Conditional - HiLink nqcRepeat Repeat - HiLink nqcCharacter Character - HiLink nqcNumber Number - HiLink nqcFloat Float - HiLink nqcFunction Function - HiLink nqcParenError nqcError - HiLink nqcErrInParen nqcError - HiLink nqcErrInBracket nqcError - HiLink nqcCommentL nqcComment - HiLink nqcCommentStart nqcComment - HiLink nqcCommentError nqcError - HiLink nqcCommentStartError nqcError - HiLink nqcSpaceError nqcError - HiLink nqcStorageClass StorageClass - HiLink nqcInclude Include - HiLink nqcPreProc PreProc - HiLink nqcDefine Macro - HiLink nqcIncluded String - HiLink nqcError Error - HiLink nqcStatement Statement - HiLink nqcEvents Statement - HiLink nqcPreCondit PreCondit - HiLink nqcType Type - HiLink nqcConstant Constant - HiLink nqcCommentSkip nqcComment - HiLink nqcComment Comment - HiLink nqcTodo Todo - HiLink nqcCppSkip nqcCppOut - HiLink nqcCppOut2 nqcCppOut - HiLink nqcCppOut Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink nqcLabel Label +HiLink nqcConditional Conditional +HiLink nqcRepeat Repeat +HiLink nqcCharacter Character +HiLink nqcNumber Number +HiLink nqcFloat Float +HiLink nqcFunction Function +HiLink nqcParenError nqcError +HiLink nqcErrInParen nqcError +HiLink nqcErrInBracket nqcError +HiLink nqcCommentL nqcComment +HiLink nqcCommentStart nqcComment +HiLink nqcCommentError nqcError +HiLink nqcCommentStartError nqcError +HiLink nqcSpaceError nqcError +HiLink nqcStorageClass StorageClass +HiLink nqcInclude Include +HiLink nqcPreProc PreProc +HiLink nqcDefine Macro +HiLink nqcIncluded String +HiLink nqcError Error +HiLink nqcStatement Statement +HiLink nqcEvents Statement +HiLink nqcPreCondit PreCondit +HiLink nqcType Type +HiLink nqcConstant Constant +HiLink nqcCommentSkip nqcComment +HiLink nqcComment Comment +HiLink nqcTodo Todo +HiLink nqcCppSkip nqcCppOut +HiLink nqcCppOut2 nqcCppOut +HiLink nqcCppOut Comment + +delcommand HiLink let b:current_syntax = "nqc" diff --git a/runtime/syntax/nroff.vim b/runtime/syntax/nroff.vim index 280ba9e7d..2619d02c4 100644 --- a/runtime/syntax/nroff.vim +++ b/runtime/syntax/nroff.vim @@ -22,12 +22,9 @@ " " {{{1 Start syntax highlighting. " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded " -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -197,65 +194,55 @@ syn keyword nroffTodo TODO XXX FIXME contained " " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -" -if version >= 508 || !exists("did_nroff_syn_inits") - - if version < 508 - let did_nroff_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink nroffEscChar nroffSpecialChar - HiLink nroffEscCharAr nroffSpecialChar - HiLink nroffSpecialChar SpecialChar - HiLink nroffSpace Delimiter - - HiLink nroffEscRegArg2 nroffEscRegArg - HiLink nroffEscRegArg nroffIdent - - HiLink nroffEscArg2 nroffEscArg - HiLink nroffEscPar nroffEscape - - HiLink nroffEscRegPar nroffEscape - HiLink nroffEscArg nroffEscape - HiLink nroffSize nroffEscape - HiLink nroffEscape Preproc - - HiLink nroffIgnore Comment - HiLink nroffComment Comment - HiLink nroffTodo Todo - - HiLink nroffReqLeader nroffRequest - HiLink nroffReqName nroffRequest - HiLink nroffRequest Statement - HiLink nroffCond PreCondit - HiLink nroffDefIdent nroffIdent - HiLink nroffIdent Identifier - - HiLink nroffEquation PreProc - HiLink nroffTable PreProc - HiLink nroffPicture PreProc - HiLink nroffRefer PreProc - HiLink nroffGrap PreProc - HiLink nroffGremlin PreProc - - HiLink nroffNumber Number - HiLink nroffBadChar nroffError - HiLink nroffSpaceError nroffError - HiLink nroffError Error - - HiLink nroffPreserve String - HiLink nroffString String - HiLink nroffDefinition String - HiLink nroffDefSpecial Special - - delcommand HiLink - -endif +" Only when an item doesn't have highlighting yet +" +command -nargs=+ HiLink hi def link <args> + +HiLink nroffEscChar nroffSpecialChar +HiLink nroffEscCharAr nroffSpecialChar +HiLink nroffSpecialChar SpecialChar +HiLink nroffSpace Delimiter + +HiLink nroffEscRegArg2 nroffEscRegArg +HiLink nroffEscRegArg nroffIdent + +HiLink nroffEscArg2 nroffEscArg +HiLink nroffEscPar nroffEscape + +HiLink nroffEscRegPar nroffEscape +HiLink nroffEscArg nroffEscape +HiLink nroffSize nroffEscape +HiLink nroffEscape Preproc + +HiLink nroffIgnore Comment +HiLink nroffComment Comment +HiLink nroffTodo Todo + +HiLink nroffReqLeader nroffRequest +HiLink nroffReqName nroffRequest +HiLink nroffRequest Statement +HiLink nroffCond PreCondit +HiLink nroffDefIdent nroffIdent +HiLink nroffIdent Identifier + +HiLink nroffEquation PreProc +HiLink nroffTable PreProc +HiLink nroffPicture PreProc +HiLink nroffRefer PreProc +HiLink nroffGrap PreProc +HiLink nroffGremlin PreProc + +HiLink nroffNumber Number +HiLink nroffBadChar nroffError +HiLink nroffSpaceError nroffError +HiLink nroffError Error + +HiLink nroffPreserve String +HiLink nroffString String +HiLink nroffDefinition String +HiLink nroffDefSpecial Special + +delcommand HiLink let b:current_syntax = "nroff" diff --git a/runtime/syntax/nsis.vim b/runtime/syntax/nsis.vim index d6d803714..8f3aa2507 100644 --- a/runtime/syntax/nsis.vim +++ b/runtime/syntax/nsis.vim @@ -3,11 +3,8 @@ " Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> " Last Change: 2004 May 12 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -224,48 +221,38 @@ syn keyword nsisError UninstallExeName " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_nsis_syn_inits") - - if version < 508 - let did_nsys_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - HiLink nsisInstruction Function - HiLink nsisComment Comment - HiLink nsisLocalLabel Label - HiLink nsisGlobalLabel Label - HiLink nsisStatement Statement - HiLink nsisString String - HiLink nsisBoolean Boolean - HiLink nsisAttribOptions Constant - HiLink nsisExecShell Constant - HiLink nsisFileAttrib Constant - HiLink nsisMessageBox Constant - HiLink nsisRegistry Identifier - HiLink nsisNumber Number - HiLink nsisError Error - HiLink nsisUserVar Identifier - HiLink nsisSysVar Identifier - HiLink nsisAttribute Type - HiLink nsisCompiler Type - HiLink nsisTodo Todo - HiLink nsisCallback Operator - " preprocessor commands - HiLink nsisPreprocSubst PreProc - HiLink nsisDefine Define - HiLink nsisMacro Macro - HiLink nsisPreCondit PreCondit - HiLink nsisInclude Include - HiLink nsisSystem PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink nsisInstruction Function +HiLink nsisComment Comment +HiLink nsisLocalLabel Label +HiLink nsisGlobalLabel Label +HiLink nsisStatement Statement +HiLink nsisString String +HiLink nsisBoolean Boolean +HiLink nsisAttribOptions Constant +HiLink nsisExecShell Constant +HiLink nsisFileAttrib Constant +HiLink nsisMessageBox Constant +HiLink nsisRegistry Identifier +HiLink nsisNumber Number +HiLink nsisError Error +HiLink nsisUserVar Identifier +HiLink nsisSysVar Identifier +HiLink nsisAttribute Type +HiLink nsisCompiler Type +HiLink nsisTodo Todo +HiLink nsisCallback Operator +" preprocessor commands +HiLink nsisPreprocSubst PreProc +HiLink nsisDefine Define +HiLink nsisMacro Macro +HiLink nsisPreCondit PreCondit +HiLink nsisInclude Include +HiLink nsisSystem PreProc + +delcommand HiLink let b:current_syntax = "nsis" diff --git a/runtime/syntax/obj.vim b/runtime/syntax/obj.vim index 66cd6c2bd..f2cd8a47a 100644 --- a/runtime/syntax/obj.vim +++ b/runtime/syntax/obj.vim @@ -4,11 +4,8 @@ " File Types: .obj (used in 3D) " Last Change: 2010 May 18 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -62,34 +59,26 @@ syn match objInt "\d\+" syn match objIndex "\d\+\/\d*\/\d*" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cabal_syn_inits") - if version < 508 - let did_cabal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink objError Error - HiLink objComment Comment - HiLink objInclude PreProc - HiLink objFloat Float - HiLink objInt Number - HiLink objGroup Structure - HiLink objIndex Constant - HiLink objMaterial Label +HiLink objError Error +HiLink objComment Comment +HiLink objInclude PreProc +HiLink objFloat Float +HiLink objInt Number +HiLink objGroup Structure +HiLink objIndex Constant +HiLink objMaterial Label - HiLink objVertex Keyword - HiLink objNormale Keyword - HiLink objVertice Keyword - HiLink objFace Keyword - HiLink objKeywords Keyword +HiLink objVertex Keyword +HiLink objNormale Keyword +HiLink objVertice Keyword +HiLink objFace Keyword +HiLink objKeywords Keyword - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "obj" diff --git a/runtime/syntax/objcpp.vim b/runtime/syntax/objcpp.vim index e80eed900..f11e30744 100644 --- a/runtime/syntax/objcpp.vim +++ b/runtime/syntax/objcpp.vim @@ -4,23 +4,15 @@ " Ex-Maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm> " Last Change: 2007 Oct 29 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read in C++ and ObjC syntax files -if version < 600 - so <sfile>:p:h/cpp.vim - so <sfile>:p:h/objc.vim -else - runtime! syntax/cpp.vim - unlet b:current_syntax - runtime! syntax/objc.vim -endif +runtime! syntax/cpp.vim +unlet b:current_syntax +runtime! syntax/objc.vim syn keyword objCppNonStructure class template namespace transparent contained syn keyword objCppNonStatement new delete friend using transparent contained diff --git a/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim index 24116f0e0..1884c3182 100644 --- a/runtime/syntax/ocaml.vim +++ b/runtime/syntax/ocaml.vim @@ -13,11 +13,8 @@ " can be distinguished from begin/end, which is used for indentation, " and folding. (David Baelde) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") && b:current_syntax == "ocaml" +" quit when a syntax file was already loaded +if exists("b:current_syntax") && b:current_syntax == "ocaml" finish endif @@ -253,78 +250,70 @@ syn sync match ocamlSigSync grouphere ocamlSig "\<sig\>" syn sync match ocamlSigSync groupthere ocamlSig "\<end\>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ocaml_syntax_inits") - if version < 508 - let did_ocaml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ocamlBraceErr Error - HiLink ocamlBrackErr Error - HiLink ocamlParenErr Error - HiLink ocamlArrErr Error - - HiLink ocamlCommentErr Error - - HiLink ocamlCountErr Error - HiLink ocamlDoErr Error - HiLink ocamlDoneErr Error - HiLink ocamlEndErr Error - HiLink ocamlThenErr Error - - HiLink ocamlCharErr Error - - HiLink ocamlErr Error - - HiLink ocamlComment Comment - - HiLink ocamlModPath Include - HiLink ocamlObject Include - HiLink ocamlModule Include - HiLink ocamlModParam1 Include - HiLink ocamlModType Include - HiLink ocamlMPRestr3 Include - HiLink ocamlFullMod Include - HiLink ocamlModTypeRestr Include - HiLink ocamlWith Include - HiLink ocamlMTDef Include - - HiLink ocamlScript Include - - HiLink ocamlConstructor Constant - - HiLink ocamlVal Keyword - HiLink ocamlModPreRHS Keyword - HiLink ocamlMPRestr2 Keyword - HiLink ocamlKeyword Keyword - HiLink ocamlMethod Include - HiLink ocamlFunDef Keyword - HiLink ocamlRefAssign Keyword - HiLink ocamlKeyChar Keyword - HiLink ocamlAnyVar Keyword - HiLink ocamlTopStop Keyword - HiLink ocamlOperator Keyword - - HiLink ocamlBoolean Boolean - HiLink ocamlCharacter Character - HiLink ocamlNumber Number - HiLink ocamlFloat Float - HiLink ocamlString String - - HiLink ocamlLabel Identifier - - HiLink ocamlType Type - - HiLink ocamlTodo Todo - - HiLink ocamlEncl Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink ocamlBraceErr Error +HiLink ocamlBrackErr Error +HiLink ocamlParenErr Error +HiLink ocamlArrErr Error + +HiLink ocamlCommentErr Error + +HiLink ocamlCountErr Error +HiLink ocamlDoErr Error +HiLink ocamlDoneErr Error +HiLink ocamlEndErr Error +HiLink ocamlThenErr Error + +HiLink ocamlCharErr Error + +HiLink ocamlErr Error + +HiLink ocamlComment Comment + +HiLink ocamlModPath Include +HiLink ocamlObject Include +HiLink ocamlModule Include +HiLink ocamlModParam1 Include +HiLink ocamlModType Include +HiLink ocamlMPRestr3 Include +HiLink ocamlFullMod Include +HiLink ocamlModTypeRestr Include +HiLink ocamlWith Include +HiLink ocamlMTDef Include + +HiLink ocamlScript Include + +HiLink ocamlConstructor Constant + +HiLink ocamlVal Keyword +HiLink ocamlModPreRHS Keyword +HiLink ocamlMPRestr2 Keyword +HiLink ocamlKeyword Keyword +HiLink ocamlMethod Include +HiLink ocamlFunDef Keyword +HiLink ocamlRefAssign Keyword +HiLink ocamlKeyChar Keyword +HiLink ocamlAnyVar Keyword +HiLink ocamlTopStop Keyword +HiLink ocamlOperator Keyword + +HiLink ocamlBoolean Boolean +HiLink ocamlCharacter Character +HiLink ocamlNumber Number +HiLink ocamlFloat Float +HiLink ocamlString String + +HiLink ocamlLabel Identifier + +HiLink ocamlType Type + +HiLink ocamlTodo Todo + +HiLink ocamlEncl Keyword + +delcommand HiLink let b:current_syntax = "ocaml" diff --git a/runtime/syntax/occam.vim b/runtime/syntax/occam.vim index 1c84bf00f..bab84f2e1 100644 --- a/runtime/syntax/occam.vim +++ b/runtime/syntax/occam.vim @@ -4,9 +4,8 @@ " Maintainer: Mario Schweigler <ms44@kent.ac.uk> " Last Change: 24 May 2003 -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -86,41 +85,34 @@ syn match occamCDString /<\|>\|=\|(\|)/ contained syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString -if version >= 508 || !exists("did_occam_syn_inits") - if version < 508 - let did_occam_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink occamType Type - HiLink occamKeyword Keyword - HiLink occamComment Comment - HiLink occamCommentTitle PreProc - HiLink occamTodo Todo - HiLink occamNote Todo - HiLink occamString String - HiLink occamCharString String - HiLink occamNumber Number - HiLink occamCDirective PreProc - HiLink occamCDString String - HiLink occamPPIdentifier PreProc - HiLink occamBoolean Boolean - HiLink occamSpecialChar SpecialChar - HiLink occamChar Character - HiLink occamStructure Structure - HiLink occamIdentifier Identifier - HiLink occamConstant Constant - HiLink occamOperator Operator - HiLink occamFunction Ignore - HiLink occamRepeat Repeat - HiLink occamConditional Conditional - HiLink occamBrackets Type - HiLink occamParantheses Delimiter - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink occamType Type +HiLink occamKeyword Keyword +HiLink occamComment Comment +HiLink occamCommentTitle PreProc +HiLink occamTodo Todo +HiLink occamNote Todo +HiLink occamString String +HiLink occamCharString String +HiLink occamNumber Number +HiLink occamCDirective PreProc +HiLink occamCDString String +HiLink occamPPIdentifier PreProc +HiLink occamBoolean Boolean +HiLink occamSpecialChar SpecialChar +HiLink occamChar Character +HiLink occamStructure Structure +HiLink occamIdentifier Identifier +HiLink occamConstant Constant +HiLink occamOperator Operator +HiLink occamFunction Ignore +HiLink occamRepeat Repeat +HiLink occamConditional Conditional +HiLink occamBrackets Type +HiLink occamParantheses Delimiter + +delcommand HiLink let b:current_syntax = "occam" diff --git a/runtime/syntax/omnimark.vim b/runtime/syntax/omnimark.vim index 698b3c09f..9887352a6 100644 --- a/runtime/syntax/omnimark.vim +++ b/runtime/syntax/omnimark.vim @@ -3,19 +3,12 @@ " Maintainer: Paul Terray <mailto:terray@4dconcept.fr> " Last Change: 11 Oct 2000 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version < 600 - set iskeyword=@,48-57,_,128-167,224-235,- -else - setlocal iskeyword=@,48-57,_,128-167,224-235,- -endif +setlocal iskeyword=@,48-57,_,128-167,224-235,- syn keyword omnimarkKeywords ACTIVATE AGAIN syn keyword omnimarkKeywords CATCH CLEAR CLOSE COPY COPY-CLEAR CROSS-TRANSLATE @@ -96,26 +89,18 @@ syn match omnimarkEscape contained +%[0-9][0-9]#+ syn sync minlines=2000 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_omnimark_syntax_inits") - if version < 508 - let did_omnimark_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink omnimarkCommands Statement - HiLink omnimarkKeywords Identifier - HiLink omnimarkString String - HiLink omnimarkPatterns Macro +HiLink omnimarkCommands Statement +HiLink omnimarkKeywords Identifier +HiLink omnimarkString String +HiLink omnimarkPatterns Macro " HiLink omnimarkNumber Number - HiLink omnimarkComment Comment - HiLink omnimarkEscape Special +HiLink omnimarkComment Comment +HiLink omnimarkEscape Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "omnimark" diff --git a/runtime/syntax/openroad.vim b/runtime/syntax/openroad.vim index 3f9a78d55..6d2affca9 100644 --- a/runtime/syntax/openroad.vim +++ b/runtime/syntax/openroad.vim @@ -3,12 +3,8 @@ " Maintainer: Luis Moreno <lmoreno@eresmas.net> " Last change: 2001 Jun 12 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -" -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -235,32 +231,24 @@ else endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet +" Only when an item doesn't have highlighting yet " -if version >= 508 || !exists("did_openroad_syntax_inits") - if version < 508 - let did_openroad_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink openroadKeyword Statement - HiLink openroadNumber Number - HiLink openroadString String - HiLink openroadComment Comment - HiLink openroadOperator Operator - HiLink openroadType Type - HiLink openroadFunc Special - HiLink openroadClass Type - HiLink openroadEvent Statement - HiLink openroadConst Constant - HiLink openroadVar Identifier - HiLink openroadIdent Identifier - HiLink openroadTodo Todo - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink openroadKeyword Statement +HiLink openroadNumber Number +HiLink openroadString String +HiLink openroadComment Comment +HiLink openroadOperator Operator +HiLink openroadType Type +HiLink openroadFunc Special +HiLink openroadClass Type +HiLink openroadEvent Statement +HiLink openroadConst Constant +HiLink openroadVar Identifier +HiLink openroadIdent Identifier +HiLink openroadTodo Todo + +delcommand HiLink let b:current_syntax = "openroad" diff --git a/runtime/syntax/opl.vim b/runtime/syntax/opl.vim index 1b07e3596..8959cf6d6 100644 --- a/runtime/syntax/opl.vim +++ b/runtime/syntax/opl.vim @@ -6,11 +6,8 @@ " Open Psion Language... (EPOC16/EPOC32) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -75,25 +72,17 @@ syn region OPLComment start="REM[\t ]" end="$" syn match OPLMathsOperator "-\|=\|[:<>+\*^/\\]" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_OPL_syntax_inits") - if version < 508 - let did_OPL_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink OPLStatement Statement - HiLink OPLNumber Number - HiLink OPLString String - HiLink OPLComment Comment - HiLink OPLMathsOperator Conditional +HiLink OPLStatement Statement +HiLink OPLNumber Number +HiLink OPLString String +HiLink OPLComment Comment +HiLink OPLMathsOperator Conditional " HiLink OPLError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "opl" diff --git a/runtime/syntax/ora.vim b/runtime/syntax/ora.vim index bf5d3220a..e84299a53 100644 --- a/runtime/syntax/ora.vim +++ b/runtime/syntax/ora.vim @@ -11,10 +11,8 @@ " sqlnet-ora and tnsnames.ora; since will not cause(?) problems " is easier to follow separately each file's keywords) -" Remove any old syntax stuff hanging around, if needed -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -437,36 +435,26 @@ syn cluster oraAll add=oraValue,oraModifier,oraString,oraSpecial,oraComment "============================================================================== " highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ora_syn_inits") - - if version < 508 - let did_ora_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink oraKeyword Statement "usual keywords - HiLink oraKeywordGroup Type "keywords which group other keywords - HiLink oraKeywordPref oraKeywordGroup "keywords which act as prefixes - HiLink oraKeywordObs Todo "obsolete keywords - HiLink oraKeywordUnd PreProc "undocumented keywords - HiLink oraKeywordUndObs oraKeywordObs "undocumented obsolete keywords - HiLink oraValue Identifier "values, like true or false - HiLink oraModifier oraValue "modifies values - HiLink oraString String "strings - - HiLink oraSpecial Special "special characters - HiLink oraError Error "errors - HiLink oraParenError oraError "errors caused by mismatching parantheses - - HiLink oraComment Comment "comments - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink oraKeyword Statement "usual keywords +HiLink oraKeywordGroup Type "keywords which group other keywords +HiLink oraKeywordPref oraKeywordGroup "keywords which act as prefixes +HiLink oraKeywordObs Todo "obsolete keywords +HiLink oraKeywordUnd PreProc "undocumented keywords +HiLink oraKeywordUndObs oraKeywordObs "undocumented obsolete keywords +HiLink oraValue Identifier "values, like true or false +HiLink oraModifier oraValue "modifies values +HiLink oraString String "strings + +HiLink oraSpecial Special "special characters +HiLink oraError Error "errors +HiLink oraParenError oraError "errors caused by mismatching parantheses + +HiLink oraComment Comment "comments +delcommand HiLink let b:current_syntax = "ora" diff --git a/runtime/syntax/papp.vim b/runtime/syntax/papp.vim index d86dce603..5b65f05cf 100644 --- a/runtime/syntax/papp.vim +++ b/runtime/syntax/papp.vim @@ -14,41 +14,24 @@ " pod is, btw, allowed everywhere, which is actually wrong :( -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " source is basically xml, with included html (this is common) and perl bits -if version < 600 - so <sfile>:p:h/xml.vim -else - runtime! syntax/xml.vim -endif +runtime! syntax/xml.vim unlet b:current_syntax if exists("papp_include_html") - if version < 600 - syn include @PAppHtml <sfile>:p:h/html.vim - else - syn include @PAppHtml syntax/html.vim - endif + syn include @PAppHtml syntax/html.vim unlet b:current_syntax syntax spell default " added by Bram endif -if version < 600 - syn include @PAppPerl <sfile>:p:h/perl.vim -else - syn include @PAppPerl syntax/perl.vim -endif +syn include @PAppPerl syntax/perl.vim -if v:version >= 600 - syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD -endif +syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD " preprocessor commands syn region papp_prep matchgroup=papp_prep start="^#\s*\(if\|elsif\)" end="$" keepend contains=@perlExpr contained diff --git a/runtime/syntax/pascal.vim b/runtime/syntax/pascal.vim index d2b6060ac..4a290f059 100644 --- a/runtime/syntax/pascal.vim +++ b/runtime/syntax/pascal.vim @@ -12,11 +12,8 @@ " Austin Ziegler <austin@halostatue.ca>, " Markus Koenig <markus@stber-koenig.de> -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -320,52 +317,44 @@ if !exists("pascal_traditional") endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_pascal_syn_inits") - if version < 508 - let did_pascal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink pascalAcces pascalStatement - HiLink pascalBoolean Boolean - HiLink pascalComment Comment - HiLink pascalConditional Conditional - HiLink pascalConstant Constant - HiLink pascalDelimiter Identifier - HiLink pascalDirective pascalStatement - HiLink pascalException Exception - HiLink pascalFloat Float - HiLink pascalFunction Function - HiLink pascalLabel Label - HiLink pascalMatrixDelimiter Identifier - HiLink pascalModifier Type - HiLink pascalNumber Number - HiLink pascalOperator Operator - HiLink pascalPredefined pascalStatement - HiLink pascalPreProc PreProc - HiLink pascalRepeat Repeat - HiLink pascalSpaceError Error - HiLink pascalStatement Statement - HiLink pascalString String - HiLink pascalStringEscape Special - HiLink pascalStringEscapeGPC Special - HiLink pascalStringError Error - HiLink pascalStruct pascalStatement - HiLink pascalSymbolOperator pascalOperator - HiLink pascalTodo Todo - HiLink pascalType Type - HiLink pascalUnclassified pascalStatement - " HiLink pascalAsm Assembler - HiLink pascalError Error - HiLink pascalAsmKey pascalStatement - HiLink pascalShowTab Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink pascalAcces pascalStatement +HiLink pascalBoolean Boolean +HiLink pascalComment Comment +HiLink pascalConditional Conditional +HiLink pascalConstant Constant +HiLink pascalDelimiter Identifier +HiLink pascalDirective pascalStatement +HiLink pascalException Exception +HiLink pascalFloat Float +HiLink pascalFunction Function +HiLink pascalLabel Label +HiLink pascalMatrixDelimiter Identifier +HiLink pascalModifier Type +HiLink pascalNumber Number +HiLink pascalOperator Operator +HiLink pascalPredefined pascalStatement +HiLink pascalPreProc PreProc +HiLink pascalRepeat Repeat +HiLink pascalSpaceError Error +HiLink pascalStatement Statement +HiLink pascalString String +HiLink pascalStringEscape Special +HiLink pascalStringEscapeGPC Special +HiLink pascalStringError Error +HiLink pascalStruct pascalStatement +HiLink pascalSymbolOperator pascalOperator +HiLink pascalTodo Todo +HiLink pascalType Type +HiLink pascalUnclassified pascalStatement +" HiLink pascalAsm Assembler +HiLink pascalError Error +HiLink pascalAsmKey pascalStatement +HiLink pascalShowTab Error + +delcommand HiLink let b:current_syntax = "pascal" diff --git a/runtime/syntax/pcap.vim b/runtime/syntax/pcap.vim index 17d0d42c0..7c9773852 100644 --- a/runtime/syntax/pcap.vim +++ b/runtime/syntax/pcap.vim @@ -4,20 +4,13 @@ " Modified by Bram " Last Change: 2003 May 11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif "define keywords -if version < 600 - set isk=@,46-57,_,-,#,=,192-255 -else - setlocal isk=@,46-57,_,-,#,=,192-255 -endif +setlocal isk=@,46-57,_,-,#,=,192-255 "first all the bad guys syn match pcapBad '^.\+$' "define any line as bad @@ -43,22 +36,14 @@ syn sync minlines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_pcap_syntax_inits") - if version < 508 - let did_pcap_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink pcapBad WarningMsg - HiLink pcapBadword WarningMsg - HiLink pcapComment Comment +HiLink pcapBad WarningMsg +HiLink pcapBadword WarningMsg +HiLink pcapComment Comment - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "pcap" diff --git a/runtime/syntax/pccts.vim b/runtime/syntax/pccts.vim index 8341f5bd4..5ddc570bb 100644 --- a/runtime/syntax/pccts.vim +++ b/runtime/syntax/pccts.vim @@ -3,20 +3,13 @@ " Maintainer: Scott Bigham <dsb@killerbunnies.org> " Last Change: 10 Aug 1999 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C++ syntax to start with -if version < 600 - syn include @cppTopLevel <sfile>:p:h/cpp.vim -else - syn include @cppTopLevel syntax/cpp.vim -endif +syn include @cppTopLevel syntax/cpp.vim syn region pcctsAction matchgroup=pcctsDelim start="<<" end=">>?\=" contains=@cppTopLevel,pcctsRuleRef @@ -72,34 +65,26 @@ syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\s*\[[^] syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\s*>\s*\[[^]]*\]\s*:" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_pccts_syntax_inits") - if version < 508 - let did_pccts_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink pcctsDelim Special - HiLink pcctsTokenName Identifier - HiLink pcctsRuleName Statement - HiLink pcctsLabelHack Label - HiLink pcctsDirective PreProc - HiLink pcctsString String - HiLink pcctsComment Comment - HiLink pcctsClass Statement - HiLink pcctsClassName Identifier - HiLink pcctsException Statement - HiLink pcctsExceptionHandler Keyword - HiLink pcctsExceptionRuleRef pcctsDelim - HiLink pcctsExceptionID Identifier - HiLink pcctsRuleRef Identifier - HiLink pcctsSpecialChar SpecialChar - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink pcctsDelim Special +HiLink pcctsTokenName Identifier +HiLink pcctsRuleName Statement +HiLink pcctsLabelHack Label +HiLink pcctsDirective PreProc +HiLink pcctsString String +HiLink pcctsComment Comment +HiLink pcctsClass Statement +HiLink pcctsClassName Identifier +HiLink pcctsException Statement +HiLink pcctsExceptionHandler Keyword +HiLink pcctsExceptionRuleRef pcctsDelim +HiLink pcctsExceptionID Identifier +HiLink pcctsRuleRef Identifier +HiLink pcctsSpecialChar SpecialChar + +delcommand HiLink let b:current_syntax = "pccts" diff --git a/runtime/syntax/perl6.vim b/runtime/syntax/perl6.vim index 3d82ced89..f40a040a4 100644 --- a/runtime/syntax/perl6.vim +++ b/runtime/syntax/perl6.vim @@ -61,11 +61,8 @@ " unlet perl6_extended_q " unlet perl6_extended_all -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo @@ -2063,176 +2060,168 @@ syn region p6PodFormatFrench \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon,p6PodComma " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_perl6_syntax_inits") - if version < 508 - let did_perl6_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink p6EscOctOld p6Error - HiLink p6PackageTwigil p6Twigil - HiLink p6StringAngle p6String - HiLink p6StringFrench p6String - HiLink p6StringAngles p6String - HiLink p6StringSQ p6String - HiLink p6StringDQ p6String - HiLink p6StringQ p6String - HiLink p6RxStringSQ p6String - HiLink p6RxStringDQ p6String - HiLink p6Substitution p6String - HiLink p6Transliteration p6String - HiLink p6StringAuto p6String - HiLink p6StringP5Auto p6String - HiLink p6Key p6String - HiLink p6Match p6String - HiLink p6RegexBlock p6String - HiLink p6RxP5CharClass p6String - HiLink p6RxP5QuoteMeta p6String - HiLink p6RxCharClass p6String - HiLink p6RxQuoteWords p6String - HiLink p6ReduceOp p6Operator - HiLink p6ReverseCrossOp p6Operator - HiLink p6HyperOp p6Operator - HiLink p6QuoteQ p6Operator - HiLink p6RxRange p6StringSpecial - HiLink p6RxAnchor p6StringSpecial - HiLink p6RxP5Anchor p6StringSpecial - HiLink p6CodePoint p6StringSpecial - HiLink p6RxMeta p6StringSpecial - HiLink p6RxP5Range p6StringSpecial - HiLink p6RxP5CPId p6StringSpecial - HiLink p6RxP5Posix p6StringSpecial - HiLink p6RxP5Mod p6StringSpecial - HiLink p6RxP5HexSeq p6StringSpecial - HiLink p6RxP5OctSeq p6StringSpecial - HiLink p6RxP5WriteRefId p6StringSpecial - HiLink p6HexSequence p6StringSpecial - HiLink p6OctSequence p6StringSpecial - HiLink p6RxP5Named p6StringSpecial - HiLink p6RxP5PropId p6StringSpecial - HiLink p6RxP5Quantifier p6StringSpecial - HiLink p6RxP5CountId p6StringSpecial - HiLink p6RxP5Verb p6StringSpecial - HiLink p6Escape p6StringSpecial2 - HiLink p6EscNull p6StringSpecial2 - HiLink p6EscHash p6StringSpecial2 - HiLink p6EscQQ p6StringSpecial2 - HiLink p6EscQuote p6StringSpecial2 - HiLink p6EscDoubleQuote p6StringSpecial2 - HiLink p6EscBackTick p6StringSpecial2 - HiLink p6EscForwardSlash p6StringSpecial2 - HiLink p6EscVerticalBar p6StringSpecial2 - HiLink p6EscExclamation p6StringSpecial2 - HiLink p6EscDollar p6StringSpecial2 - HiLink p6EscOpenCurly p6StringSpecial2 - HiLink p6EscCloseCurly p6StringSpecial2 - HiLink p6EscCloseBracket p6StringSpecial2 - HiLink p6EscCloseAngle p6StringSpecial2 - HiLink p6EscCloseFrench p6StringSpecial2 - HiLink p6EscBackSlash p6StringSpecial2 - HiLink p6RxEscape p6StringSpecial2 - HiLink p6RxCapture p6StringSpecial2 - HiLink p6RxAlternation p6StringSpecial2 - HiLink p6RxP5 p6StringSpecial2 - HiLink p6RxP5ReadRef p6StringSpecial2 - HiLink p6RxP5Oct p6StringSpecial2 - HiLink p6RxP5Hex p6StringSpecial2 - HiLink p6RxP5EscMeta p6StringSpecial2 - HiLink p6RxP5Meta p6StringSpecial2 - HiLink p6RxP5Escape p6StringSpecial2 - HiLink p6RxP5CodePoint p6StringSpecial2 - HiLink p6RxP5WriteRef p6StringSpecial2 - HiLink p6RxP5Prop p6StringSpecial2 - - HiLink p6Property Tag - HiLink p6Attention Todo - HiLink p6Type Type - HiLink p6Error Error - HiLink p6BlockLabel Label - HiLink p6Float Float - HiLink p6Normal Normal - HiLink p6Package Normal - HiLink p6PackageScope Normal - HiLink p6Number Number - HiLink p6VersionNum Number - HiLink p6String String - HiLink p6Repeat Repeat - HiLink p6Keyword Keyword - HiLink p6Pragma Keyword - HiLink p6Module Keyword - HiLink p6DeclareRoutine Keyword - HiLink p6VarStorage Special - HiLink p6FlowControl Special - HiLink p6NumberBase Special - HiLink p6Twigil Special - HiLink p6StringSpecial2 Special - HiLink p6VersionDot Special - HiLink p6Comment Comment - HiLink p6Include Include - HiLink p6Shebang PreProc - HiLink p6ClosureTrait PreProc - HiLink p6Routine Function - HiLink p6Operator Operator - HiLink p6Version Operator - HiLink p6Context Operator - HiLink p6Quote Delimiter - HiLink p6TypeConstraint PreCondit - HiLink p6Exception Exception - HiLink p6Placeholder Identifier - HiLink p6Variable Identifier - HiLink p6VarSlash Identifier - HiLink p6VarNum Identifier - HiLink p6VarExclam Identifier - HiLink p6VarMatch Identifier - HiLink p6VarName Identifier - HiLink p6MatchVar Identifier - HiLink p6RxP5ReadRefId Identifier - HiLink p6RxP5ModDef Identifier - HiLink p6RxP5ModName Identifier - HiLink p6Conditional Conditional - HiLink p6StringSpecial SpecialChar - - HiLink p6PodAbbr p6Pod - HiLink p6PodAbbrEOF p6Pod - HiLink p6PodAbbrNoCode p6Pod - HiLink p6PodAbbrCode p6PodCode - HiLink p6PodPara p6Pod - HiLink p6PodParaEOF p6Pod - HiLink p6PodParaNoCode p6Pod - HiLink p6PodParaCode p6PodCode - HiLink p6PodDelim p6Pod - HiLink p6PodDelimEOF p6Pod - HiLink p6PodDelimNoCode p6Pod - HiLink p6PodDelimCode p6PodCode - HiLink p6PodImplicitCode p6PodCode - HiLink p6PodExtraConfig p6PodPrefix - HiLink p6PodVerticalBar p6PodFormatCode - HiLink p6PodColon p6PodFormatCode - HiLink p6PodSemicolon p6PodFormatCode - HiLink p6PodComma p6PodFormatCode - HiLink p6PodFormatOne p6PodFormat - HiLink p6PodFormatTwo p6PodFormat - HiLink p6PodFormatThree p6PodFormat - HiLink p6PodFormatFrench p6PodFormat - - HiLink p6PodType Type - HiLink p6PodConfigOption String - HiLink p6PodCode PreProc - HiLink p6Pod Comment - HiLink p6PodComment Comment - HiLink p6PodAutoQuote Operator - HiLink p6PodConfigOperator Operator - HiLink p6PodPrefix Statement - HiLink p6PodName Identifier - HiLink p6PodFormatCode SpecialChar - HiLink p6PodFormat SpecialComment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink p6EscOctOld p6Error +HiLink p6PackageTwigil p6Twigil +HiLink p6StringAngle p6String +HiLink p6StringFrench p6String +HiLink p6StringAngles p6String +HiLink p6StringSQ p6String +HiLink p6StringDQ p6String +HiLink p6StringQ p6String +HiLink p6RxStringSQ p6String +HiLink p6RxStringDQ p6String +HiLink p6Substitution p6String +HiLink p6Transliteration p6String +HiLink p6StringAuto p6String +HiLink p6StringP5Auto p6String +HiLink p6Key p6String +HiLink p6Match p6String +HiLink p6RegexBlock p6String +HiLink p6RxP5CharClass p6String +HiLink p6RxP5QuoteMeta p6String +HiLink p6RxCharClass p6String +HiLink p6RxQuoteWords p6String +HiLink p6ReduceOp p6Operator +HiLink p6ReverseCrossOp p6Operator +HiLink p6HyperOp p6Operator +HiLink p6QuoteQ p6Operator +HiLink p6RxRange p6StringSpecial +HiLink p6RxAnchor p6StringSpecial +HiLink p6RxP5Anchor p6StringSpecial +HiLink p6CodePoint p6StringSpecial +HiLink p6RxMeta p6StringSpecial +HiLink p6RxP5Range p6StringSpecial +HiLink p6RxP5CPId p6StringSpecial +HiLink p6RxP5Posix p6StringSpecial +HiLink p6RxP5Mod p6StringSpecial +HiLink p6RxP5HexSeq p6StringSpecial +HiLink p6RxP5OctSeq p6StringSpecial +HiLink p6RxP5WriteRefId p6StringSpecial +HiLink p6HexSequence p6StringSpecial +HiLink p6OctSequence p6StringSpecial +HiLink p6RxP5Named p6StringSpecial +HiLink p6RxP5PropId p6StringSpecial +HiLink p6RxP5Quantifier p6StringSpecial +HiLink p6RxP5CountId p6StringSpecial +HiLink p6RxP5Verb p6StringSpecial +HiLink p6Escape p6StringSpecial2 +HiLink p6EscNull p6StringSpecial2 +HiLink p6EscHash p6StringSpecial2 +HiLink p6EscQQ p6StringSpecial2 +HiLink p6EscQuote p6StringSpecial2 +HiLink p6EscDoubleQuote p6StringSpecial2 +HiLink p6EscBackTick p6StringSpecial2 +HiLink p6EscForwardSlash p6StringSpecial2 +HiLink p6EscVerticalBar p6StringSpecial2 +HiLink p6EscExclamation p6StringSpecial2 +HiLink p6EscDollar p6StringSpecial2 +HiLink p6EscOpenCurly p6StringSpecial2 +HiLink p6EscCloseCurly p6StringSpecial2 +HiLink p6EscCloseBracket p6StringSpecial2 +HiLink p6EscCloseAngle p6StringSpecial2 +HiLink p6EscCloseFrench p6StringSpecial2 +HiLink p6EscBackSlash p6StringSpecial2 +HiLink p6RxEscape p6StringSpecial2 +HiLink p6RxCapture p6StringSpecial2 +HiLink p6RxAlternation p6StringSpecial2 +HiLink p6RxP5 p6StringSpecial2 +HiLink p6RxP5ReadRef p6StringSpecial2 +HiLink p6RxP5Oct p6StringSpecial2 +HiLink p6RxP5Hex p6StringSpecial2 +HiLink p6RxP5EscMeta p6StringSpecial2 +HiLink p6RxP5Meta p6StringSpecial2 +HiLink p6RxP5Escape p6StringSpecial2 +HiLink p6RxP5CodePoint p6StringSpecial2 +HiLink p6RxP5WriteRef p6StringSpecial2 +HiLink p6RxP5Prop p6StringSpecial2 + +HiLink p6Property Tag +HiLink p6Attention Todo +HiLink p6Type Type +HiLink p6Error Error +HiLink p6BlockLabel Label +HiLink p6Float Float +HiLink p6Normal Normal +HiLink p6Package Normal +HiLink p6PackageScope Normal +HiLink p6Number Number +HiLink p6VersionNum Number +HiLink p6String String +HiLink p6Repeat Repeat +HiLink p6Keyword Keyword +HiLink p6Pragma Keyword +HiLink p6Module Keyword +HiLink p6DeclareRoutine Keyword +HiLink p6VarStorage Special +HiLink p6FlowControl Special +HiLink p6NumberBase Special +HiLink p6Twigil Special +HiLink p6StringSpecial2 Special +HiLink p6VersionDot Special +HiLink p6Comment Comment +HiLink p6Include Include +HiLink p6Shebang PreProc +HiLink p6ClosureTrait PreProc +HiLink p6Routine Function +HiLink p6Operator Operator +HiLink p6Version Operator +HiLink p6Context Operator +HiLink p6Quote Delimiter +HiLink p6TypeConstraint PreCondit +HiLink p6Exception Exception +HiLink p6Placeholder Identifier +HiLink p6Variable Identifier +HiLink p6VarSlash Identifier +HiLink p6VarNum Identifier +HiLink p6VarExclam Identifier +HiLink p6VarMatch Identifier +HiLink p6VarName Identifier +HiLink p6MatchVar Identifier +HiLink p6RxP5ReadRefId Identifier +HiLink p6RxP5ModDef Identifier +HiLink p6RxP5ModName Identifier +HiLink p6Conditional Conditional +HiLink p6StringSpecial SpecialChar + +HiLink p6PodAbbr p6Pod +HiLink p6PodAbbrEOF p6Pod +HiLink p6PodAbbrNoCode p6Pod +HiLink p6PodAbbrCode p6PodCode +HiLink p6PodPara p6Pod +HiLink p6PodParaEOF p6Pod +HiLink p6PodParaNoCode p6Pod +HiLink p6PodParaCode p6PodCode +HiLink p6PodDelim p6Pod +HiLink p6PodDelimEOF p6Pod +HiLink p6PodDelimNoCode p6Pod +HiLink p6PodDelimCode p6PodCode +HiLink p6PodImplicitCode p6PodCode +HiLink p6PodExtraConfig p6PodPrefix +HiLink p6PodVerticalBar p6PodFormatCode +HiLink p6PodColon p6PodFormatCode +HiLink p6PodSemicolon p6PodFormatCode +HiLink p6PodComma p6PodFormatCode +HiLink p6PodFormatOne p6PodFormat +HiLink p6PodFormatTwo p6PodFormat +HiLink p6PodFormatThree p6PodFormat +HiLink p6PodFormatFrench p6PodFormat + +HiLink p6PodType Type +HiLink p6PodConfigOption String +HiLink p6PodCode PreProc +HiLink p6Pod Comment +HiLink p6PodComment Comment +HiLink p6PodAutoQuote Operator +HiLink p6PodConfigOperator Operator +HiLink p6PodPrefix Statement +HiLink p6PodName Identifier +HiLink p6PodFormatCode SpecialChar +HiLink p6PodFormat SpecialComment + +delcommand HiLink " Syncing to speed up processing "syn sync match p6SyncPod groupthere p6PodAbbrRegion "^=\K\k*\>" diff --git a/runtime/syntax/pfmain.vim b/runtime/syntax/pfmain.vim index 32ed6975c..794aa5dc2 100644 --- a/runtime/syntax/pfmain.vim +++ b/runtime/syntax/pfmain.vim @@ -7,17 +7,12 @@ " URL: http://cern.ch/fuji/vim/syntax/pfmain.vim " Comment: Based on Postfix 2.12/3.0 postconf.5.html. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version >= 600 - setlocal iskeyword=@,48-57,_,- -else - set iskeyword=@,48-57,_,- -endif +setlocal iskeyword=@,48-57,_,- syntax case match syntax sync minlines=1 @@ -1816,33 +1811,26 @@ syntax match pfmainSpecial "\<smtpd\>" syntax match pfmainSpecial "\<trace\>" syntax match pfmainSpecial "\<verify\>" -if version >= 508 || !exists("pfmain_syntax_init") - if version < 508 - let pfmain_syntax_init = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink pfmainConf Statement - HiLink pfmainRef PreProc - HiLink pfmainWord identifier +HiLink pfmainConf Statement +HiLink pfmainRef PreProc +HiLink pfmainWord identifier - HiLink pfmainDict Type - HiLink pfmainQueueDir Constant - HiLink pfmainTransport Constant - HiLink pfmainLock Constant - HiLink pfmainAnswer Constant +HiLink pfmainDict Type +HiLink pfmainQueueDir Constant +HiLink pfmainTransport Constant +HiLink pfmainLock Constant +HiLink pfmainAnswer Constant - HiLink pfmainComment Comment - HiLink pfmainNumber Number - HiLink pfmainTime Number - HiLink pfmainIP Number - HiLink pfmainVariable Error - HiLink pfmainSpecial Special +HiLink pfmainComment Comment +HiLink pfmainNumber Number +HiLink pfmainTime Number +HiLink pfmainIP Number +HiLink pfmainVariable Error +HiLink pfmainSpecial Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "pfmain" diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index d494a92ae..3019a423b 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -55,11 +55,8 @@ " ii) Same problem if you are setting php_folding = 2 with a closing " } inside an string on the first line of this string. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -67,16 +64,8 @@ if !exists("main_syntax") let main_syntax = 'php' endif -if version < 600 - unlet! php_folding - if exists("php_sync_method") && !php_sync_method - let php_sync_method=-1 - endif - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax " accept old options if !exists("php_sync_method") @@ -94,11 +83,7 @@ endif syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc -if version < 600 - syn include @sqlTop <sfile>:p:h/sql.vim -else - syn include @sqlTop syntax/sql.vim -endif +syn include @sqlTop syntax/sql.vim syn sync clear unlet b:current_syntax syn cluster sqlTop remove=sqlString,sqlComment @@ -381,15 +366,8 @@ if exists("php_parent_error_open") else syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell extend endif -if version >= 600 - syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell - syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell -else - syn match phpComment "#.\{-}$" contained contains=phpTodo,@Spell - syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo,@Spell - syn match phpComment "//.\{-}$" contained contains=phpTodo,@Spell - syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo,@Spell -endif +syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell +syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell " String if exists("php_parent_error_open") @@ -403,24 +381,22 @@ else endif " HereDoc and NowDoc -if version >= 600 - syn case match +syn case match - " HereDoc - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +" HereDoc +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend " including HTML,JavaScript,SQL even if not enabled via options - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend - " NowDoc - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend +" NowDoc +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend " including HTML,JavaScript,SQL even if not enabled via options - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend - syn case ignore -endif +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend +syn case ignore " Parent if exists("php_parent_error_close") || exists("php_parent_error_open") @@ -621,82 +597,74 @@ syntax match phpDocTags "@\(abstract\|access\|author\|category\|copyright\|dep syntax match phpDocTodo "@\(todo\|fixme\|xxx\)\(\s\+\)\?" containedin=phpComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_php_syn_inits") - if version < 508 - let did_php_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink phpConstant Constant - HiLink phpCoreConstant Constant - HiLink phpComment Comment - HiLink phpDocTags PreProc - HiLink phpDocCustomTags Type - HiLink phpException Exception - HiLink phpBoolean Boolean - HiLink phpStorageClass StorageClass - HiLink phpSCKeyword StorageClass - HiLink phpFCKeyword Define - HiLink phpStructure Structure - HiLink phpStringSingle String - HiLink phpStringDouble String - HiLink phpBacktick String - HiLink phpNumber Number - HiLink phpFloat Float - HiLink phpMethods Function - HiLink phpFunctions Function - HiLink phpBaselib Function - HiLink phpRepeat Repeat - HiLink phpConditional Conditional - HiLink phpLabel Label - HiLink phpStatement Statement - HiLink phpKeyword Statement - HiLink phpType Type - HiLink phpInclude Include - HiLink phpDefine Define - HiLink phpBackslashSequences SpecialChar - HiLink phpBackslashDoubleQuote SpecialChar - HiLink phpBackslashSingleQuote SpecialChar - HiLink phpParent Delimiter - HiLink phpBrackets Delimiter - HiLink phpIdentifierConst Delimiter - HiLink phpParentError Error - HiLink phpOctalError Error - HiLink phpInterpSimpleError Error - HiLink phpInterpBogusDollarCurley Error - HiLink phpInterpDollarCurly1 Error - HiLink phpInterpDollarCurly2 Error - HiLink phpInterpSimpleBracketsInner String - HiLink phpInterpSimpleCurly Delimiter - HiLink phpInterpVarname Identifier - HiLink phpTodo Todo - HiLink phpDocTodo Todo - HiLink phpMemberSelector Structure - if exists("php_oldStyle") - hi phpIntVar guifg=Red ctermfg=DarkRed - hi phpEnvVar guifg=Red ctermfg=DarkRed - hi phpOperator guifg=SeaGreen ctermfg=DarkGreen - hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen - hi phpRelation guifg=SeaGreen ctermfg=DarkGreen - hi phpIdentifier guifg=DarkGray ctermfg=Brown - hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown - else - HiLink phpIntVar Identifier - HiLink phpEnvVar Identifier - HiLink phpOperator Operator - HiLink phpVarSelector Operator - HiLink phpRelation Operator - HiLink phpIdentifier Identifier - HiLink phpIdentifierSimply Identifier - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink phpConstant Constant +HiLink phpCoreConstant Constant +HiLink phpComment Comment +HiLink phpDocTags PreProc +HiLink phpDocCustomTags Type +HiLink phpException Exception +HiLink phpBoolean Boolean +HiLink phpStorageClass StorageClass +HiLink phpSCKeyword StorageClass +HiLink phpFCKeyword Define +HiLink phpStructure Structure +HiLink phpStringSingle String +HiLink phpStringDouble String +HiLink phpBacktick String +HiLink phpNumber Number +HiLink phpFloat Float +HiLink phpMethods Function +HiLink phpFunctions Function +HiLink phpBaselib Function +HiLink phpRepeat Repeat +HiLink phpConditional Conditional +HiLink phpLabel Label +HiLink phpStatement Statement +HiLink phpKeyword Statement +HiLink phpType Type +HiLink phpInclude Include +HiLink phpDefine Define +HiLink phpBackslashSequences SpecialChar +HiLink phpBackslashDoubleQuote SpecialChar +HiLink phpBackslashSingleQuote SpecialChar +HiLink phpParent Delimiter +HiLink phpBrackets Delimiter +HiLink phpIdentifierConst Delimiter +HiLink phpParentError Error +HiLink phpOctalError Error +HiLink phpInterpSimpleError Error +HiLink phpInterpBogusDollarCurley Error +HiLink phpInterpDollarCurly1 Error +HiLink phpInterpDollarCurly2 Error +HiLink phpInterpSimpleBracketsInner String +HiLink phpInterpSimpleCurly Delimiter +HiLink phpInterpVarname Identifier +HiLink phpTodo Todo +HiLink phpDocTodo Todo +HiLink phpMemberSelector Structure +if exists("php_oldStyle") +hi phpIntVar guifg=Red ctermfg=DarkRed +hi phpEnvVar guifg=Red ctermfg=DarkRed +hi phpOperator guifg=SeaGreen ctermfg=DarkGreen +hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen +hi phpRelation guifg=SeaGreen ctermfg=DarkGreen +hi phpIdentifier guifg=DarkGray ctermfg=Brown +hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown +else +HiLink phpIntVar Identifier +HiLink phpEnvVar Identifier +HiLink phpOperator Operator +HiLink phpVarSelector Operator +HiLink phpRelation Operator +HiLink phpIdentifier Identifier +HiLink phpIdentifierSimply Identifier endif +delcommand HiLink + let b:current_syntax = "php" if main_syntax == 'php' diff --git a/runtime/syntax/pic.vim b/runtime/syntax/pic.vim index adc964ea9..b98984ed3 100644 --- a/runtime/syntax/pic.vim +++ b/runtime/syntax/pic.vim @@ -5,11 +5,8 @@ " URL: http://galeb.etf.bg.ac.yu/~alexa/vim/syntax/pic.vim " Revision: 1.01 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -91,36 +88,28 @@ syn match picDirective "#\=DEFINE" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_pic16f84_syntax_inits") - if version < 508 - let did_pic16f84_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink picTodo Todo - HiLink picComment Comment - HiLink picDirective Statement - HiLink picLabel Label - HiLink picString String - - "HiLink picOpcode Keyword - "HiLink picRegister Structure - "HiLink picRegisterPart Special - - HiLink picASCII String - HiLink picBinary Number - HiLink picDecimal Number - HiLink picHexadecimal Number - HiLink picOctal Number - - HiLink picIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink picTodo Todo +HiLink picComment Comment +HiLink picDirective Statement +HiLink picLabel Label +HiLink picString String + +"HiLink picOpcode Keyword +"HiLink picRegister Structure +"HiLink picRegisterPart Special + +HiLink picASCII String +HiLink picBinary Number +HiLink picDecimal Number +HiLink picHexadecimal Number +HiLink picOctal Number + +HiLink picIdentifier Identifier + +delcommand HiLink let b:current_syntax = "pic" diff --git a/runtime/syntax/pike.vim b/runtime/syntax/pike.vim index efbafd5d8..dcf32113c 100644 --- a/runtime/syntax/pike.vim +++ b/runtime/syntax/pike.vim @@ -3,11 +3,8 @@ " Maintainer: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it> " Last Change: 2001 May 10 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -104,51 +101,43 @@ syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 syn sync ccomment pikeComment minlines=10 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_pike_syntax_inits") - if version < 508 - let did_pike_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink pikeLabel Label - HiLink pikeUserLabel Label - HiLink pikeConditional Conditional - HiLink pikeRepeat Repeat - HiLink pikeCharacter Character - HiLink pikeSpecialCharacter pikeSpecial - HiLink pikeNumber Number - HiLink pikeFloat Float - HiLink pikeOctalError pikeError - HiLink pikeParenError pikeError - HiLink pikeInParen pikeError - HiLink pikeCommentError pikeError - HiLink pikeOperator Operator - HiLink pikeInclude Include - HiLink pikePreProc PreProc - HiLink pikeDefine Macro - HiLink pikeIncluded pikeString - HiLink pikeError Error - HiLink pikeStatement Statement - HiLink pikePreCondit PreCondit - HiLink pikeType Type - HiLink pikeCommentError pikeError - HiLink pikeCommentString pikeString - HiLink pikeComment2String pikeString - HiLink pikeCommentSkip pikeComment - HiLink pikeString String - HiLink pikeComment Comment - HiLink pikeSpecial SpecialChar - HiLink pikeTodo Todo - HiLink pikeException pikeStatement - HiLink pikeCompoundType Constant - "HiLink pikeIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink pikeLabel Label +HiLink pikeUserLabel Label +HiLink pikeConditional Conditional +HiLink pikeRepeat Repeat +HiLink pikeCharacter Character +HiLink pikeSpecialCharacter pikeSpecial +HiLink pikeNumber Number +HiLink pikeFloat Float +HiLink pikeOctalError pikeError +HiLink pikeParenError pikeError +HiLink pikeInParen pikeError +HiLink pikeCommentError pikeError +HiLink pikeOperator Operator +HiLink pikeInclude Include +HiLink pikePreProc PreProc +HiLink pikeDefine Macro +HiLink pikeIncluded pikeString +HiLink pikeError Error +HiLink pikeStatement Statement +HiLink pikePreCondit PreCondit +HiLink pikeType Type +HiLink pikeCommentError pikeError +HiLink pikeCommentString pikeString +HiLink pikeComment2String pikeString +HiLink pikeCommentSkip pikeComment +HiLink pikeString String +HiLink pikeComment Comment +HiLink pikeSpecial SpecialChar +HiLink pikeTodo Todo +HiLink pikeException pikeStatement +HiLink pikeCompoundType Constant +"HiLink pikeIdentifier Identifier + +delcommand HiLink let b:current_syntax = "pike" diff --git a/runtime/syntax/pilrc.vim b/runtime/syntax/pilrc.vim index 86d561158..c1d3288b0 100644 --- a/runtime/syntax/pilrc.vim +++ b/runtime/syntax/pilrc.vim @@ -4,10 +4,8 @@ " Last change: 2003 May 11 " Available on: http://www.schau.com/pilrcvim/pilrc.vim -" Remove any old syntax -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -119,30 +117,22 @@ syn region pilrcInclude start="public class" end="}" syn sync ccomment pilrcComment -if version >= 508 || !exists("did_pilrc_syntax_inits") - if version < 508 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - let did_pilrc_syntax_inits = 1 - - " The default methods for highlighting - HiLink pilrcKeyword Statement - HiLink pilrcType Type - HiLink pilrcError Error - HiLink pilrcCountry SpecialChar - HiLink pilrcLanguage SpecialChar - HiLink pilrcString SpecialChar - HiLink pilrcNumber Number - HiLink pilrcComment Comment - HiLink pilrcConstant Constant - HiLink pilrcFunction Function - HiLink pilrcInclude SpecialChar - HiLink pilrcIdentifier Number - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting +HiLink pilrcKeyword Statement +HiLink pilrcType Type +HiLink pilrcError Error +HiLink pilrcCountry SpecialChar +HiLink pilrcLanguage SpecialChar +HiLink pilrcString SpecialChar +HiLink pilrcNumber Number +HiLink pilrcComment Comment +HiLink pilrcConstant Constant +HiLink pilrcFunction Function +HiLink pilrcInclude SpecialChar +HiLink pilrcIdentifier Number + +delcommand HiLink let b:current_syntax = "pilrc" diff --git a/runtime/syntax/pine.vim b/runtime/syntax/pine.vim index 4c64b9bbc..e41dd8700 100644 --- a/runtime/syntax/pine.vim +++ b/runtime/syntax/pine.vim @@ -3,19 +3,12 @@ " Maintainer: David Pascoe <pascoedj@spamcop.net> " Last Change: Thu Feb 27 10:18:48 WST 2003, update for pine 4.53 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version >= 600 - setlocal iskeyword=@,48-57,_,128-167,224-235,- -else - set iskeyword=@,48-57,_,128-167,224-235,- -endif +setlocal iskeyword=@,48-57,_,128-167,224-235,- syn keyword pineConfig addrbook-sort-rule syn keyword pineConfig address-book @@ -351,21 +344,13 @@ syn keyword pineOption vertical-folder-list syn match pineComment "^#.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_pine_syn_inits") - if version < 508 - let did_pine_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink pineConfig Type - HiLink pineComment Comment - HiLink pineOption Macro - delcommand HiLink -endif +HiLink pineConfig Type +HiLink pineComment Comment +HiLink pineOption Macro +delcommand HiLink let b:current_syntax = "pine" diff --git a/runtime/syntax/pli.vim b/runtime/syntax/pli.vim index f8d7e51cf..9c74f9b0f 100644 --- a/runtime/syntax/pli.vim +++ b/runtime/syntax/pli.vim @@ -3,9 +3,8 @@ " using keywords from http://www.kednos.com/pli/docs/reference_manual/6291pro_contents.html " 2012-11-13 Alan Thompson -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -222,57 +221,48 @@ endif syn sync minlines=10 maxlines=100 " Define the default highlighting. -" For version 5.x and earlier, only when not done already. -" For version 5.8 and later, only when and item doesn't have highlighting -" yet. -if version >= 508 || !exists("did_pl1_syn_inits") - if version < 508 - let did_pl1_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when and item doesn't have highlighting yet. +command -nargs=+ HiLink hi def link <args> - HiLink pl1Attribute Macro - HiLink pl1BlockError Error - HiLink pl1BooleanLiteral Boolean - HiLink pl1CharLiteral Character - HiLink pl1Comment Comment - HiLink pl1CommentL Comment - HiLink pl1Conditional Conditional - HiLink pl1Error Error - HiLink pl1ErrInBracket Error - HiLink pl1ErrInBlock Error - HiLink pl1ErrInParen Error - HiLink pl1Exception Function - HiLink pl1FloatLiteral Float - HiLink pl1Function Function - HiLink pl1Garbage Error - HiLink pl1HostIdentifier Label - HiLink pl1Identifier Normal - HiLink pl1IntLiteral Number - HiLink pl1Operator Operator - HiLink pl1Paren Normal - HiLink pl1ParenError Error - HiLink pl1SpaceError Error - HiLink pl1Pseudo PreProc - HiLink pl1PreProc PreProc - HiLink pl1PreProcSym PreProc - HiLink pl1Keyword Keyword - HiLink pl1Other Keyword - HiLink pl1Repeat Repeat - HiLink pl1Statement Keyword - HiLink pl1Storage StorageClass - HiLink pl1StringError Error - HiLink pl1StringLiteral String - HiLink pl1CommentString String - HiLink pl1Comment2String String - HiLink pl1Symbol Normal - HiLink pl1Trigger Function - HiLink pl1TypeAttribute StorageClass - HiLink pl1Todo Todo +HiLink pl1Attribute Macro +HiLink pl1BlockError Error +HiLink pl1BooleanLiteral Boolean +HiLink pl1CharLiteral Character +HiLink pl1Comment Comment +HiLink pl1CommentL Comment +HiLink pl1Conditional Conditional +HiLink pl1Error Error +HiLink pl1ErrInBracket Error +HiLink pl1ErrInBlock Error +HiLink pl1ErrInParen Error +HiLink pl1Exception Function +HiLink pl1FloatLiteral Float +HiLink pl1Function Function +HiLink pl1Garbage Error +HiLink pl1HostIdentifier Label +HiLink pl1Identifier Normal +HiLink pl1IntLiteral Number +HiLink pl1Operator Operator +HiLink pl1Paren Normal +HiLink pl1ParenError Error +HiLink pl1SpaceError Error +HiLink pl1Pseudo PreProc +HiLink pl1PreProc PreProc +HiLink pl1PreProcSym PreProc +HiLink pl1Keyword Keyword +HiLink pl1Other Keyword +HiLink pl1Repeat Repeat +HiLink pl1Statement Keyword +HiLink pl1Storage StorageClass +HiLink pl1StringError Error +HiLink pl1StringLiteral String +HiLink pl1CommentString String +HiLink pl1Comment2String String +HiLink pl1Symbol Normal +HiLink pl1Trigger Function +HiLink pl1TypeAttribute StorageClass +HiLink pl1Todo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "pl1" diff --git a/runtime/syntax/plm.vim b/runtime/syntax/plm.vim index bf7c32fd1..de806b333 100644 --- a/runtime/syntax/plm.vim +++ b/runtime/syntax/plm.vim @@ -3,11 +3,8 @@ " Maintainer: Philippe Coulonges <cphil@cphil.net> " Last change: 2003 May 11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -103,43 +100,35 @@ syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD syn sync lines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_plm_syntax_inits") - if version < 508 - let did_plm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later " HiLink plmLabel Label " HiLink plmConditional Conditional " HiLink plmRepeat Repeat - HiLink plmTodo Todo - HiLink plmNumber Number - HiLink plmOperator Operator - HiLink plmDelimiter Operator - "HiLink plmShowTab Error - "HiLink plmShowTabc Error - HiLink plmIdentifier Identifier - HiLink plmBuiltIn Statement - HiLink plm286BuiltIn Statement - HiLink plm386BuiltIn Statement - HiLink plm386w16BuiltIn Statement - HiLink plmReserved Statement - HiLink plm386Reserved Statement - HiLink plmPreProc PreProc - HiLink plmCommentError plmError - HiLink plmCommentString plmString - HiLink plmComment2String plmString - HiLink plmCommentSkip plmComment - HiLink plmString String - HiLink plmComment Comment - - delcommand HiLink -endif +HiLink plmTodo Todo +HiLink plmNumber Number +HiLink plmOperator Operator +HiLink plmDelimiter Operator +"HiLink plmShowTab Error +"HiLink plmShowTabc Error +HiLink plmIdentifier Identifier +HiLink plmBuiltIn Statement +HiLink plm286BuiltIn Statement +HiLink plm386BuiltIn Statement +HiLink plm386w16BuiltIn Statement +HiLink plmReserved Statement +HiLink plm386Reserved Statement +HiLink plmPreProc PreProc +HiLink plmCommentError plmError +HiLink plmCommentString plmString +HiLink plmComment2String plmString +HiLink plmCommentSkip plmComment +HiLink plmString String +HiLink plmComment Comment + +delcommand HiLink let b:current_syntax = "plm" diff --git a/runtime/syntax/plp.vim b/runtime/syntax/plp.vim index f59702d3b..48dc4b249 100644 --- a/runtime/syntax/plp.vim +++ b/runtime/syntax/plp.vim @@ -7,11 +7,8 @@ " Add to filetype.vim the following line (without quote sign): " au BufNewFile,BufRead *.plp setf plp -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -19,14 +16,9 @@ if !exists("main_syntax") let main_syntax = 'perlscript' endif -if version < 600 - so <sfile>:p:h/html.vim - syn include @PLPperl <sfile>:p:h/perl.vim -else - runtime! syntax/html.vim - unlet b:current_syntax - syn include @PLPperl syntax/perl.vim -endif +runtime! syntax/html.vim +unlet b:current_syntax +syn include @PLPperl syntax/perl.vim syn cluster htmlPreproc add=PLPperlblock diff --git a/runtime/syntax/plsql.vim b/runtime/syntax/plsql.vim index 6e513660f..173c22f76 100644 --- a/runtime/syntax/plsql.vim +++ b/runtime/syntax/plsql.vim @@ -9,11 +9,8 @@ " Austin Ziegler (austin at halostatue dot ca) " Added 8i+ features. " -" For version 5.x, clear all syntax items. -" For version 6.x, quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -223,54 +220,46 @@ endif syn sync minlines=10 maxlines=100 " Define the default highlighting. -" For version 5.x and earlier, only when not done already. -" For version 5.8 and later, only when an item doesn't have highlighting yet. -if version >= 508 || !exists("did_plsql_syn_inits") - if version < 508 - let did_plsql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet. +command -nargs=+ HiLink hi def link <args> - HiLink plsqlAttribute Macro - HiLink plsqlBlockError Error - HiLink plsqlBooleanLiteral Boolean - HiLink plsqlCharLiteral Character - HiLink plsqlComment Comment - HiLink plsqlCommentL Comment - HiLink plsqlConditional Conditional - HiLink plsqlError Error - HiLink plsqlErrInBracket Error - HiLink plsqlErrInBlock Error - HiLink plsqlErrInParen Error - HiLink plsqlException Function - HiLink plsqlFloatLiteral Float - HiLink plsqlFunction Function - HiLink plsqlGarbage Error - HiLink plsqlHostIdentifier Label - HiLink plsqlIdentifier Normal - HiLink plsqlIntLiteral Number - HiLink plsqlOperator Operator - HiLink plsqlParen Normal - HiLink plsqlParenError Error - HiLink plsqlSpaceError Error - HiLink plsqlPseudo PreProc - HiLink plsqlKeyword Keyword - HiLink plsqlRepeat Repeat - HiLink plsqlStorage StorageClass - HiLink plsqlSQLKeyword Function - HiLink plsqlStringError Error - HiLink plsqlStringLiteral String - HiLink plsqlCommentString String - HiLink plsqlComment2String String - HiLink plsqlSymbol Normal - HiLink plsqlTrigger Function - HiLink plsqlTypeAttribute StorageClass - HiLink plsqlTodo Todo +HiLink plsqlAttribute Macro +HiLink plsqlBlockError Error +HiLink plsqlBooleanLiteral Boolean +HiLink plsqlCharLiteral Character +HiLink plsqlComment Comment +HiLink plsqlCommentL Comment +HiLink plsqlConditional Conditional +HiLink plsqlError Error +HiLink plsqlErrInBracket Error +HiLink plsqlErrInBlock Error +HiLink plsqlErrInParen Error +HiLink plsqlException Function +HiLink plsqlFloatLiteral Float +HiLink plsqlFunction Function +HiLink plsqlGarbage Error +HiLink plsqlHostIdentifier Label +HiLink plsqlIdentifier Normal +HiLink plsqlIntLiteral Number +HiLink plsqlOperator Operator +HiLink plsqlParen Normal +HiLink plsqlParenError Error +HiLink plsqlSpaceError Error +HiLink plsqlPseudo PreProc +HiLink plsqlKeyword Keyword +HiLink plsqlRepeat Repeat +HiLink plsqlStorage StorageClass +HiLink plsqlSQLKeyword Function +HiLink plsqlStringError Error +HiLink plsqlStringLiteral String +HiLink plsqlCommentString String +HiLink plsqlComment2String String +HiLink plsqlSymbol Normal +HiLink plsqlTrigger Function +HiLink plsqlTypeAttribute StorageClass +HiLink plsqlTodo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "plsql" diff --git a/runtime/syntax/po.vim b/runtime/syntax/po.vim index 2ab13ac0b..f98813c62 100644 --- a/runtime/syntax/po.vim +++ b/runtime/syntax/po.vim @@ -6,11 +6,8 @@ " Leonardo Fontenelle (Spell checking) " Nam SungHyun <namsh@kldp.org> (Original maintainer) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo @@ -82,61 +79,53 @@ syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 c syn match poVariable contained "%\d" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_po_syn_inits") - if version < 508 - let did_po_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink poCommentSources PreProc - HiLink poComment Comment - HiLink poCommentAutomatic Comment - HiLink poCommentTranslator Comment - HiLink poCommentFlags Special - HiLink poCommentDiff Comment - HiLink poCopyrightUnset Todo - HiLink poFlagFuzzy Todo - HiLink poDiffOld Todo - HiLink poDiffNew Special - HiLink poObsolete Comment - - HiLink poStatementMsgid Statement - HiLink poStatementMsgstr Statement - HiLink poStatementMsgidplural Statement - HiLink poStatementMsgCTxt Statement - HiLink poPluralCaseN Constant - - HiLink poStringCTxt Comment - HiLink poStringID String - HiLink poStringSTR String - HiLink poCommentKDE Comment - HiLink poCommentKDEError Error - HiLink poPluralKDE Comment - HiLink poPluralKDEError Error - HiLink poHeaderItem Identifier - HiLink poHeaderUndefined Todo - HiLink poKDEdesktopFile Identifier - - HiLink poHtml Identifier - HiLink poHtmlNot String - HiLink poHtmlTranslatables String - HiLink poLineBreak String - - HiLink poFormat poSpecial - HiLink poSpecial Special - HiLink poAcceleratorId Special - HiLink poAcceleratorStr Special - HiLink poVariable Special - - HiLink poMsguniqError Special - HiLink poMsguniqErrorMarkers Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink poCommentSources PreProc +HiLink poComment Comment +HiLink poCommentAutomatic Comment +HiLink poCommentTranslator Comment +HiLink poCommentFlags Special +HiLink poCommentDiff Comment +HiLink poCopyrightUnset Todo +HiLink poFlagFuzzy Todo +HiLink poDiffOld Todo +HiLink poDiffNew Special +HiLink poObsolete Comment + +HiLink poStatementMsgid Statement +HiLink poStatementMsgstr Statement +HiLink poStatementMsgidplural Statement +HiLink poStatementMsgCTxt Statement +HiLink poPluralCaseN Constant + +HiLink poStringCTxt Comment +HiLink poStringID String +HiLink poStringSTR String +HiLink poCommentKDE Comment +HiLink poCommentKDEError Error +HiLink poPluralKDE Comment +HiLink poPluralKDEError Error +HiLink poHeaderItem Identifier +HiLink poHeaderUndefined Todo +HiLink poKDEdesktopFile Identifier + +HiLink poHtml Identifier +HiLink poHtmlNot String +HiLink poHtmlTranslatables String +HiLink poLineBreak String + +HiLink poFormat poSpecial +HiLink poSpecial Special +HiLink poAcceleratorId Special +HiLink poAcceleratorStr Special +HiLink poVariable Special + +HiLink poMsguniqError Special +HiLink poMsguniqErrorMarkers Comment + +delcommand HiLink let b:current_syntax = "po" diff --git a/runtime/syntax/pod.vim b/runtime/syntax/pod.vim index b9f2e0854..c54514127 100644 --- a/runtime/syntax/pod.vim +++ b/runtime/syntax/pod.vim @@ -19,11 +19,8 @@ " Remove any old syntax stuff hanging around (this is suppressed " automatically by ":syn include" if necessary). -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -67,28 +64,20 @@ syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_pod_syntax_inits") - if version < 508 - let did_pod_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink podCommand Statement - HiLink podCmdText String - HiLink podOverIndent Number - HiLink podForKeywd Identifier - HiLink podFormat Identifier - HiLink podVerbatimLine PreProc - HiLink podSpecial Identifier - HiLink podEscape String - HiLink podEscape2 Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink podCommand Statement +HiLink podCmdText String +HiLink podOverIndent Number +HiLink podForKeywd Identifier +HiLink podFormat Identifier +HiLink podVerbatimLine PreProc +HiLink podSpecial Identifier +HiLink podEscape String +HiLink podEscape2 Number + +delcommand HiLink if exists("perl_pod_spellcheck_headings") " Spell-check headings diff --git a/runtime/syntax/postscr.vim b/runtime/syntax/postscr.vim index fddfe4c94..5b0b4421f 100644 --- a/runtime/syntax/postscr.vim +++ b/runtime/syntax/postscr.vim @@ -13,11 +13,8 @@ " postscr_encodings - highlight encoding names (there are a lot) " postscr_andornot_binary - highlight and, or, and not as binary operators (not logical) " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -25,11 +22,7 @@ endif syn case match " Keyword characters - all 7-bit ASCII bar PS delimiters and ws -if version >= 600 - setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% -else - set iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% -endif +setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% " Yer trusty old TODO highlghter! syn keyword postscrTodo contained TODO @@ -730,68 +723,60 @@ if exists("postscr_ghostscript") endif " GhostScript highlighting " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_postscr_syntax_inits") - if version < 508 - let did_postscr_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink postscrComment Comment - - HiLink postscrConstant Constant - HiLink postscrString String - HiLink postscrASCIIString postscrString - HiLink postscrHexString postscrString - HiLink postscrASCII85String postscrString - HiLink postscrNumber Number - HiLink postscrInteger postscrNumber - HiLink postscrHex postscrNumber - HiLink postscrRadix postscrNumber - HiLink postscrFloat Float - HiLink postscrBoolean Boolean - - HiLink postscrIdentifier Identifier - HiLink postscrProcedure Function - - HiLink postscrName Statement - HiLink postscrConditional Conditional - HiLink postscrRepeat Repeat - HiLink postscrL2Repeat postscrRepeat - HiLink postscrOperator Operator - HiLink postscrL1Operator postscrOperator - HiLink postscrL2Operator postscrOperator - HiLink postscrL3Operator postscrOperator - HiLink postscrMathOperator postscrOperator - HiLink postscrLogicalOperator postscrOperator - HiLink postscrBinaryOperator postscrOperator - - HiLink postscrDSCComment SpecialComment - HiLink postscrSpecialChar SpecialChar - - HiLink postscrTodo Todo - - HiLink postscrError Error - HiLink postscrSpecialCharError postscrError - HiLink postscrASCII85CharError postscrError - HiLink postscrHexCharError postscrError - HiLink postscrASCIIStringError postscrError - HiLink postscrIdentifierError postscrError - - if exists("postscr_ghostscript") - HiLink postscrGSOperator postscrOperator - HiLink postscrGSMathOperator postscrMathOperator - else - HiLink postscrGSOperator postscrError - HiLink postscrGSMathOperator postscrError - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink postscrComment Comment + +HiLink postscrConstant Constant +HiLink postscrString String +HiLink postscrASCIIString postscrString +HiLink postscrHexString postscrString +HiLink postscrASCII85String postscrString +HiLink postscrNumber Number +HiLink postscrInteger postscrNumber +HiLink postscrHex postscrNumber +HiLink postscrRadix postscrNumber +HiLink postscrFloat Float +HiLink postscrBoolean Boolean + +HiLink postscrIdentifier Identifier +HiLink postscrProcedure Function + +HiLink postscrName Statement +HiLink postscrConditional Conditional +HiLink postscrRepeat Repeat +HiLink postscrL2Repeat postscrRepeat +HiLink postscrOperator Operator +HiLink postscrL1Operator postscrOperator +HiLink postscrL2Operator postscrOperator +HiLink postscrL3Operator postscrOperator +HiLink postscrMathOperator postscrOperator +HiLink postscrLogicalOperator postscrOperator +HiLink postscrBinaryOperator postscrOperator + +HiLink postscrDSCComment SpecialComment +HiLink postscrSpecialChar SpecialChar + +HiLink postscrTodo Todo + +HiLink postscrError Error +HiLink postscrSpecialCharError postscrError +HiLink postscrASCII85CharError postscrError +HiLink postscrHexCharError postscrError +HiLink postscrASCIIStringError postscrError +HiLink postscrIdentifierError postscrError + +if exists("postscr_ghostscript") +HiLink postscrGSOperator postscrOperator +HiLink postscrGSMathOperator postscrMathOperator +else +HiLink postscrGSOperator postscrError +HiLink postscrGSMathOperator postscrError endif +delcommand HiLink + let b:current_syntax = "postscr" " vim: ts=8 diff --git a/runtime/syntax/pov.vim b/runtime/syntax/pov.vim index 4c1fd9624..8595bcb15 100644 --- a/runtime/syntax/pov.vim +++ b/runtime/syntax/pov.vim @@ -5,14 +5,8 @@ " Required Vim Version: 6.0 " Setup -if version >= 600 - " Quit when a syntax file was already loaded - if exists("b:current_syntax") - finish - endif -else - " Croak when an old Vim is sourcing us. - echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or use a version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/povini.vim b/runtime/syntax/povini.vim index 726fe1fc7..ac1f87875 100644 --- a/runtime/syntax/povini.vim +++ b/runtime/syntax/povini.vim @@ -5,14 +5,8 @@ " Required Vim Version: 6.0 " Setup -if version >= 600 - " Quit when a syntax file was already loaded - if exists("b:current_syntax") - finish - endif -else - " Croak when an old Vim is sourcing us. - echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/ppd.vim b/runtime/syntax/ppd.vim index 192f70c05..31d3841e3 100644 --- a/runtime/syntax/ppd.vim +++ b/runtime/syntax/ppd.vim @@ -3,11 +3,8 @@ " Maintainer: Bjoern Jacke <bjacke@suse.de> " Last Change: 2001-10-06 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -21,27 +18,19 @@ syn match ppdGUIText "/.*:" syn match ppdContraints "^*UIConstraints:" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ahdl_syn_inits") - if version < 508 - let did_ahdl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - HiLink ppdComment Comment - HiLink ppdDefine Statement - HiLink ppdUI Function - HiLink ppdUIGroup Function - HiLink ppdDef String - HiLink ppdGUIText Type - HiLink ppdContraints Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + + +HiLink ppdComment Comment +HiLink ppdDefine Statement +HiLink ppdUI Function +HiLink ppdUIGroup Function +HiLink ppdDef String +HiLink ppdGUIText Type +HiLink ppdContraints Special + +delcommand HiLink let b:current_syntax = "ppd" diff --git a/runtime/syntax/ppwiz.vim b/runtime/syntax/ppwiz.vim index d3d7b3a17..599bf0b89 100644 --- a/runtime/syntax/ppwiz.vim +++ b/runtime/syntax/ppwiz.vim @@ -6,11 +6,8 @@ " Filename: ppwiz.vim " Remove old syntax stuff -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -63,33 +60,25 @@ syn match ppwizInteger "\d\+" contained syn cluster ppwizArgVal add=ppwizString,ppwizInteger " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ppwiz_syn_inits") - if version < 508 - let did_ppwiz_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink ppwizSpecial Special - HiLink ppwizEqual ppwizSpecial - HiLink ppwizOperator ppwizSpecial - HiLink ppwizComment Comment - HiLink ppwizDef PreProc - HiLink ppwizMacro Statement - HiLink ppwizArg Identifier - HiLink ppwizStdVar Identifier - HiLink ppwizRexxVar Identifier - HiLink ppwizString Constant - HiLink ppwizInteger Constant - HiLink ppwizCont ppwizSpecial - HiLink ppwizError Error - HiLink ppwizHTML Type +HiLink ppwizSpecial Special +HiLink ppwizEqual ppwizSpecial +HiLink ppwizOperator ppwizSpecial +HiLink ppwizComment Comment +HiLink ppwizDef PreProc +HiLink ppwizMacro Statement +HiLink ppwizArg Identifier +HiLink ppwizStdVar Identifier +HiLink ppwizRexxVar Identifier +HiLink ppwizString Constant +HiLink ppwizInteger Constant +HiLink ppwizCont ppwizSpecial +HiLink ppwizError Error +HiLink ppwizHTML Type - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "ppwiz" diff --git a/runtime/syntax/prescribe.vim b/runtime/syntax/prescribe.vim index d89ee3525..05f9162e4 100644 --- a/runtime/syntax/prescribe.vim +++ b/runtime/syntax/prescribe.vim @@ -4,11 +4,8 @@ " URL: http://www.hampft.de/vim/syntax/prescribe.vim " Last Change: 2005 Mar 04 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -44,25 +41,17 @@ syn region prescribeString start=+'+ end=+'+ skip=+\\'+ syn region prescribeComment start=+CMNT+ end=+;+ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_prescribe_syn_inits") - if version < 508 - let did_prescribe_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink prescribeSpecial PreProc - HiLink prescribeStatement Statement - HiLink prescribeNumber Number - HiLink prescribeCSETArg String - HiLink prescribeFRPOArg String - HiLink prescribeComment Comment +HiLink prescribeSpecial PreProc +HiLink prescribeStatement Statement +HiLink prescribeNumber Number +HiLink prescribeCSETArg String +HiLink prescribeFRPOArg String +HiLink prescribeComment Comment - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "prescribe" diff --git a/runtime/syntax/procmail.vim b/runtime/syntax/procmail.vim index c2ffa3988..9202dbf29 100644 --- a/runtime/syntax/procmail.vim +++ b/runtime/syntax/procmail.vim @@ -4,11 +4,8 @@ " Last Change: 2003 Aug 14 " Author: Sonia Heimann -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -33,34 +30,26 @@ syn region procmailActionNested start=+^\s*{+ end=+^\s*}+ contains=procmailRecip syn region procmailRecipe start=+^\s*:.*$+ end=+^\s*\($\|}\)+me=e-1 contains=procmailComment,procmailCondition,procmailActionFolder,procmailActionVariable,procmailActionForward,procmailActionPipe,procmailActionNested,procmailVarDeclRegion " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_procmail_syntax_inits") - if version < 508 - let did_procmail_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink procmailComment Comment - HiLink procmailTodo Todo +HiLink procmailComment Comment +HiLink procmailTodo Todo - HiLink procmailRecipe Statement - "HiLink procmailCondition Statement +HiLink procmailRecipe Statement +"HiLink procmailCondition Statement - HiLink procmailActionFolder procmailAction - HiLink procmailActionVariable procmailAction - HiLink procmailActionForward procmailAction - HiLink procmailActionPipe procmailAction - HiLink procmailAction Function - HiLink procmailVar Identifier - HiLink procmailVarDecl Identifier +HiLink procmailActionFolder procmailAction +HiLink procmailActionVariable procmailAction +HiLink procmailActionForward procmailAction +HiLink procmailActionPipe procmailAction +HiLink procmailAction Function +HiLink procmailVar Identifier +HiLink procmailVarDecl Identifier - HiLink procmailString String +HiLink procmailString String - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "procmail" diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim index 85a54a650..9ff506960 100644 --- a/runtime/syntax/progress.vim +++ b/runtime/syntax/progress.vim @@ -11,22 +11,15 @@ " Version: 13 " Last Change: Nov 11 2012 -" For version 5.x: Clear all syntax item -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim -if version >= 600 - setlocal iskeyword=@,48-57,_,-,!,#,$,% -else - set iskeyword=@,48-57,_,-,!,#,$,% -endif +setlocal iskeyword=@,48-57,_,-,!,#,$,% " The Progress editor doesn't cope with tabs very well. set expandtab @@ -282,44 +275,36 @@ syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] syn sync lines=800 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_progress_syntax_inits") - if version < 508 - let did_progress_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " The default methods for highlighting. Can be overridden later. - HiLink ProgressByte Number - HiLink ProgressCase Repeat - HiLink ProgressComment Comment - HiLink ProgressConditional Conditional - HiLink ProgressDebug Debug - HiLink ProgressDo Repeat - HiLink ProgressEndError Error - HiLink ProgressFor Repeat - HiLink ProgressFunction Procedure - HiLink ProgressIdentifier Identifier - HiLink ProgressInclude Include - HiLink ProgressMatrixDelimiter Identifier - HiLink ProgressNumber Number - HiLink ProgressOperator Operator - HiLink ProgressPreProc PreProc - HiLink ProgressProcedure Procedure - HiLink ProgressQuote Delimiter - HiLink ProgressRepeat Repeat - HiLink ProgressReserved Statement - HiLink ProgressSpaceError Error - HiLink ProgressString String - HiLink ProgressTodo Todo - HiLink ProgressType Statement - HiLink ProgressShowTab Error +" The default methods for highlighting. Can be overridden later. +HiLink ProgressByte Number +HiLink ProgressCase Repeat +HiLink ProgressComment Comment +HiLink ProgressConditional Conditional +HiLink ProgressDebug Debug +HiLink ProgressDo Repeat +HiLink ProgressEndError Error +HiLink ProgressFor Repeat +HiLink ProgressFunction Procedure +HiLink ProgressIdentifier Identifier +HiLink ProgressInclude Include +HiLink ProgressMatrixDelimiter Identifier +HiLink ProgressNumber Number +HiLink ProgressOperator Operator +HiLink ProgressPreProc PreProc +HiLink ProgressProcedure Procedure +HiLink ProgressQuote Delimiter +HiLink ProgressRepeat Repeat +HiLink ProgressReserved Statement +HiLink ProgressSpaceError Error +HiLink ProgressString String +HiLink ProgressTodo Todo +HiLink ProgressType Statement +HiLink ProgressShowTab Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "progress" diff --git a/runtime/syntax/prolog.vim b/runtime/syntax/prolog.vim index f5f0e673e..2131308b8 100644 --- a/runtime/syntax/prolog.vim +++ b/runtime/syntax/prolog.vim @@ -8,10 +8,8 @@ " If the "prolog_highlighting_clean" variable exists, it is rather sparse. " Otherwise you get more highlighting. -" Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -78,46 +76,38 @@ syn sync maxlines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_prolog_syn_inits") - if version < 508 - let did_prolog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink prologComment Comment - HiLink prologCComment Comment - HiLink prologCharCode Special - - if exists ("prolog_highlighting_clean") - - HiLink prologKeyword Statement - HiLink prologClauseHead Statement - HiLink prologClause Normal - - else - - HiLink prologKeyword Keyword - HiLink prologClauseHead Constant - HiLink prologClause Normal - HiLink prologQuestion PreProc - HiLink prologSpecialCharacter Special - HiLink prologNumber Number - HiLink prologAsIs Normal - HiLink prologCommentError Error - HiLink prologAtom String - HiLink prologString String - HiLink prologOperator Operator - - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default highlighting. +HiLink prologComment Comment +HiLink prologCComment Comment +HiLink prologCharCode Special + +if exists ("prolog_highlighting_clean") + +HiLink prologKeyword Statement +HiLink prologClauseHead Statement +HiLink prologClause Normal + +else + +HiLink prologKeyword Keyword +HiLink prologClauseHead Constant +HiLink prologClause Normal +HiLink prologQuestion PreProc +HiLink prologSpecialCharacter Special +HiLink prologNumber Number +HiLink prologAsIs Normal +HiLink prologCommentError Error +HiLink prologAtom String +HiLink prologString String +HiLink prologOperator Operator + endif +delcommand HiLink + let b:current_syntax = "prolog" " vim: ts=8 diff --git a/runtime/syntax/promela.vim b/runtime/syntax/promela.vim index e812bc274..add451456 100644 --- a/runtime/syntax/promela.vim +++ b/runtime/syntax/promela.vim @@ -5,11 +5,8 @@ " Last Change: Thu Aug 7 21:22:48 CEST 2008 " Version: 0.5 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/proto.vim b/runtime/syntax/proto.vim index 4d6a77e84..4615e0ca0 100644 --- a/runtime/syntax/proto.vim +++ b/runtime/syntax/proto.vim @@ -22,9 +22,8 @@ " " http://code.google.com/p/protobuf/ -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/psf.vim b/runtime/syntax/psf.vim index 2b376f94c..e059ff9f4 100644 --- a/runtime/syntax/psf.vim +++ b/runtime/syntax/psf.vim @@ -4,10 +4,8 @@ " Maintainer: Rex Barzee <rex_barzee@hp.com> " Last change: 25 Apr 2001 -if version < 600 - " Remove any old syntax stuff hanging around - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -73,27 +71,19 @@ syn match psfComment "#.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_psf_syntax_inits") - if version < 508 - let did_psf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink psfObject Statement - HiLink psfAttrib Type - HiLink psfQuotString String - HiLink psfObjTag Identifier - HiLink psfAttAbbrev PreProc - HiLink psfObjTags Identifier - - HiLink psfComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink psfObject Statement +HiLink psfAttrib Type +HiLink psfQuotString String +HiLink psfObjTag Identifier +HiLink psfAttAbbrev PreProc +HiLink psfObjTags Identifier + +HiLink psfComment Comment + +delcommand HiLink " Long descriptions and copyrights confuse the syntax highlighting, so " force vim to backup at least 100 lines before the top visible line diff --git a/runtime/syntax/ptcap.vim b/runtime/syntax/ptcap.vim index 45590cf61..6d3c460d3 100644 --- a/runtime/syntax/ptcap.vim +++ b/runtime/syntax/ptcap.vim @@ -4,11 +4,8 @@ " URL: http://folk.uio.no/hakonrk/vim/syntax/ptcap.vim " Last Change: 2001 May 15 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -73,34 +70,27 @@ syn region ptcapField start=":" skip="[^\\]\(\\\\\)*\\$" end="[^\\]\(\\\\\)* syn region ptcapString matchgroup=ptcapOperator start="=" skip="[^\\]\(\\\\\)*\\:" matchgroup=ptcapDelimiter end=":"me=e-1 matchgroup=NONE end="[^\\]\(\\\\\)*[^\\]$" end="^$" contains=ptcapEscapedChar,ptcapLineCont keepend contained syn region ptcapComment start="^\s*#" end="$" contains=ptcapLeadBlank -if version >= 508 || !exists("did_ptcap_syntax_inits") - if version < 508 - let did_ptcap_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ptcapComment Comment - HiLink ptcapDelimiter Delimiter - " The highlighting of "ptcapEntry" should always be overridden by - " its contents, so I use Todo highlighting to indicate that there - " is work to be done with the syntax file if you can see it :-) - HiLink ptcapEntry Todo - HiLink ptcapError Error - HiLink ptcapEscapedChar SpecialChar - HiLink ptcapField Type - HiLink ptcapLeadBlank NONE - HiLink ptcapLineCont Special - HiLink ptcapNames Label - HiLink ptcapNumber NONE - HiLink ptcapNumberError Error - HiLink ptcapOperator Operator - HiLink ptcapSpecialCap Type - HiLink ptcapString NONE - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink ptcapComment Comment +HiLink ptcapDelimiter Delimiter +" The highlighting of "ptcapEntry" should always be overridden by +" its contents, so I use Todo highlighting to indicate that there +" is work to be done with the syntax file if you can see it :-) +HiLink ptcapEntry Todo +HiLink ptcapError Error +HiLink ptcapEscapedChar SpecialChar +HiLink ptcapField Type +HiLink ptcapLeadBlank NONE +HiLink ptcapLineCont Special +HiLink ptcapNames Label +HiLink ptcapNumber NONE +HiLink ptcapNumberError Error +HiLink ptcapOperator Operator +HiLink ptcapSpecialCap Type +HiLink ptcapString NONE + +delcommand HiLink let b:current_syntax = "ptcap" diff --git a/runtime/syntax/purifylog.vim b/runtime/syntax/purifylog.vim index 8bcfb4b00..b56ca6ae1 100644 --- a/runtime/syntax/purifylog.vim +++ b/runtime/syntax/purifylog.vim @@ -3,11 +3,8 @@ " Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com> " Last Change: 2003 May 11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -57,62 +54,54 @@ syn match purifyLogZPR "^ZPR:.*$" syn match purifyLogZPW "^ZPW:.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_purifyLog_syntax_inits") - if version < 508 - let did_purifyLog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink purifyLogFIU purifyLogInformational - HiLink purifyLogMAF purifyLogInformational - HiLink purifyLogMIU purifyLogInformational - HiLink purifyLogSIG purifyLogInformational - HiLink purifyLogWPF purifyLogInformational - HiLink purifyLogWPM purifyLogInformational - HiLink purifyLogWPN purifyLogInformational - HiLink purifyLogWPR purifyLogInformational - HiLink purifyLogWPW purifyLogInformational - HiLink purifyLogWPX purifyLogInformational +HiLink purifyLogFIU purifyLogInformational +HiLink purifyLogMAF purifyLogInformational +HiLink purifyLogMIU purifyLogInformational +HiLink purifyLogSIG purifyLogInformational +HiLink purifyLogWPF purifyLogInformational +HiLink purifyLogWPM purifyLogInformational +HiLink purifyLogWPN purifyLogInformational +HiLink purifyLogWPR purifyLogInformational +HiLink purifyLogWPW purifyLogInformational +HiLink purifyLogWPX purifyLogInformational - HiLink purifyLogABR purifyLogWarning - HiLink purifyLogBSR purifyLogWarning - HiLink purifyLogBSW purifyLogWarning - HiLink purifyLogFMR purifyLogWarning - HiLink purifyLogMLK purifyLogWarning - HiLink purifyLogMSE purifyLogWarning - HiLink purifyLogPAR purifyLogWarning - HiLink purifyLogPLK purifyLogWarning - HiLink purifyLogSBR purifyLogWarning - HiLink purifyLogSOF purifyLogWarning - HiLink purifyLogUMC purifyLogWarning - HiLink purifyLogUMR purifyLogWarning +HiLink purifyLogABR purifyLogWarning +HiLink purifyLogBSR purifyLogWarning +HiLink purifyLogBSW purifyLogWarning +HiLink purifyLogFMR purifyLogWarning +HiLink purifyLogMLK purifyLogWarning +HiLink purifyLogMSE purifyLogWarning +HiLink purifyLogPAR purifyLogWarning +HiLink purifyLogPLK purifyLogWarning +HiLink purifyLogSBR purifyLogWarning +HiLink purifyLogSOF purifyLogWarning +HiLink purifyLogUMC purifyLogWarning +HiLink purifyLogUMR purifyLogWarning - HiLink purifyLogABW purifyLogCorrupting - HiLink purifyLogBRK purifyLogCorrupting - HiLink purifyLogFMW purifyLogCorrupting - HiLink purifyLogFNH purifyLogCorrupting - HiLink purifyLogFUM purifyLogCorrupting - HiLink purifyLogMRE purifyLogCorrupting - HiLink purifyLogSBW purifyLogCorrupting +HiLink purifyLogABW purifyLogCorrupting +HiLink purifyLogBRK purifyLogCorrupting +HiLink purifyLogFMW purifyLogCorrupting +HiLink purifyLogFNH purifyLogCorrupting +HiLink purifyLogFUM purifyLogCorrupting +HiLink purifyLogMRE purifyLogCorrupting +HiLink purifyLogSBW purifyLogCorrupting - HiLink purifyLogCOR purifyLogFatal - HiLink purifyLogNPR purifyLogFatal - HiLink purifyLogNPW purifyLogFatal - HiLink purifyLogZPR purifyLogFatal - HiLink purifyLogZPW purifyLogFatal +HiLink purifyLogCOR purifyLogFatal +HiLink purifyLogNPR purifyLogFatal +HiLink purifyLogNPW purifyLogFatal +HiLink purifyLogZPR purifyLogFatal +HiLink purifyLogZPW purifyLogFatal - HiLink purifyLogHeader Comment - HiLink purifyLogInformational PreProc - HiLink purifyLogWarning Type - HiLink purifyLogCorrupting Error - HiLink purifyLogFatal Error +HiLink purifyLogHeader Comment +HiLink purifyLogInformational PreProc +HiLink purifyLogWarning Type +HiLink purifyLogCorrupting Error +HiLink purifyLogFatal Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "purifylog" diff --git a/runtime/syntax/pyrex.vim b/runtime/syntax/pyrex.vim index 7dc9b955b..cd743df88 100644 --- a/runtime/syntax/pyrex.vim +++ b/runtime/syntax/pyrex.vim @@ -4,21 +4,14 @@ " URL: http://marcobari.altervista.org/pyrex_vim.html " Last Change: 2009 Nov 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the Python syntax to start with -if version < 600 - so <sfile>:p:h/python.vim -else - runtime! syntax/python.vim - unlet b:current_syntax -endif +runtime! syntax/python.vim +unlet b:current_syntax " Pyrex extentions syn keyword pyrexStatement cdef typedef ctypedef sizeof @@ -44,24 +37,17 @@ syn match pythonInclude "from" syn match pyrexForFrom "\(for[^:]*\)\@<=from" " Default highlighting -if version >= 508 || !exists("did_pyrex_syntax_inits") - if version < 508 - let did_pyrex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink pyrexStatement Statement - HiLink pyrexType Type - HiLink pyrexStructure Structure - HiLink pyrexInclude PreCondit - HiLink pyrexAccess pyrexStatement - if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") - HiLink pyrexBuiltin Function - endif - HiLink pyrexForFrom Statement - - delcommand HiLink +command -nargs=+ HiLink hi def link <args> +HiLink pyrexStatement Statement +HiLink pyrexType Type +HiLink pyrexStructure Structure +HiLink pyrexInclude PreCondit +HiLink pyrexAccess pyrexStatement +if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") +HiLink pyrexBuiltin Function endif +HiLink pyrexForFrom Statement + +delcommand HiLink let b:current_syntax = "pyrex" diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim index 59675c374..1951680a6 100644 --- a/runtime/syntax/python.vim +++ b/runtime/syntax/python.vim @@ -36,11 +36,8 @@ " let python_highlight_all = 1 " -" For version 5.x: Clear all syntax items. -" For version 6.x: Quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded. +if exists("b:current_syntax") finish endif @@ -292,51 +289,44 @@ endif " Sync at the beginning of class, function, or method definition. syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*(" -if version >= 508 || !exists("did_python_syn_inits") - if version <= 508 - let did_python_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - " The default highlight links. Can be overridden later. - HiLink pythonStatement Statement - HiLink pythonConditional Conditional - HiLink pythonRepeat Repeat - HiLink pythonOperator Operator - HiLink pythonException Exception - HiLink pythonInclude Include - HiLink pythonAsync Statement - HiLink pythonDecorator Define - HiLink pythonDecoratorName Function - HiLink pythonFunction Function - HiLink pythonComment Comment - HiLink pythonTodo Todo - HiLink pythonString String - HiLink pythonRawString String - HiLink pythonQuotes String - HiLink pythonTripleQuotes pythonQuotes - HiLink pythonEscape Special - if !exists("python_no_number_highlight") - HiLink pythonNumber Number - endif - if !exists("python_no_builtin_highlight") - HiLink pythonBuiltin Function - endif - if !exists("python_no_exception_highlight") - HiLink pythonExceptions Structure - endif - if exists("python_space_error_highlight") - HiLink pythonSpaceError Error - endif - if !exists("python_no_doctest_highlight") - HiLink pythonDoctest Special - HiLink pythonDoctestValue Define - endif - - delcommand HiLink +" The default highlight links. Can be overridden later. +HiLink pythonStatement Statement +HiLink pythonConditional Conditional +HiLink pythonRepeat Repeat +HiLink pythonOperator Operator +HiLink pythonException Exception +HiLink pythonInclude Include +HiLink pythonAsync Statement +HiLink pythonDecorator Define +HiLink pythonDecoratorName Function +HiLink pythonFunction Function +HiLink pythonComment Comment +HiLink pythonTodo Todo +HiLink pythonString String +HiLink pythonRawString String +HiLink pythonQuotes String +HiLink pythonTripleQuotes pythonQuotes +HiLink pythonEscape Special +if !exists("python_no_number_highlight") + HiLink pythonNumber Number endif +if !exists("python_no_builtin_highlight") + HiLink pythonBuiltin Function +endif +if !exists("python_no_exception_highlight") + HiLink pythonExceptions Structure +endif +if exists("python_space_error_highlight") + HiLink pythonSpaceError Error +endif +if !exists("python_no_doctest_highlight") + HiLink pythonDoctest Special + HiLink pythonDoctestValue Define +endif + +delcommand HiLink let b:current_syntax = "python" diff --git a/runtime/syntax/radiance.vim b/runtime/syntax/radiance.vim index 461b708f0..134792ac1 100644 --- a/runtime/syntax/radiance.vim +++ b/runtime/syntax/radiance.vim @@ -18,20 +18,13 @@ " comments, external command names and the null-modifier "void". -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " all printing characters except '#' and '!' are valid in names. -if version >= 600 - setlocal iskeyword=\",$-~ -else - set iskeyword=\",$-~ -endif +setlocal iskeyword=\",$-~ " The null-modifier syn keyword radianceKeyword void @@ -130,29 +123,21 @@ syn keyword radianceTodo contained TODO XXX syn match radianceComment "#.*$" contains=radianceTodo " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_radiance_syn_inits") - if version < 508 - let did_radiance_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink radianceKeyword Keyword - HiLink radianceExtraType Type - HiLink radianceSurfType Type - HiLink radianceLightType Type - HiLink radianceMatType Type - HiLink radiancePatType Type - HiLink radianceTexType Type - HiLink radianceMixType Type - HiLink radianceComment Comment - HiLink radianceCommand Function - HiLink radianceID String - HiLink radianceTodo Todo - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink radianceKeyword Keyword +HiLink radianceExtraType Type +HiLink radianceSurfType Type +HiLink radianceLightType Type +HiLink radianceMatType Type +HiLink radiancePatType Type +HiLink radianceTexType Type +HiLink radianceMixType Type +HiLink radianceComment Comment +HiLink radianceCommand Function +HiLink radianceID String +HiLink radianceTodo Todo +delcommand HiLink let b:current_syntax = "radiance" diff --git a/runtime/syntax/ratpoison.vim b/runtime/syntax/ratpoison.vim index 9fc59bec0..30cf36980 100644 --- a/runtime/syntax/ratpoison.vim +++ b/runtime/syntax/ratpoison.vim @@ -5,11 +5,8 @@ " Last Change: 2011 Apr 11 " Previous Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au> -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -247,33 +244,25 @@ syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_ratpoison_syn_inits") - if version < 508 - let did_ratpoison_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink ratpoisonBooleanArg Boolean - HiLink ratpoisonCommandArg Keyword - HiLink ratpoisonComment Comment - HiLink ratpoisonDefCommand Identifier - HiLink ratpoisonGravityArg Constant - HiLink ratpoisonKeySeqArg Special - HiLink ratpoisonNumberArg Number - HiLink ratpoisonSetArg Keyword - HiLink ratpoisonStringCommand Identifier - HiLink ratpoisonTodo Todo - HiLink ratpoisonVoidCommand Identifier - HiLink ratpoisonWinFmtArg Special - HiLink ratpoisonWinNameArg Constant - HiLink ratpoisonWinListArg Constant +HiLink ratpoisonBooleanArg Boolean +HiLink ratpoisonCommandArg Keyword +HiLink ratpoisonComment Comment +HiLink ratpoisonDefCommand Identifier +HiLink ratpoisonGravityArg Constant +HiLink ratpoisonKeySeqArg Special +HiLink ratpoisonNumberArg Number +HiLink ratpoisonSetArg Keyword +HiLink ratpoisonStringCommand Identifier +HiLink ratpoisonTodo Todo +HiLink ratpoisonVoidCommand Identifier +HiLink ratpoisonWinFmtArg Special +HiLink ratpoisonWinNameArg Constant +HiLink ratpoisonWinListArg Constant - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "ratpoison" diff --git a/runtime/syntax/rc.vim b/runtime/syntax/rc.vim index a2d5824d3..13900b339 100644 --- a/runtime/syntax/rc.vim +++ b/runtime/syntax/rc.vim @@ -8,11 +8,8 @@ " This file is based on the c.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -148,55 +145,47 @@ syn region rcPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|erro syn sync ccomment rcComment minlines=10 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_rc_syntax_inits") - if version < 508 - let did_rc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink rcCharacter Character - HiLink rcSpecialCharacter rcSpecial - HiLink rcNumber Number - HiLink rcFloat Float - HiLink rcOctalError rcError - HiLink rcParenError rcError - HiLink rcInParen rcError - HiLink rcCommentError rcError - HiLink rcInclude Include - HiLink rcPreProc PreProc - HiLink rcDefine Macro - HiLink rcIncluded rcString - HiLink rcError Error - HiLink rcPreCondit PreCondit - HiLink rcCommentString rcString - HiLink rcComment2String rcString - HiLink rcCommentSkip rcComment - HiLink rcString String - HiLink rcComment Comment - HiLink rcSpecial SpecialChar - HiLink rcTodo Todo - - HiLink rcAttribute rcCommonAttribute - HiLink rcStdId rcStatement - HiLink rcStatement Statement - - " Default color overrides - hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow - hi def rcMainObject term=underline ctermfg=Blue guifg=Blue - hi def rcSubObject ctermfg=Green guifg=Green - hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green - hi def rcParam ctermfg=DarkGreen guifg=DarkGreen - hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen - hi def rcCommonAttribute ctermfg=Brown guifg=Brown - - "HiLink rcIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink rcCharacter Character +HiLink rcSpecialCharacter rcSpecial +HiLink rcNumber Number +HiLink rcFloat Float +HiLink rcOctalError rcError +HiLink rcParenError rcError +HiLink rcInParen rcError +HiLink rcCommentError rcError +HiLink rcInclude Include +HiLink rcPreProc PreProc +HiLink rcDefine Macro +HiLink rcIncluded rcString +HiLink rcError Error +HiLink rcPreCondit PreCondit +HiLink rcCommentString rcString +HiLink rcComment2String rcString +HiLink rcCommentSkip rcComment +HiLink rcString String +HiLink rcComment Comment +HiLink rcSpecial SpecialChar +HiLink rcTodo Todo + +HiLink rcAttribute rcCommonAttribute +HiLink rcStdId rcStatement +HiLink rcStatement Statement + +" Default color overrides +hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow +hi def rcMainObject term=underline ctermfg=Blue guifg=Blue +hi def rcSubObject ctermfg=Green guifg=Green +hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green +hi def rcParam ctermfg=DarkGreen guifg=DarkGreen +hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen +hi def rcCommonAttribute ctermfg=Brown guifg=Brown + +"HiLink rcIdentifier Identifier + +delcommand HiLink let b:current_syntax = "rc" diff --git a/runtime/syntax/rcs.vim b/runtime/syntax/rcs.vim index e45d5fdbb..5fa66c49b 100644 --- a/runtime/syntax/rcs.vim +++ b/runtime/syntax/rcs.vim @@ -9,11 +9,8 @@ " Options: " rcs_folding = 1 For folding strings -" For version 5.x: Clear all syntax items. -" For version 6.x: Quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded. +if exists("b:current_syntax") finish endif @@ -52,25 +49,17 @@ else endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already. -" For version 5.8 and later: only when an item doesn't have highlighting yet. -if version >= 508 || !exists("did_rcs_syn_inits") - if version <= 508 - let did_rcs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet. +command -nargs=+ HiLink hi def link <args> - HiLink rcsKeyword Keyword - HiLink rcsNumber Identifier - HiLink rcsString String - HiLink rcsTextStr String - HiLink rcsSpecial Special - HiLink rcsDiffLines Special - HiLink rcsEOFError Error +HiLink rcsKeyword Keyword +HiLink rcsNumber Identifier +HiLink rcsString String +HiLink rcsTextStr String +HiLink rcsSpecial Special +HiLink rcsDiffLines Special +HiLink rcsEOFError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "rcs" diff --git a/runtime/syntax/rcslog.vim b/runtime/syntax/rcslog.vim index acacfa124..845185299 100644 --- a/runtime/syntax/rcslog.vim +++ b/runtime/syntax/rcslog.vim @@ -3,11 +3,8 @@ " Maintainer: Joe Karthauser <joe@freebsd.org> " Last Change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -16,22 +13,14 @@ syn match rcslogFile "^RCS file:.*" syn match rcslogDate "^date: .*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_rcslog_syntax_inits") - if version < 508 - let did_rcslog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink rcslogFile Type - HiLink rcslogRevision Constant - HiLink rcslogDate Identifier +HiLink rcslogFile Type +HiLink rcslogRevision Constant +HiLink rcslogDate Identifier - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "rcslog" diff --git a/runtime/syntax/rebol.vim b/runtime/syntax/rebol.vim index e6395758f..9c367b01b 100644 --- a/runtime/syntax/rebol.vim +++ b/runtime/syntax/rebol.vim @@ -6,11 +6,8 @@ " URL: http://www.eandem.co.uk/mrw/vim " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -18,11 +15,7 @@ endif syn case ignore " As per current users documentation -if version < 600 - set isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ -else - setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ -endif +setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ " Yer TODO highlighter syn keyword rebolTodo contained TODO @@ -145,65 +138,57 @@ syn keyword rebolConstant none " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_rebol_syntax_inits") - if version < 508 - let did_rebol_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink rebolTodo Todo - - HiLink rebolStatement Statement - HiLink rebolLabel Label - HiLink rebolConditional Conditional - HiLink rebolRepeat Repeat - - HiLink rebolOperator Operator - HiLink rebolLogicOperator rebolOperator - HiLink rebolLogicFunction rebolLogicOperator - HiLink rebolMathOperator rebolOperator - HiLink rebolMathFunction rebolMathOperator - HiLink rebolBinaryOperator rebolOperator - HiLink rebolBinaryFunction rebolBinaryOperator - - HiLink rebolType Type - HiLink rebolTypeFunction rebolOperator - - HiLink rebolWord Identifier - HiLink rebolWordPath rebolWord - HiLink rebolFunction Function - - HiLink rebolCharacter Character - HiLink rebolSpecialCharacter SpecialChar - HiLink rebolString String - - HiLink rebolNumber Number - HiLink rebolInteger rebolNumber - HiLink rebolDecimal rebolNumber - HiLink rebolTime rebolNumber - HiLink rebolDate rebolNumber - HiLink rebolMoney rebolNumber - HiLink rebolBinary rebolNumber - HiLink rebolEmail rebolString - HiLink rebolFile rebolString - HiLink rebolURL rebolString - HiLink rebolIssue rebolNumber - HiLink rebolTuple rebolNumber - HiLink rebolFloat Float - HiLink rebolBoolean Boolean - - HiLink rebolConstant Constant - - HiLink rebolComment Comment - - HiLink rebolError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink rebolTodo Todo + +HiLink rebolStatement Statement +HiLink rebolLabel Label +HiLink rebolConditional Conditional +HiLink rebolRepeat Repeat + +HiLink rebolOperator Operator +HiLink rebolLogicOperator rebolOperator +HiLink rebolLogicFunction rebolLogicOperator +HiLink rebolMathOperator rebolOperator +HiLink rebolMathFunction rebolMathOperator +HiLink rebolBinaryOperator rebolOperator +HiLink rebolBinaryFunction rebolBinaryOperator + +HiLink rebolType Type +HiLink rebolTypeFunction rebolOperator + +HiLink rebolWord Identifier +HiLink rebolWordPath rebolWord +HiLink rebolFunction Function + +HiLink rebolCharacter Character +HiLink rebolSpecialCharacter SpecialChar +HiLink rebolString String + +HiLink rebolNumber Number +HiLink rebolInteger rebolNumber +HiLink rebolDecimal rebolNumber +HiLink rebolTime rebolNumber +HiLink rebolDate rebolNumber +HiLink rebolMoney rebolNumber +HiLink rebolBinary rebolNumber +HiLink rebolEmail rebolString +HiLink rebolFile rebolString +HiLink rebolURL rebolString +HiLink rebolIssue rebolNumber +HiLink rebolTuple rebolNumber +HiLink rebolFloat Float +HiLink rebolBoolean Boolean + +HiLink rebolConstant Constant + +HiLink rebolComment Comment + +HiLink rebolError Error + +delcommand HiLink if exists("my_rebol_file") if file_readable(expand(my_rebol_file)) diff --git a/runtime/syntax/redif.vim b/runtime/syntax/redif.vim index 1b83c0779..9fa9064a8 100644 --- a/runtime/syntax/redif.vim +++ b/runtime/syntax/redif.vim @@ -7,10 +7,8 @@ " File Extension: rdf " Note: The ReDIF format is used by RePEc. -" To be compatible with Vim 5.8 use: -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/registry.vim b/runtime/syntax/registry.vim index 4524247a0..652b609f0 100644 --- a/runtime/syntax/registry.vim +++ b/runtime/syntax/registry.vim @@ -6,11 +6,8 @@ " Included patch from Alexander A. Ulitin " clear any unwanted syntax defs -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -85,29 +82,22 @@ syn match registryHex "^\s*\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$ " Dword (32 bits) syn match registryDword "dword:[0-9a-fA-F]\{8}$" contains=registrySpecial -if version >= 508 || !exists("did_registry_syntax_inits") - if version < 508 - let did_registry_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> " The default methods for highlighting. Can be overridden later - HiLink registryComment Comment - HiLink registryHead Constant - HiLink registryHKEY Constant - HiLink registryPath Special - HiLink registryRemove PreProc - HiLink registryGUID Identifier - HiLink registrySpecial Special - HiLink registrySubKey Type - HiLink registryString String - HiLink registryHex Number - HiLink registryDword Number - - delcommand HiLink -endif +HiLink registryComment Comment +HiLink registryHead Constant +HiLink registryHKEY Constant +HiLink registryPath Special +HiLink registryRemove PreProc +HiLink registryGUID Identifier +HiLink registrySpecial Special +HiLink registrySubKey Type +HiLink registryString String +HiLink registryHex Number +HiLink registryDword Number + +delcommand HiLink let b:current_syntax = "registry" diff --git a/runtime/syntax/remind.vim b/runtime/syntax/remind.vim index 98064e043..8e4e55434 100644 --- a/runtime/syntax/remind.vim +++ b/runtime/syntax/remind.vim @@ -13,9 +13,8 @@ " version 0.7: updated email and link " version 0.6: added THROUGH keyword (courtesy of Ben Orchard) -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -48,35 +47,28 @@ syn match remindDates "'[0-9]\{4}[/-][0-9]\{1,2}[/-][0-9]\{1,2}\(@[0-9]\{1,2}[: syn match remindWarning display excludenl "\S\s\+$"ms=s+1 -if version >= 508 || !exists("did_remind_syn_inits") - if version < 508 - let did_remind_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink remindCommands Function - HiLink remindExpiry Repeat - HiLink remindTag Label - HiLink remindTimed Statement - HiLink remindMove Statement - HiLink remindSpecial Include - HiLink remindRun Function - HiLink remindConditional Conditional - HiLink remindComment Comment - HiLink remindTimes String - HiLink remindString String - HiLink remindDebug Debug - HiLink remindVar Identifier - HiLink remindSubst Constant - HiLink remindAdvanceNumber Number - HiLink remindDateSeparators Comment - HiLink remindDates String - HiLink remindWarning Error +HiLink remindCommands Function +HiLink remindExpiry Repeat +HiLink remindTag Label +HiLink remindTimed Statement +HiLink remindMove Statement +HiLink remindSpecial Include +HiLink remindRun Function +HiLink remindConditional Conditional +HiLink remindComment Comment +HiLink remindTimes String +HiLink remindString String +HiLink remindDebug Debug +HiLink remindVar Identifier +HiLink remindSubst Constant +HiLink remindAdvanceNumber Number +HiLink remindDateSeparators Comment +HiLink remindDates String +HiLink remindWarning Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "remind" diff --git a/runtime/syntax/resolv.vim b/runtime/syntax/resolv.vim index 06d6885c1..1744e66f8 100644 --- a/runtime/syntax/resolv.vim +++ b/runtime/syntax/resolv.vim @@ -9,9 +9,8 @@ " David Necas (Yeti) <yeti@physics.muni.cz> " Stefano Zacchiroli <zack@debian.org> -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -50,38 +49,31 @@ syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contai " Additional errors syn match resolvError /^search .\{257,}/ -if version >= 508 || !exists("did_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif - - HiLink resolvIP Number - HiLink resolvIPNetmask Number - HiLink resolvHostname String - HiLink resolvOption String - - HiLink resolvIPNameserver Number - HiLink resolvHostnameSearch String - HiLink resolvIPNetmaskSortList Number - - HiLink resolvNameServer Identifier - HiLink resolvLwserver Identifier - HiLink resolvDomain Identifier - HiLink resolvSearch Identifier - HiLink resolvSortList Identifier - HiLink resolvOptions Identifier - - HiLink resolvComment Comment - HiLink resolvOperator Operator - HiLink resolvError Error - HiLink resolvIPError Error - HiLink resolvIPSpecial Special - - delcommand HiLink -endif +command! -nargs=+ HiLink hi def link <args> + +HiLink resolvIP Number +HiLink resolvIPNetmask Number +HiLink resolvHostname String +HiLink resolvOption String + +HiLink resolvIPNameserver Number +HiLink resolvHostnameSearch String +HiLink resolvIPNetmaskSortList Number + +HiLink resolvNameServer Identifier +HiLink resolvLwserver Identifier +HiLink resolvDomain Identifier +HiLink resolvSearch Identifier +HiLink resolvSortList Identifier +HiLink resolvOptions Identifier + +HiLink resolvComment Comment +HiLink resolvOperator Operator +HiLink resolvError Error +HiLink resolvIPError Error +HiLink resolvIPSpecial Special + +delcommand HiLink let b:current_syntax = "resolv" diff --git a/runtime/syntax/reva.vim b/runtime/syntax/reva.vim index 03dfc9d4c..f60599219 100644 --- a/runtime/syntax/reva.vim +++ b/runtime/syntax/reva.vim @@ -7,13 +7,8 @@ " Filetypes: *.rf *.frt " NOTE: You should also have the ftplugin/reva.vim file to set 'isk' -" For version 5.x: Clear all syntax items and don't load -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear - echo "Reva syntax file requires version 6.0 or later of vim!" - finish -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/rexx.vim b/runtime/syntax/rexx.vim index ef698a535..b22af93c1 100644 --- a/runtime/syntax/rexx.vim +++ b/runtime/syntax/rexx.vim @@ -6,11 +6,8 @@ " Special Thanks to Dan Sharp <dwsharp@hotmail.com> and Rony G. Flatscher " <Rony.Flatscher@wu-wien.ac.at> for comments and additions -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -244,87 +241,79 @@ syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$" exec "syn sync fromstart" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_rexx_syn_inits") - if version < 508 - let did_rexx_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " make binary and hex strings stand out - hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold - - HiLink rexxLabel2 Function - HiLink doLoopSelectLabelRegion rexxKeyword - HiLink endIterateLeaveLabelRegion rexxKeyword - HiLink rexxLoopKeywords rexxKeyword " Todo - - HiLink rexxNumber Normal "DiffChange +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" make binary and hex strings stand out +hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold + +HiLink rexxLabel2 Function +HiLink doLoopSelectLabelRegion rexxKeyword +HiLink endIterateLeaveLabelRegion rexxKeyword +HiLink rexxLoopKeywords rexxKeyword " Todo + +HiLink rexxNumber Normal "DiffChange " HiLink rexxIdentifier DiffChange - HiLink rexxRegularCallSignal Statement - HiLink rexxExceptionHandling Statement - - HiLink rexxLabel Function - HiLink rexxCharacter Character - HiLink rexxParenError rexxError - HiLink rexxInParen rexxError - HiLink rexxCommentError rexxError - HiLink rexxError Error - HiLink rexxKeyword Statement - HiLink rexxKeywordStatements Statement - - HiLink rexxFunction Function - HiLink rexxString String - HiLink rexxComment Comment - HiLink rexxTodo Todo - HiLink rexxSpecialVariable Special - HiLink rexxConditional rexxKeyword - - HiLink rexxOperator Operator - HiLink rexxMessageOperator rexxOperator - HiLink rexxLineComment Comment - - HiLink rexxLineContinue WildMenu - - HiLink rexxDirective rexxKeyword - HiLink rexxClassDirective Type - HiLink rexxMethodDirective rexxFunction - HiLink rexxAttributeDirective rexxFunction - HiLink rexxRequiresDirective Include - HiLink rexxRoutineDirective rexxFunction +HiLink rexxRegularCallSignal Statement +HiLink rexxExceptionHandling Statement + +HiLink rexxLabel Function +HiLink rexxCharacter Character +HiLink rexxParenError rexxError +HiLink rexxInParen rexxError +HiLink rexxCommentError rexxError +HiLink rexxError Error +HiLink rexxKeyword Statement +HiLink rexxKeywordStatements Statement + +HiLink rexxFunction Function +HiLink rexxString String +HiLink rexxComment Comment +HiLink rexxTodo Todo +HiLink rexxSpecialVariable Special +HiLink rexxConditional rexxKeyword + +HiLink rexxOperator Operator +HiLink rexxMessageOperator rexxOperator +HiLink rexxLineComment Comment + +HiLink rexxLineContinue WildMenu + +HiLink rexxDirective rexxKeyword +HiLink rexxClassDirective Type +HiLink rexxMethodDirective rexxFunction +HiLink rexxAttributeDirective rexxFunction +HiLink rexxRequiresDirective Include +HiLink rexxRoutineDirective rexxFunction " rgf, 2012-09-09 - HiLink rexxOptionsDirective rexxFunction - HiLink rexxOptionsDirective2 rexxOptionsDirective - HiLink rexxOptionsDirective3 Normal " rexxOptionsDirective +HiLink rexxOptionsDirective rexxFunction +HiLink rexxOptionsDirective2 rexxOptionsDirective +HiLink rexxOptionsDirective3 Normal " rexxOptionsDirective - HiLink rexxConstantDirective rexxFunction +HiLink rexxConstantDirective rexxFunction - HiLink rexxConst Constant - HiLink rexxTypeSpecifier Type - HiLink rexxBuiltinClass rexxTypeSpecifier +HiLink rexxConst Constant +HiLink rexxTypeSpecifier Type +HiLink rexxBuiltinClass rexxTypeSpecifier - HiLink rexxEnvironmentSymbol rexxConst - HiLink rexxMessage rexxFunction +HiLink rexxEnvironmentSymbol rexxConst +HiLink rexxMessage rexxFunction - HiLink rexxParse rexxKeyword - HiLink rexxParse2 rexxParse +HiLink rexxParse rexxKeyword +HiLink rexxParse2 rexxParse - HiLink rexxGuard rexxKeyword - HiLink rexxTrace rexxKeyword +HiLink rexxGuard rexxKeyword +HiLink rexxTrace rexxKeyword - HiLink rexxRaise rexxKeyword - HiLink rexxRaise2 rexxRaise +HiLink rexxRaise rexxKeyword +HiLink rexxRaise2 rexxRaise - HiLink rexxForward rexxKeyword - HiLink rexxForward2 rexxForward +HiLink rexxForward rexxKeyword +HiLink rexxForward2 rexxForward - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "rexx" diff --git a/runtime/syntax/rib.vim b/runtime/syntax/rib.vim index 6b9f2b0bd..3d2235ffc 100644 --- a/runtime/syntax/rib.vim +++ b/runtime/syntax/rib.vim @@ -4,10 +4,8 @@ " Last Change: 2003 May 11 " -" Remove any old syntax stuff hanging around -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -46,26 +44,19 @@ syn match ribFloat display contained "[-]\=\.\d\+\(e[-+]\=\d\+\)\=\>" syn match ribFloat display contained "[-]\=\d\+e[-+]\d\+\>" syn case match -if version >= 508 || !exists("did_rib_syntax_inits") - if version < 508 - let did_rib_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink ribStructure Structure - HiLink ribCommand Statement +HiLink ribStructure Structure +HiLink ribCommand Statement - HiLink ribStructureComment SpecialComment - HiLink ribLineComment Comment +HiLink ribStructureComment SpecialComment +HiLink ribLineComment Comment - HiLink ribString String - HiLink ribNumber Number - HiLink ribFloat Float +HiLink ribString String +HiLink ribNumber Number +HiLink ribFloat Float - delcommand HiLink -end +delcommand HiLink let b:current_syntax = "rib" diff --git a/runtime/syntax/robots.vim b/runtime/syntax/robots.vim index 066628bb3..23be8d228 100644 --- a/runtime/syntax/robots.vim +++ b/runtime/syntax/robots.vim @@ -5,11 +5,8 @@ " URL: http://www.mggen.com/vim/syntax/robots.zip " Last change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -41,26 +38,19 @@ syn match robotsUrl "http[s]\=://\S*" syn match robotsMail "\S*@\S*" syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ -if version >= 508 || !exists("did_robos_syntax_inits") - if version < 508 - let did_robots_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink robotsComment Comment - HiLink robotsAgent Type - HiLink robotsDisallow Statement - HiLink robotsLine Special - HiLink robotsStar Operator - HiLink robotsDelimiter Delimiter - HiLink robotsUrl String - HiLink robotsMail String - HiLink robotsString String - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink robotsComment Comment +HiLink robotsAgent Type +HiLink robotsDisallow Statement +HiLink robotsLine Special +HiLink robotsStar Operator +HiLink robotsDelimiter Delimiter +HiLink robotsUrl String +HiLink robotsMail String +HiLink robotsString String + +delcommand HiLink let b:current_syntax = "robots" diff --git a/runtime/syntax/rpcgen.vim b/runtime/syntax/rpcgen.vim index 85036dc04..ee4cc3fda 100644 --- a/runtime/syntax/rpcgen.vim +++ b/runtime/syntax/rpcgen.vim @@ -10,11 +10,7 @@ if exists("b:current_syntax") endif " Read the C syntax to start with -if version < 600 - source <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone @@ -28,31 +24,23 @@ syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1 syn match rpcPassThru "^\s*%.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_rpcgen_syntax_inits") - if version < 508 - let did_rpcgen_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink rpcProgName rpcName - HiLink rpcProgram rpcStatement - HiLink rpcVersName rpcName - HiLink rpcVersion rpcStatement - - HiLink rpcDecl cType - HiLink rpcPassThru cComment - - HiLink rpcName Special - HiLink rpcProcNmbr Delimiter - HiLink rpcProgNmbrErr Error - HiLink rpcStatement Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink rpcProgName rpcName +HiLink rpcProgram rpcStatement +HiLink rpcVersName rpcName +HiLink rpcVersion rpcStatement + +HiLink rpcDecl cType +HiLink rpcPassThru cComment + +HiLink rpcName Special +HiLink rpcProcNmbr Delimiter +HiLink rpcProgNmbrErr Error +HiLink rpcStatement Statement + +delcommand HiLink let b:current_syntax = "rpcgen" diff --git a/runtime/syntax/rpl.vim b/runtime/syntax/rpl.vim index 6457803a0..d2bffbaaa 100644 --- a/runtime/syntax/rpl.vim +++ b/runtime/syntax/rpl.vim @@ -6,11 +6,8 @@ " URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim " Credits: Nothing -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -417,77 +414,69 @@ syntax region rplString start=+\(^\|\s\+\)"+ end=+"\ze\($\|\s\+\)+ contains=rplS syntax match rplTab "\t" transparent " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_rpl_syntax_inits") - if version < 508 - let did_rpl_syntax_inits = 1 - command -nargs=+ HiLink highlight link <args> - else - command -nargs=+ HiLink highlight default link <args> - endif - - " The default highlighting. - - HiLink rplControl Statement - HiLink rplStatement Statement - HiLink rplAlgConditional Conditional - HiLink rplConditional Repeat - HiLink rplConditionalError Error - HiLink rplRepeat Repeat - HiLink rplCycle Repeat - HiLink rplUntil Repeat - HiLink rplIntrinsic Special - HiLink rplStorage StorageClass - HiLink rplStorageExpr StorageClass - HiLink rplStorageError Error - HiLink rplReadWrite rplIntrinsic - - HiLink rplOperator Operator - - HiLink rplList Special - HiLink rplArray Special - HiLink rplConstant Identifier - HiLink rplExpr Type - - HiLink rplString String - HiLink rplStringGuilles String - HiLink rplStringAntislash String - - HiLink rplBinary Boolean - HiLink rplOctal Boolean - HiLink rplDecimal Boolean - HiLink rplHexadecimal Boolean - HiLink rplInteger Number - HiLink rplFloat Float - HiLink rplComplex Float - HiLink rplBoolean Identifier - - HiLink rplObsolete Todo - - HiLink rplPreCondit PreCondit - HiLink rplInclude Include - HiLink rplIncluded rplString - HiLink rplInclude Include - HiLink rplExecPath Include - HiLink rplPreProc PreProc - HiLink rplComment Comment - HiLink rplCommentLine Comment - HiLink rplCommentString Comment - HiLink rplSubDelimitor rplStorage - HiLink rplCommentError Error - HiLink rplParenError Error - HiLink rplSubError Error - HiLink rplArrayError Error - HiLink rplListError Error - HiLink rplTab Error - HiLink rplBinaryError Error - HiLink rplOctalError Error - HiLink rplDecimalError Error - HiLink rplHexadecimalError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink highlight default link <args> + +" The default highlighting. + +HiLink rplControl Statement +HiLink rplStatement Statement +HiLink rplAlgConditional Conditional +HiLink rplConditional Repeat +HiLink rplConditionalError Error +HiLink rplRepeat Repeat +HiLink rplCycle Repeat +HiLink rplUntil Repeat +HiLink rplIntrinsic Special +HiLink rplStorage StorageClass +HiLink rplStorageExpr StorageClass +HiLink rplStorageError Error +HiLink rplReadWrite rplIntrinsic + +HiLink rplOperator Operator + +HiLink rplList Special +HiLink rplArray Special +HiLink rplConstant Identifier +HiLink rplExpr Type + +HiLink rplString String +HiLink rplStringGuilles String +HiLink rplStringAntislash String + +HiLink rplBinary Boolean +HiLink rplOctal Boolean +HiLink rplDecimal Boolean +HiLink rplHexadecimal Boolean +HiLink rplInteger Number +HiLink rplFloat Float +HiLink rplComplex Float +HiLink rplBoolean Identifier + +HiLink rplObsolete Todo + +HiLink rplPreCondit PreCondit +HiLink rplInclude Include +HiLink rplIncluded rplString +HiLink rplInclude Include +HiLink rplExecPath Include +HiLink rplPreProc PreProc +HiLink rplComment Comment +HiLink rplCommentLine Comment +HiLink rplCommentString Comment +HiLink rplSubDelimitor rplStorage +HiLink rplCommentError Error +HiLink rplParenError Error +HiLink rplSubError Error +HiLink rplArrayError Error +HiLink rplListError Error +HiLink rplTab Error +HiLink rplBinaryError Error +HiLink rplOctalError Error +HiLink rplDecimalError Error +HiLink rplHexadecimalError Error + +delcommand HiLink let b:current_syntax = "rpl" diff --git a/runtime/syntax/rtf.vim b/runtime/syntax/rtf.vim index 8f5ea71a3..0c63e8d52 100644 --- a/runtime/syntax/rtf.vim +++ b/runtime/syntax/rtf.vim @@ -13,11 +13,8 @@ " TODO: render underline, italic, bold -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -52,35 +49,27 @@ syn match rtfBlue "\\blue[0-9][0-9]*" syn match rtfFootNote "[#$K+]{\\footnote.*}" contains=rtfControlWord,rtfNewControlWord " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_rtf_syntax_inits") - if version < 508 - let did_rtf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - HiLink rtfControlWord Statement - HiLink rtfNewControlWord Special - HiLink rtfControlSymbol Constant - HiLink rtfCharacter Character - HiLink rtfUnicodeCharacter SpecialChar - HiLink rtfFootNote Comment - - " Define colors for the syntax file - hi rtfRed term=underline cterm=underline ctermfg=DarkRed gui=underline guifg=DarkRed - hi rtfGreen term=underline cterm=underline ctermfg=DarkGreen gui=underline guifg=DarkGreen - hi rtfBlue term=underline cterm=underline ctermfg=DarkBlue gui=underline guifg=DarkBlue - - HiLink rtfRed rtfRed - HiLink rtfGreen rtfGreen - HiLink rtfBlue rtfBlue - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + + +HiLink rtfControlWord Statement +HiLink rtfNewControlWord Special +HiLink rtfControlSymbol Constant +HiLink rtfCharacter Character +HiLink rtfUnicodeCharacter SpecialChar +HiLink rtfFootNote Comment + +" Define colors for the syntax file +hi rtfRed term=underline cterm=underline ctermfg=DarkRed gui=underline guifg=DarkRed +hi rtfGreen term=underline cterm=underline ctermfg=DarkGreen gui=underline guifg=DarkGreen +hi rtfBlue term=underline cterm=underline ctermfg=DarkBlue gui=underline guifg=DarkBlue + +HiLink rtfRed rtfRed +HiLink rtfGreen rtfGreen +HiLink rtfBlue rtfBlue + +delcommand HiLink let b:current_syntax = "rtf" diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim index 28f553dec..ca7f51b1e 100644 --- a/runtime/syntax/ruby.vim +++ b/runtime/syntax/ruby.vim @@ -9,16 +9,45 @@ " Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) " ---------------------------------------------------------------------------- +" Prelude {{{1 if exists("b:current_syntax") finish endif +" this file uses line continuations +let s:cpo_sav = &cpo +set cpo&vim + +" Folding Config {{{1 if has("folding") && exists("ruby_fold") setlocal foldmethod=syntax endif +let s:foldable_groups = split( + \ get( + \ b:, + \ 'ruby_foldable_groups', + \ get(g:, 'ruby_foldable_groups', 'ALL') + \ ) + \ ) + +function! s:foldable(...) abort + if index(s:foldable_groups, 'ALL') > -1 + return 1 + endif + + for l:i in a:000 + if index(s:foldable_groups, l:i) > -1 + return 1 + endif + endfor + + return 0 +endfunction " }}} + syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo +" Whitespace Errors {{{1 if exists("ruby_space_errors") if !exists("ruby_no_trail_space_error") syn match rubySpaceError display excludenl "\s\+$" @@ -28,14 +57,14 @@ if exists("ruby_space_errors") endif endif -" Operators +" Operators {{{1 if exists("ruby_operators") - syn match rubyOperator "[~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::" + syn match rubyOperator "[~!^|*/%+-]\|&\.\@!\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@1<!>\|\*\*\|\.\.\.\|\.\.\|::" syn match rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=" - syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop + syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop endif -" Expression Substitution and Backslash Notation +" Expression Substitution and Backslash Notation {{{1 syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display syn match rubyQuoteEscape "\\[\\']" contained display @@ -45,18 +74,19 @@ syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained con syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained -syn region rubyNoInterpolation start="\\#{" end="}" contained +syn region rubyNoInterpolation start="\\#{" end="}" contained syn match rubyNoInterpolation "\\#{" display contained syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained syn match rubyNoInterpolation "\\#\$\W" display contained -syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE +syn match rubyDelimiterEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained +" Regular Expression Metacharacters {{{1 " These are mostly Oniguruma ready syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial @@ -79,36 +109,40 @@ syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolati syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment -" Numbers and ASCII Codes -syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display -syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display -syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display +" Numbers and ASCII Codes {{{1 +syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)r\=i\=\>" display -" Identifiers +" Identifiers {{{1 syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent -syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!" +syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display -syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" -syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" -syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" -syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" -syn match rubySymbol "[]})\"':]\@<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\=" -syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1 -syn match rubySymbol "[]})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1 -syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1 -syn match rubySymbol "[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="hs=s+1,he=e-1 -syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold -syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold +syn match rubySymbol "[]})\"':]\@1<!:\%(\^\|\~@\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!@\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" +syn match rubySymbol "[]})\"':]\@1<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" +syn match rubySymbol "[]})\"':]\@1<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" +syn match rubySymbol "[]})\"':]\@1<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\=" + +if s:foldable(':') + syn region rubySymbol start="[]})\"':]\@1<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold + syn region rubySymbol start="[]})\"':]\@1<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold +else + syn region rubySymbol start="[]})\"':]\@1<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape + syn region rubySymbol start="[]})\"':]\@1<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial +endif + +syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)*\s*(\@=" syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained -syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter +syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" oneline display contains=rubyBlockParameter syn match rubyInvalidVariable "$[^ A-Za-z_-]" syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# @@ -117,93 +151,187 @@ syn match rubyPredefinedVariable "$_\>" display syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!" -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!" -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!" -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" - -" Normal Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold - -" Generalized Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold - -" Normal String and Shell Command Output -syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold -syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold -syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold - -" Generalized Single Quoted String, Symbol and Array of Strings -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1" skip="\\\\\|\\\z1" fold -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape - -" Generalized Double Quoted String and Array of Strings and Shell Command Output +syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV\|DATA\|FALSE\|NIL\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" + +" Normal Regular Expression {{{1 +if s:foldable('/') + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold +else + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial +endif + +" Generalized Regular Expression {{{1 +if s:foldable('%') + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold +else + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial +endif + +" Normal String {{{1 +let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : '' +exe 'syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" ' . + \ (s:foldable('%') ? 'fold' : '') . ' contains=@rubyStringSpecial' . s:spell_cluster +exe 'syn region rubyString matchgroup=rubyStringDelimiter start="''" end="''" skip="\\\\\|\\''" ' . + \ (s:foldable('%') ? 'fold' : '') . ' contains=rubyQuoteEscape' . s:spell_cluster + +" Shell Command Output {{{1 +if s:foldable('%') + syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold +else + syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial +endif + +" Generalized Single Quoted String, Symbol and Array of Strings {{{1 +if s:foldable('%') + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" fold +else + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" +endif + +" Generalized Double Quoted String and Array of Strings and Shell Command Output {{{1 " Note: %= is not matched here as the beginning of a double quoted string -syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@rubyStringSpecial fold - -" Here Document -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop - -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend - -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +if s:foldable('%') + syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +else + syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial +endif + +" Array of Symbols {{{1 +if s:foldable('%') + " Array of Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape + + " Array of interpolated Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape fold +else + " Array of Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape + + " Array of interpolated Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape +endif + +" Here Document {{{1 +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop + +if s:foldable('<<') + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend + + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +else + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend + + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend +endif +" eRuby Config {{{1 if exists('main_syntax') && main_syntax == 'eruby' let b:ruby_no_expensive = 1 end +" Module, Class, Method and Alias Declarations {{{1 syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable nextgroup=rubyAliasDeclaration2 skipwhite syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration -syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 -syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration +syn match rubyFunction "\%(\s\|^\)\@1<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 +syn match rubyFunction "\%([[:space:].]\|^\)\@2<=\%(\[\]=\=\|\*\*\|[-+!~]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter -" Keywords +" Keywords {{{1 " Note: the following keywords have already been defined: " begin case class def do end for if module unless until while syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" syn match rubyOperator "\<defined?" display syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!" syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" -syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise +syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__dir__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" -" Expensive Mode - match 'end' with the appropriate opening keyword for syntax -" based folding and special highlighting of module/class/method definitions +" Expensive Mode {{{1 +" Match 'end' with the appropriate opening keyword for syntax based folding +" and special highlighting of module/class/method definitions if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl @@ -211,23 +339,66 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl - syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold + if s:foldable('def') + syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('class') + syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('module') + syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop + endif " modifiers - syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display - syn match rubyRepeatModifier "\<\%(while\|until\)\>" display + syn match rubyLineContinuation "\\$" nextgroup=rubyConditionalModifier,rubyRepeatModifier skipwhite skipnl + syn match rubyConditionalModifier "\<\%(if\|unless\)\>" + syn match rubyRepeatModifier "\<\%(while\|until\)\>" + + if s:foldable('do') + syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop + endif - syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold " curly bracket block or hash literal - syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold - syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold + if s:foldable('{') + syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('[') + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop + endif " statements without 'do' - syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold + if s:foldable('begin') + syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('case') + syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('if') + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop + endif syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression @@ -237,7 +408,12 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") " statements with optional 'do' syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop - syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold + + if s:foldable('for') + syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold + else + syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine + endif if !exists("ruby_minlines") let ruby_minlines = 500 @@ -252,7 +428,7 @@ else syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" endif -" Special Methods +" Special Methods {{{1 if !exists("ruby_no_special_methods") syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function " attr is a common variable name @@ -263,40 +439,40 @@ if !exists("ruby_no_special_methods") syn keyword rubyException raise fail catch throw " false positive with 'include?' syn match rubyInclude "\<include\>[?!]\@!" - syn keyword rubyInclude autoload extend load prepend require require_relative + syn keyword rubyInclude autoload extend load prepend refine require require_relative using syn keyword rubyKeyword callcc caller lambda proc endif -" Comments and Documentation +" Comments and Documentation {{{1 syn match rubySharpBang "\%^#!.*" display -syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX todo contained +syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell -if !exists("ruby_no_comment_fold") - syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend +if !exists("ruby_no_comment_fold") && s:foldable('#') + syn region rubyMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\%(\s.*\)\=$" contains=rubySpaceError,rubyTodo,@Spell fold else syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell endif +" Keyword Nobbling {{{1 " Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|and\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\|module\|next\|nil\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(not\|or\|redo\|rescue\|retry\|return\|self\|super\|then\|true\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|BEGIN\|END\|__FILE__\|__LINE__\)\>" transparent contains=NONE - -syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE -syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE - -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|attr\|attr_accessor\|attr_reader\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(attr_writer\|autoload\|callcc\|catch\|caller\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(eval\|class_eval\|instance_eval\|module_eval\|exit\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fail\|fork\|include\|lambda\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(load\|loop\|prepend\|private\|proc\|protected\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|require_relative\|raise\|throw\|trap\)\>" transparent contains=NONE - -" __END__ Directive -syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold +syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\<\%(BEGIN\|END\)\>\)" transparent contains=NONE +syn match rubyKeywordAsMethod "\(defined?\|exit!\)\@!\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE + +" More Symbols {{{1 +syn match rubySymbol "\%([{(,]\_s*\)\zs\l\w*[!?]\=::\@!"he=e-1 +syn match rubySymbol "[]})\"':]\@1<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="he=e-1 +syn match rubySymbol "\%([{(,]\_s*\)\zs[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1 +syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="hs=s+1,he=e-1 + +" __END__ Directive {{{1 +if s:foldable('__END__') + syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold +else + syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" +endif +" Default Highlighting {{{1 hi def link rubyClass rubyDefine hi def link rubyModule rubyDefine hi def link rubyMethodExceptional rubyDefine @@ -336,6 +512,7 @@ hi def link rubyAccess Statement hi def link rubyAttribute Statement hi def link rubyEval Statement hi def link rubyPseudoVariable Constant +hi def link rubyCapitalizedMethod rubyLocalVariableOrMethod hi def link rubyComment Comment hi def link rubyData Comment @@ -349,7 +526,7 @@ hi def link rubyInterpolationDelimiter Delimiter hi def link rubyNoInterpolation rubyString hi def link rubySharpBang PreProc hi def link rubyRegexpDelimiter rubyStringDelimiter -hi def link rubySymbolDelimiter rubyStringDelimiter +hi def link rubySymbolDelimiter rubySymbol hi def link rubyStringDelimiter Delimiter hi def link rubyHeredoc rubyString hi def link rubyString String @@ -366,6 +543,10 @@ hi def link rubyInvalidVariable Error hi def link rubyError Error hi def link rubySpaceError rubyError +" Postscript {{{1 let b:current_syntax = "ruby" -" vim: nowrap sw=2 sts=2 ts=8 noet: +let &cpo = s:cpo_sav +unlet! s:cpo_sav + +" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: diff --git a/runtime/syntax/samba.vim b/runtime/syntax/samba.vim index dae4040ec..734f8b289 100644 --- a/runtime/syntax/samba.vim +++ b/runtime/syntax/samba.vim @@ -8,11 +8,8 @@ " " Don't forget to run your config file through testparm(1)! -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -107,24 +104,16 @@ syn keyword sambaKeyword contained shutdown signing special spnego syn keyword sambaKeyword contained store unknown unwriteable " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_samba_syn_inits") - if version < 508 - let did_samba_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink sambaParameter Normal - HiLink sambaKeyword Type - HiLink sambaSection Statement - HiLink sambaMacro PreProc - HiLink sambaComment Comment - HiLink sambaContinue Operator - HiLink sambaBoolean Constant - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink sambaParameter Normal +HiLink sambaKeyword Type +HiLink sambaSection Statement +HiLink sambaMacro PreProc +HiLink sambaComment Comment +HiLink sambaContinue Operator +HiLink sambaBoolean Constant +delcommand HiLink let b:current_syntax = "samba" diff --git a/runtime/syntax/sas.vim b/runtime/syntax/sas.vim index dc70e1fd9..a99501103 100644 --- a/runtime/syntax/sas.vim +++ b/runtime/syntax/sas.vim @@ -12,11 +12,8 @@ " Attempted to match SAS default syntax colors; " Changed syncing so it doesn't lose colors on large blocks; " Much thanks to Bob Heckel for knowledgeable tweaking. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -52,11 +49,7 @@ syn region sasComment start="^\s*\*" end=";" contains=sasTodo " Thanks to ronald höllwarth for this fix to an intra-versioning " problem with this little feature -if version < 600 - syn region sasMacroVar start="\&" skip="[_&]" end="\W"he=e-1 -else " for the older Vim's just do it their way ... - syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1 -endif +syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1 " I dont think specific PROCs need to be listed if use this line (Bob Heckel). @@ -218,62 +211,54 @@ syn keyword sasUnderscore _ALL_ _AUTOMATIC_ _CHARACTER_ _INFILE_ _N_ _NAME_ _NUL " End of SAS Functions " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet - -if version >= 508 || !exists("did_sas_syntax_inits") - if version < 508 - let did_sas_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Default sas enhanced editor color syntax - hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White - hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow - hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White - hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White - hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White - hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White - hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White - hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White - hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White - hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White - hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White - hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White - hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White - hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White - hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White +" Only when an item doesn't have highlighting yet + +command -nargs=+ HiLink hi def link <args> + +" Default sas enhanced editor color syntax +hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White +hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow +hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White +hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White +hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White +hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White +hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White +hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White +hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White +hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White +hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White +hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White +hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White +hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White +hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White " Colors that closely match SAS log colors for default color scheme - hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White - hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White - hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White - - - " Special hilighting for the SAS proc section - - HiLink sasComment sComment - HiLink sasConditional sKeyword - HiLink sasStep sSection - HiLink sasFunction sKeyword - HiLink sasMacro mKeyword - HiLink sasMacroVar NonText - HiLink sasNumber sNumber - HiLink sasStatement sKeyword - HiLink sasString sString - HiLink sasProc sProc - " (Bob Heckel) - HiLink sasTodo Todo - HiLink sasErrMsg lError - HiLink sasWarnMsg lWarning - HiLink sasLogMsg lNote - HiLink sasCards sCard - " (Bob Heckel) - HiLink sasUnderscore PreProc - delcommand HiLink -endif +hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White +hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White +hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White + + +" Special hilighting for the SAS proc section + +HiLink sasComment sComment +HiLink sasConditional sKeyword +HiLink sasStep sSection +HiLink sasFunction sKeyword +HiLink sasMacro mKeyword +HiLink sasMacroVar NonText +HiLink sasNumber sNumber +HiLink sasStatement sKeyword +HiLink sasString sString +HiLink sasProc sProc +" (Bob Heckel) +HiLink sasTodo Todo +HiLink sasErrMsg lError +HiLink sasWarnMsg lWarning +HiLink sasLogMsg lNote +HiLink sasCards sCard +" (Bob Heckel) +HiLink sasUnderscore PreProc +delcommand HiLink " Syncronize from beginning to keep large blocks from losing " syntax coloring while moving through code. diff --git a/runtime/syntax/sass.vim b/runtime/syntax/sass.vim index 2ea072269..d075c8736 100644 --- a/runtime/syntax/sass.vim +++ b/runtime/syntax/sass.vim @@ -2,7 +2,7 @@ " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.sass -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -13,7 +13,7 @@ runtime! syntax/css.vim syn case ignore syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp -syn cluster sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp +syn cluster sassCssAttributes contains=css.*Attr,sassEndOfLineComment,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP @@ -58,6 +58,9 @@ syn match sassAmpersand "&" " TODO: Attribute namespaces " TODO: Arithmetic (including strings and concatenation) +syn region sassMediaQuery matchgroup=sassMedia start="@media" end="[{};]\@=\|$" contains=sassMediaOperators +syn keyword sassMediaOperators and not only contained +syn region sassCharset start="@charset" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassDebugLine end=";\|$" matchgroup=sassDebug start="@debug\>" contains=@sassCssAttributes,sassVariable,sassFunction syn region sassWarnLine end=";\|$" matchgroup=sassWarn start="@warn\>" contains=@sassCssAttributes,sassVariable,sassFunction @@ -67,7 +70,9 @@ syn keyword sassFor from to through in contained syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell +syn match sassEndOfLineComment "//.*" contains=sassComment,sassTodo,@Spell +hi def link sassEndOfLineComment sassComment hi def link sassCssComment sassComment hi def link sassComment Comment hi def link sassDefault cssImportant @@ -80,6 +85,9 @@ hi def link sassExtend PreProc hi def link sassFunctionDecl PreProc hi def link sassReturn PreProc hi def link sassTodo Todo +hi def link sassCharset PreProc +hi def link sassMedia PreProc +hi def link sassMediaOperators PreProc hi def link sassInclude Include hi def link sassDebug sassControl hi def link sassWarn sassControl diff --git a/runtime/syntax/sather.vim b/runtime/syntax/sather.vim index 759591bf8..1b84ed8f3 100644 --- a/runtime/syntax/sather.vim +++ b/runtime/syntax/sather.vim @@ -9,11 +9,8 @@ " Homepage: http://www.icsi.berkeley.edu/~sather " Sather files use .sa as suffix -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -61,44 +58,36 @@ syn match satherComment "--.*" contains=satherComment2String,satherCharacter syn sync ccomment satherComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sather_syn_inits") - if version < 508 - let did_sather_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink satherBranch satherStatement - HiLink satherLabel satherStatement - HiLink satherConditional satherStatement - HiLink satherSynchronize satherStatement - HiLink satherRepeat satherStatement - HiLink satherExceptions satherStatement - HiLink satherStorageClass satherDeclarative - HiLink satherMethodDecl satherDeclarative - HiLink satherClassDecl satherDeclarative - HiLink satherScopeDecl satherDeclarative - HiLink satherBoolValue satherValue - HiLink satherSpecial satherValue - HiLink satherString satherValue - HiLink satherCharacter satherValue - HiLink satherSpecialCharacter satherValue - HiLink satherNumber satherValue - HiLink satherStatement Statement - HiLink satherOperator Statement - HiLink satherComment Comment - HiLink satherType Type - HiLink satherValue String - HiLink satherString String - HiLink satherSpecial String - HiLink satherCharacter String - HiLink satherDeclarative Type - HiLink satherExternal PreCondit - delcommand HiLink -endif +HiLink satherBranch satherStatement +HiLink satherLabel satherStatement +HiLink satherConditional satherStatement +HiLink satherSynchronize satherStatement +HiLink satherRepeat satherStatement +HiLink satherExceptions satherStatement +HiLink satherStorageClass satherDeclarative +HiLink satherMethodDecl satherDeclarative +HiLink satherClassDecl satherDeclarative +HiLink satherScopeDecl satherDeclarative +HiLink satherBoolValue satherValue +HiLink satherSpecial satherValue +HiLink satherString satherValue +HiLink satherCharacter satherValue +HiLink satherSpecialCharacter satherValue +HiLink satherNumber satherValue +HiLink satherStatement Statement +HiLink satherOperator Statement +HiLink satherComment Comment +HiLink satherType Type +HiLink satherValue String +HiLink satherString String +HiLink satherSpecial String +HiLink satherCharacter String +HiLink satherDeclarative Type +HiLink satherExternal PreCondit +delcommand HiLink let b:current_syntax = "sather" diff --git a/runtime/syntax/scala.vim b/runtime/syntax/scala.vim index b04af3be5..7779c4399 100644 --- a/runtime/syntax/scala.vim +++ b/runtime/syntax/scala.vim @@ -7,9 +7,8 @@ " ---------------------------------------------------------------------------- if !exists('main_syntax') - if version < 600 - syntax clear - elseif exists("b:current_syntax") + " quit when a syntax file was already loaded + if exists("b:current_syntax") finish endif let main_syntax = 'scala' diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim index c59e09cd1..ac50ead6c 100644 --- a/runtime/syntax/scheme.vim +++ b/runtime/syntax/scheme.vim @@ -14,11 +14,8 @@ " Initializing: -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -64,11 +61,7 @@ syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=AL " R5RS Scheme Functions and Syntax: -if version < 600 - set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -else - setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -endif +setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ syn keyword schemeSyntax lambda and or if cond case define let let* letrec syn keyword schemeSyntax begin do delay set! else => @@ -306,38 +299,30 @@ syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_scheme_syntax_inits") - if version < 508 - let did_scheme_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink schemeSyntax Statement - HiLink schemeFunc Function +HiLink schemeSyntax Statement +HiLink schemeFunc Function - HiLink schemeString String - HiLink schemeCharacter Character - HiLink schemeNumber Number - HiLink schemeBoolean Boolean +HiLink schemeString String +HiLink schemeCharacter Character +HiLink schemeNumber Number +HiLink schemeBoolean Boolean - HiLink schemeDelimiter Delimiter - HiLink schemeConstant Constant +HiLink schemeDelimiter Delimiter +HiLink schemeConstant Constant - HiLink schemeComment Comment - HiLink schemeMultilineComment Comment - HiLink schemeError Error +HiLink schemeComment Comment +HiLink schemeMultilineComment Comment +HiLink schemeError Error - HiLink schemeExtSyntax Type - HiLink schemeExtFunc PreProc +HiLink schemeExtSyntax Type +HiLink schemeExtFunc PreProc - HiLink schemeLang PreProc +HiLink schemeLang PreProc - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "scheme" diff --git a/runtime/syntax/scilab.vim b/runtime/syntax/scilab.vim index 1bfc00367..bee4007f5 100644 --- a/runtime/syntax/scilab.vim +++ b/runtime/syntax/scilab.vim @@ -9,11 +9,8 @@ " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -66,49 +63,41 @@ syn match scilabOverload "%[A-Za-z0-9?!_#$]\+_[A-Za-z0-9?!_#$]\+" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_scilab_syntax_inits") - if version < 508 - let did_scilab_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink scilabStatement Statement - HiLink scilabFunction Keyword - HiLink scilabPredicate Keyword - HiLink scilabKeyword Keyword - HiLink scilabDebug Debug - HiLink scilabRepeat Repeat - HiLink scilabConditional Conditional - HiLink scilabMultiplex Conditional - - HiLink scilabConstant Constant - HiLink scilabBoolean Boolean - - HiLink scilabDelimiter Delimiter - HiLink scilabMlistAccess Delimiter - HiLink scilabComparison Operator - HiLink scilabLogical Operator - HiLink scilabAssignment Operator - HiLink scilabArithmetic Operator - HiLink scilabRange Operator - HiLink scilabLineContinuation Underlined - HiLink scilabTransposition Operator - - HiLink scilabTodo Todo - HiLink scilabComment Comment - - HiLink scilabNumber Number - HiLink scilabString String - - HiLink scilabIdentifier Identifier - HiLink scilabOverload Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink scilabStatement Statement +HiLink scilabFunction Keyword +HiLink scilabPredicate Keyword +HiLink scilabKeyword Keyword +HiLink scilabDebug Debug +HiLink scilabRepeat Repeat +HiLink scilabConditional Conditional +HiLink scilabMultiplex Conditional + +HiLink scilabConstant Constant +HiLink scilabBoolean Boolean + +HiLink scilabDelimiter Delimiter +HiLink scilabMlistAccess Delimiter +HiLink scilabComparison Operator +HiLink scilabLogical Operator +HiLink scilabAssignment Operator +HiLink scilabArithmetic Operator +HiLink scilabRange Operator +HiLink scilabLineContinuation Underlined +HiLink scilabTransposition Operator + +HiLink scilabTodo Todo +HiLink scilabComment Comment + +HiLink scilabNumber Number +HiLink scilabString String + +HiLink scilabIdentifier Identifier +HiLink scilabOverload Special + +delcommand HiLink let b:current_syntax = "scilab" diff --git a/runtime/syntax/sd.vim b/runtime/syntax/sd.vim index 7fa0e0449..015c1f089 100644 --- a/runtime/syntax/sd.vim +++ b/runtime/syntax/sd.vim @@ -5,9 +5,8 @@ " URL: http://netstudent.polito.it/vim_syntax/ " Last Change: 2012 Feb 03 by Thilo Six -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -51,29 +50,22 @@ syn keyword sdSpecial TRUE FALSE NULL syn keyword sdDelimiter STREAM STREAM_END syn match sdError /^search .\{257,}/ -if version >= 508 || !exists("did_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif +command! -nargs=+ HiLink hi def link <args> - HiLink sdIP Number - HiLink sdHostname Type - HiLink sdEncoding Identifier - HiLink sdCoding Identifier - HiLink sdSource Identifier - HiLink sdComment Comment - HiLink sdIPError Error - HiLink sdError Error - HiLink sdStatement Statement - HiLink sdIPSpecial Special - HiLink sdSpecial Special - HiLink sdDelimiter Delimiter +HiLink sdIP Number +HiLink sdHostname Type +HiLink sdEncoding Identifier +HiLink sdCoding Identifier +HiLink sdSource Identifier +HiLink sdComment Comment +HiLink sdIPError Error +HiLink sdError Error +HiLink sdStatement Statement +HiLink sdIPSpecial Special +HiLink sdSpecial Special +HiLink sdDelimiter Delimiter - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "sd" diff --git a/runtime/syntax/sdl.vim b/runtime/syntax/sdl.vim index b524b7226..51086dad1 100644 --- a/runtime/syntax/sdl.vim +++ b/runtime/syntax/sdl.vim @@ -3,11 +3,8 @@ " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 2 May 2001 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -129,38 +126,29 @@ syn keyword sdlType STRING OBJECT IDENTIFIER NULL syn sync ccomment sdlComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sdl_syn_inits") - if version < 508 - let did_sdl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - command -nargs=+ Hi hi <args> - else - command -nargs=+ HiLink hi def link <args> - command -nargs=+ Hi hi def <args> - endif - - HiLink sdlException Label - HiLink sdlConditional sdlStatement - HiLink sdlVirtual sdlStatement - HiLink sdlExported sdlFlag - HiLink sdlCommentError sdlError - HiLink sdlOperator Operator - HiLink sdlStructure sdlType - Hi sdlStatement term=bold ctermfg=4 guifg=Blue - Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic - Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline - Hi sdlInput term=bold guifg=Red - HiLink sdlType Type - HiLink sdlString String - HiLink sdlComment Comment - HiLink sdlSpecial Special - HiLink sdlError Error - - delcommand HiLink - delcommand Hi -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +command -nargs=+ Hi hi def <args> + +HiLink sdlException Label +HiLink sdlConditional sdlStatement +HiLink sdlVirtual sdlStatement +HiLink sdlExported sdlFlag +HiLink sdlCommentError sdlError +HiLink sdlOperator Operator +HiLink sdlStructure sdlType +Hi sdlStatement term=bold ctermfg=4 guifg=Blue +Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic +Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline +Hi sdlInput term=bold guifg=Red +HiLink sdlType Type +HiLink sdlString String +HiLink sdlComment Comment +HiLink sdlSpecial Special +HiLink sdlError Error + +delcommand HiLink +delcommand Hi let b:current_syntax = "sdl" diff --git a/runtime/syntax/sed.vim b/runtime/syntax/sed.vim index 42ad6d8e6..13e0165df 100644 --- a/runtime/syntax/sed.vim +++ b/runtime/syntax/sed.vim @@ -4,11 +4,8 @@ " URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim " Last Change: 2010 May 29 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -75,45 +72,38 @@ syn region sedReplacement64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\ " (y) does not allow any flags. To save memory, I ignore this problem. syn match sedST "[sy]" nextgroup=sedRegexp\d\+ -if version >= 508 || !exists("did_sed_syntax_inits") - if version < 508 - let did_sed_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink sedAddress Macro - HiLink sedACI NONE - HiLink sedBranch Label - HiLink sedComment Comment - HiLink sedDelete Function - HiLink sedError Error - HiLink sedFlag Type - HiLink sedFlagwrite Constant - HiLink sedFunction Function - HiLink sedLabel Label - HiLink sedLineCont Special - HiLink sedPutHoldspc Function - HiLink sedReplaceMeta Special - HiLink sedRegexpMeta Special - HiLink sedRW Constant - HiLink sedSemicolon Special - HiLink sedST Function - HiLink sedSpecial Special - HiLink sedWhitespace NONE - if exists("highlight_sedtabs") - HiLink sedTab Todo - endif - let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64 - while __sed_i <= __sed_last - exe "HiLink sedRegexp".__sed_i "Macro" - exe "HiLink sedReplacement".__sed_i "NONE" - let __sed_i = __sed_i + 1 - endwhile - - delcommand HiLink +HiLink sedAddress Macro +HiLink sedACI NONE +HiLink sedBranch Label +HiLink sedComment Comment +HiLink sedDelete Function +HiLink sedError Error +HiLink sedFlag Type +HiLink sedFlagwrite Constant +HiLink sedFunction Function +HiLink sedLabel Label +HiLink sedLineCont Special +HiLink sedPutHoldspc Function +HiLink sedReplaceMeta Special +HiLink sedRegexpMeta Special +HiLink sedRW Constant +HiLink sedSemicolon Special +HiLink sedST Function +HiLink sedSpecial Special +HiLink sedWhitespace NONE +if exists("highlight_sedtabs") +HiLink sedTab Todo endif +let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64 +while __sed_i <= __sed_last +exe "HiLink sedRegexp".__sed_i "Macro" +exe "HiLink sedReplacement".__sed_i "NONE" +let __sed_i = __sed_i + 1 +endwhile + +delcommand HiLink unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters diff --git a/runtime/syntax/sendpr.vim b/runtime/syntax/sendpr.vim index 6cf9395fe..2e0780204 100644 --- a/runtime/syntax/sendpr.vim +++ b/runtime/syntax/sendpr.vim @@ -5,11 +5,8 @@ " " http://raisdorf.net/files/misc/send-pr.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/sgml.vim b/runtime/syntax/sgml.vim index c0c3643dd..d60040c5d 100644 --- a/runtime/syntax/sgml.vim +++ b/runtime/syntax/sgml.vim @@ -5,11 +5,8 @@ " Filenames: *.sgml,*.sgm " $Id: sgml.vim,v 1.1 2004/06/13 17:52:57 vimboss Exp $ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/sgmldecl.vim b/runtime/syntax/sgmldecl.vim index 13551b21c..1bf1b49e3 100644 --- a/runtime/syntax/sgmldecl.vim +++ b/runtime/syntax/sgmldecl.vim @@ -5,11 +5,8 @@ " You can modify and maintain this file, in other case send comments " the maintainer email address. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo @@ -52,30 +49,22 @@ syn sync lines=250 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sgmldecl_syntax_init") - if version < 508 - let did_sgmldecl_syntax_init = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sgmldeclDeclKeys Keyword - HiLink sgmldeclTypes Type - HiLink sgmldeclConst Constant - HiLink sgmldeclNConst Constant - HiLink sgmldeclString String - HiLink sgmldeclDeclBlock Normal - HiLink sgmldeclBool Boolean - HiLink sgmldeclSpecial Special - HiLink sgmldeclComment Comment - HiLink sgmldeclStatem Statement - HiLink sgmldeclVariables Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink sgmldeclDeclKeys Keyword +HiLink sgmldeclTypes Type +HiLink sgmldeclConst Constant +HiLink sgmldeclNConst Constant +HiLink sgmldeclString String +HiLink sgmldeclDeclBlock Normal +HiLink sgmldeclBool Boolean +HiLink sgmldeclSpecial Special +HiLink sgmldeclComment Comment +HiLink sgmldeclStatem Statement +HiLink sgmldeclVariables Type + +delcommand HiLink let b:current_syntax = "sgmldecl" diff --git a/runtime/syntax/sgmllnx.vim b/runtime/syntax/sgmllnx.vim index 28224f601..7fd633d40 100644 --- a/runtime/syntax/sgmllnx.vim +++ b/runtime/syntax/sgmllnx.vim @@ -3,11 +3,8 @@ " Maintainer: SungHyun Nam <goweol@gmail.com> " Last Change: 2013 May 13 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -36,31 +33,23 @@ syn region sgmllnxComment start=+<!--+ end=+-->+ syn region sgmllnxDocType start=+<!doctype+ end=+>+ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sgmllnx_syn_inits") - if version < 508 - let did_sgmllnx_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sgmllnxTag2 Function - HiLink sgmllnxTagN2 Function - HiLink sgmllnxTag Special - HiLink sgmllnxEndTag Special - HiLink sgmllnxParen Special - HiLink sgmllnxEntity Type - HiLink sgmllnxDocEnt Type - HiLink sgmllnxTagName Statement - HiLink sgmllnxComment Comment - HiLink sgmllnxSpecial Special - HiLink sgmllnxDocType PreProc - HiLink sgmllnxTagError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink sgmllnxTag2 Function +HiLink sgmllnxTagN2 Function +HiLink sgmllnxTag Special +HiLink sgmllnxEndTag Special +HiLink sgmllnxParen Special +HiLink sgmllnxEntity Type +HiLink sgmllnxDocEnt Type +HiLink sgmllnxTagName Statement +HiLink sgmllnxComment Comment +HiLink sgmllnxSpecial Special +HiLink sgmllnxDocType PreProc +HiLink sgmllnxTagError Error + +delcommand HiLink let b:current_syntax = "sgmllnx" diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index ef90ebea2..31c7b0534 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -8,11 +8,8 @@ " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) -" For version 5.x: Clear all syntax items {{{1 -" For version 6.x: Quit when a syntax file was already loaded -if v:version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/sicad.vim b/runtime/syntax/sicad.vim index 7e32451be..04f870d04 100644 --- a/runtime/syntax/sicad.vim +++ b/runtime/syntax/sicad.vim @@ -4,28 +4,17 @@ " Last Change: 2003 May 11 " URL: http://lmark.mgx.hu:81/download/vim/sicad.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " use SQL highlighting after 'sql' command -if version >= 600 - syn include @SQL syntax/sql.vim -else - syn include @SQL <sfile>:p:h/sql.vim -endif +syn include @SQL syntax/sql.vim unlet b:current_syntax " spaces are used in (auto)indents since sicad hates tabulator characters -if version >= 600 - setlocal expandtab -else - set expandtab -endif +setlocal expandtab " ignore case syn case ignore @@ -369,44 +358,34 @@ syn keyword sicadStatement zparbn zparf zparfn zparfw zparfwn syn keyword sicadStatement zparp zparpn zwinkp zwinkpn " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sicad_syntax_inits") - - if version < 508 - let did_sicad_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink sicadLabel PreProc - HiLink sicadLabel1 sicadLabel - HiLink sicadLabel2 sicadLabel - HiLink sicadConditional Conditional - HiLink sicadBoolean Boolean - HiLink sicadNumber Number - HiLink sicadFloat Float - HiLink sicadOperator Operator - HiLink sicadStatement Statement - HiLink sicadParameter sicadStatement - HiLink sicadGoto sicadStatement - HiLink sicadLineCont sicadStatement - HiLink sicadString String - HiLink sicadComment Comment - HiLink sicadSpecial Special - HiLink sicadIdentifier Type +HiLink sicadLabel PreProc +HiLink sicadLabel1 sicadLabel +HiLink sicadLabel2 sicadLabel +HiLink sicadConditional Conditional +HiLink sicadBoolean Boolean +HiLink sicadNumber Number +HiLink sicadFloat Float +HiLink sicadOperator Operator +HiLink sicadStatement Statement +HiLink sicadParameter sicadStatement +HiLink sicadGoto sicadStatement +HiLink sicadLineCont sicadStatement +HiLink sicadString String +HiLink sicadComment Comment +HiLink sicadSpecial Special +HiLink sicadIdentifier Type " HiLink sicadIdentifier Identifier - HiLink sicadError Error - HiLink sicadParenError sicadError - HiLink sicadApostropheError sicadError - HiLink sicadStringError sicadError - HiLink sicadCommentError sicadError +HiLink sicadError Error +HiLink sicadParenError sicadError +HiLink sicadApostropheError sicadError +HiLink sicadStringError sicadError +HiLink sicadCommentError sicadError " HiLink sqlStatement Special " modified highlight group in sql.vim - delcommand HiLink - -endif +delcommand HiLink let b:current_syntax = "sicad" diff --git a/runtime/syntax/simula.vim b/runtime/syntax/simula.vim index e952ee26c..eb3f8a1e8 100644 --- a/runtime/syntax/simula.vim +++ b/runtime/syntax/simula.vim @@ -4,11 +4,8 @@ " URL: http://folk.uio.no/hakonrk/vim/syntax/simula.vim " Last Change: 2001 May 15 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -58,42 +55,35 @@ syn match simulaReal "-\=\<\d\+\(\.\d\+\)\=\(&&\=[+-]\=\d\+\)\=\>" " Real starting with a `.', optional exponent syn match simulaReal "-\=\.\d\+\(&&\=[+-]\=\d\+\)\=\>" -if version >= 508 || !exists("did_simula_syntax_inits") - if version < 508 - let did_simula_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink simulaAssigned Identifier - HiLink simulaBoolean Boolean - HiLink simulaCharacter Character - HiLink simulaCharError Error - HiLink simulaComment Comment - HiLink simulaCompound Statement - HiLink simulaConditional Conditional - HiLink simulaConstant Constant - HiLink simulaFunction Function - HiLink simulaNumber Number - HiLink simulaOperator Operator - HiLink simulaReal Float - HiLink simulaReferenceType Type - HiLink simulaRepeat Repeat - HiLink simulaReserved Error - HiLink simulaSemicolon Statement - HiLink simulaSpecial Special - HiLink simulaSpecialChar SpecialChar - HiLink simulaSpecialCharErr Error - HiLink simulaStatement Statement - HiLink simulaStorageClass StorageClass - HiLink simulaString String - HiLink simulaStructure Structure - HiLink simulaTodo Todo - HiLink simulaType Type +HiLink simulaAssigned Identifier +HiLink simulaBoolean Boolean +HiLink simulaCharacter Character +HiLink simulaCharError Error +HiLink simulaComment Comment +HiLink simulaCompound Statement +HiLink simulaConditional Conditional +HiLink simulaConstant Constant +HiLink simulaFunction Function +HiLink simulaNumber Number +HiLink simulaOperator Operator +HiLink simulaReal Float +HiLink simulaReferenceType Type +HiLink simulaRepeat Repeat +HiLink simulaReserved Error +HiLink simulaSemicolon Statement +HiLink simulaSpecial Special +HiLink simulaSpecialChar SpecialChar +HiLink simulaSpecialCharErr Error +HiLink simulaStatement Statement +HiLink simulaStorageClass StorageClass +HiLink simulaString String +HiLink simulaStructure Structure +HiLink simulaTodo Todo +HiLink simulaType Type - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "simula" " vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/sinda.vim b/runtime/syntax/sinda.vim index 2bde267c2..ef0929e07 100644 --- a/runtime/syntax/sinda.vim +++ b/runtime/syntax/sinda.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -32,11 +29,7 @@ syn case ignore let fortran_free_source=1 " Load FORTRAN syntax file -if version < 600 - source <sfile>:p:h/fortran.vim -else - runtime! syntax/fortran.vim -endif +runtime! syntax/fortran.vim unlet b:current_syntax @@ -106,39 +99,31 @@ endif " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sinda_syntax_inits") - if version < 508 - let did_sinda_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sindaMacro Macro - HiLink sindaOptions Special - HiLink sindaRoutine Type - HiLink sindaControl Special - HiLink sindaSubRoutine Function - HiLink sindaIdentifier Identifier - - HiLink sindaFortran PreProc - HiLink sindaMotran PreProc - - HiLink sindaComment Comment - HiLink sindaHeader Typedef - HiLink sindaIncludeFile Type - HiLink sindaInteger Number - HiLink sindaFloat Float - HiLink sindaScientific Float - - HiLink sindaEndData Macro - - HiLink sindaTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink sindaMacro Macro +HiLink sindaOptions Special +HiLink sindaRoutine Type +HiLink sindaControl Special +HiLink sindaSubRoutine Function +HiLink sindaIdentifier Identifier + +HiLink sindaFortran PreProc +HiLink sindaMotran PreProc + +HiLink sindaComment Comment +HiLink sindaHeader Typedef +HiLink sindaIncludeFile Type +HiLink sindaInteger Number +HiLink sindaFloat Float +HiLink sindaScientific Float + +HiLink sindaEndData Macro + +HiLink sindaTodo Todo + +delcommand HiLink let b:current_syntax = "sinda" diff --git a/runtime/syntax/sindacmp.vim b/runtime/syntax/sindacmp.vim index 87b483409..28c3cdc0e 100644 --- a/runtime/syntax/sindacmp.vim +++ b/runtime/syntax/sindacmp.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -45,28 +42,20 @@ syn match sindacmpFloat "-\=\<[0-9]*\.[0-9]*" " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sindacmp_syntax_inits") - if version < 508 - let did_sindacmp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink sindacmpTitle Type - HiLink sindacmpUnit PreProc +HiLink sindacmpTitle Type +HiLink sindacmpUnit PreProc - HiLink sindacmpLabel Statement +HiLink sindacmpLabel Statement - HiLink sindacmpHeader sindaHeader +HiLink sindacmpHeader sindaHeader - HiLink sindacmpInteger Number - HiLink sindacmpFloat Special +HiLink sindacmpInteger Number +HiLink sindacmpFloat Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "sindacmp" diff --git a/runtime/syntax/sindaout.vim b/runtime/syntax/sindaout.vim index b557e017e..b4fb177f0 100644 --- a/runtime/syntax/sindaout.vim +++ b/runtime/syntax/sindaout.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -24,11 +21,7 @@ syn case match " Load SINDA syntax file -if version < 600 - source <sfile>:p:h/sinda.vim -else - runtime! syntax/sinda.vim -endif +runtime! syntax/sinda.vim unlet b:current_syntax @@ -66,33 +59,25 @@ syn match sindaoutError "<<< Error >>>" " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sindaout_syntax_inits") - if version < 508 - let did_sindaout_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - hi sindaHeaderDelim ctermfg=Black ctermbg=Green guifg=Black guibg=Green - - HiLink sindaoutPos Statement - HiLink sindaoutNeg PreProc - HiLink sindaoutTitle Type - HiLink sindaoutFile sindaIncludeFile - HiLink sindaoutInteger sindaInteger - - HiLink sindaoutSectionDelim Delimiter - HiLink sindaoutSectionTitle Exception - HiLink sindaoutHeaderDelim SpecialComment - HiLink sindaoutLabel Identifier - - HiLink sindaoutError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +hi sindaHeaderDelim ctermfg=Black ctermbg=Green guifg=Black guibg=Green + +HiLink sindaoutPos Statement +HiLink sindaoutNeg PreProc +HiLink sindaoutTitle Type +HiLink sindaoutFile sindaIncludeFile +HiLink sindaoutInteger sindaInteger + +HiLink sindaoutSectionDelim Delimiter +HiLink sindaoutSectionTitle Exception +HiLink sindaoutHeaderDelim SpecialComment +HiLink sindaoutLabel Identifier + +HiLink sindaoutError Error + +delcommand HiLink let b:current_syntax = "sindaout" diff --git a/runtime/syntax/sisu.vim b/runtime/syntax/sisu.vim index 0e0f2dbe0..83d2a1724 100644 --- a/runtime/syntax/sisu.vim +++ b/runtime/syntax/sisu.vim @@ -6,11 +6,9 @@ " <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob_plain;f=data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim;hb=HEAD> "(originally looked at Ruby Vim by Mirko Nasato) -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish -else endif let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/syntax/skill.vim b/runtime/syntax/skill.vim index 8b960441f..f32d5ee3e 100644 --- a/runtime/syntax/skill.vim +++ b/runtime/syntax/skill.vim @@ -9,11 +9,8 @@ " database. This file also defines syntax highlighting for " certain Design Framework II interface functions. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -525,37 +522,29 @@ syn match skillCommentError "\*/" syn sync ccomment skillComment minlines=10 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_skill_syntax_inits") - if version < 508 - let did_skill_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink skillcdfFunctions Function - HiLink skillgeFunctions Function - HiLink skillhiFunctions Function - HiLink skillleFunctions Function - HiLink skilldbefFunctions Function - HiLink skillddFunctions Function - HiLink skillpcFunctions Function - HiLink skilltechFunctions Function - HiLink skillConstants Constant - HiLink skillFunction Function - HiLink skillKeywords Statement - HiLink skillConditional Conditional - HiLink skillRepeat Repeat - HiLink skillString String - HiLink skillTodo Todo - HiLink skillNote Todo - HiLink skillComment Comment - HiLink skillCommentError Error +HiLink skillcdfFunctions Function +HiLink skillgeFunctions Function +HiLink skillhiFunctions Function +HiLink skillleFunctions Function +HiLink skilldbefFunctions Function +HiLink skillddFunctions Function +HiLink skillpcFunctions Function +HiLink skilltechFunctions Function +HiLink skillConstants Constant +HiLink skillFunction Function +HiLink skillKeywords Statement +HiLink skillConditional Conditional +HiLink skillRepeat Repeat +HiLink skillString String +HiLink skillTodo Todo +HiLink skillNote Todo +HiLink skillComment Comment +HiLink skillCommentError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "skill" diff --git a/runtime/syntax/sl.vim b/runtime/syntax/sl.vim index fa3bca06d..a40d43ea6 100644 --- a/runtime/syntax/sl.vim +++ b/runtime/syntax/sl.vim @@ -3,11 +3,8 @@ " Maintainer: Dan Piponi <dan@tanelorn.demon.co.uk> " Last Change: 2001 May 09 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -75,45 +72,37 @@ syn keyword slVariable dtime dPdtime syn sync ccomment slComment minlines=10 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sl_syntax_inits") - if version < 508 - let did_sl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink slLabel Label - HiLink slUserLabel Label - HiLink slConditional Conditional - HiLink slRepeat Repeat - HiLink slCharacter Character - HiLink slSpecialCharacter slSpecial - HiLink slNumber Number - HiLink slFloat Float - HiLink slParenError slError - HiLink slInParen slError - HiLink slCommentError slError - HiLink slOperator Operator - HiLink slStorageClass StorageClass - HiLink slError Error - HiLink slStatement Statement - HiLink slType Type - HiLink slCommentError slError - HiLink slCommentString slString - HiLink slComment2String slString - HiLink slCommentSkip slComment - HiLink slString String - HiLink slComment Comment - HiLink slSpecial SpecialChar - HiLink slTodo Todo - HiLink slVariable Identifier - "HiLink slIdentifier Identifier +HiLink slLabel Label +HiLink slUserLabel Label +HiLink slConditional Conditional +HiLink slRepeat Repeat +HiLink slCharacter Character +HiLink slSpecialCharacter slSpecial +HiLink slNumber Number +HiLink slFloat Float +HiLink slParenError slError +HiLink slInParen slError +HiLink slCommentError slError +HiLink slOperator Operator +HiLink slStorageClass StorageClass +HiLink slError Error +HiLink slStatement Statement +HiLink slType Type +HiLink slCommentError slError +HiLink slCommentString slString +HiLink slComment2String slString +HiLink slCommentSkip slComment +HiLink slString String +HiLink slComment Comment +HiLink slSpecial SpecialChar +HiLink slTodo Todo +HiLink slVariable Identifier +"HiLink slIdentifier Identifier - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "sl" diff --git a/runtime/syntax/slang.vim b/runtime/syntax/slang.vim index 9fa89b4d6..938e8d5c5 100644 --- a/runtime/syntax/slang.vim +++ b/runtime/syntax/slang.vim @@ -3,11 +3,8 @@ " Maintainer: Jan Hlavacek <lahvak@math.ohio-state.edu> " Last Change: 980216 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -55,47 +52,39 @@ syn keyword slangOperator sizeof syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_slang_syntax_inits") - if version < 508 - let did_slang_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink slangDefinition Type - HiLink slangBlock slangDefinition - HiLink slangLabel Label - HiLink slangConditional Conditional - HiLink slangRepeat Repeat - HiLink slangCharacter Character - HiLink slangFloat Float - HiLink slangImaginary Float - HiLink slangDecimal slangNumber - HiLink slangOctal slangNumber - HiLink slangHex slangNumber - HiLink slangNumber Number - HiLink slangParenError Error - HiLink slangOctalError Error - HiLink slangOperator Operator - HiLink slangStructure Structure - HiLink slangInclude Include - HiLink slangPreCondit PreCondit - HiLink slangError Error - HiLink slangStatement Statement - HiLink slangType Type - HiLink slangString String - HiLink slangConstant Constant - HiLink slangRangeArray slangConstant - HiLink slangComment Comment - HiLink slangSpecial SpecialChar - HiLink slangTodo Todo - HiLink slangDelim Delimiter +HiLink slangDefinition Type +HiLink slangBlock slangDefinition +HiLink slangLabel Label +HiLink slangConditional Conditional +HiLink slangRepeat Repeat +HiLink slangCharacter Character +HiLink slangFloat Float +HiLink slangImaginary Float +HiLink slangDecimal slangNumber +HiLink slangOctal slangNumber +HiLink slangHex slangNumber +HiLink slangNumber Number +HiLink slangParenError Error +HiLink slangOctalError Error +HiLink slangOperator Operator +HiLink slangStructure Structure +HiLink slangInclude Include +HiLink slangPreCondit PreCondit +HiLink slangError Error +HiLink slangStatement Statement +HiLink slangType Type +HiLink slangString String +HiLink slangConstant Constant +HiLink slangRangeArray slangConstant +HiLink slangComment Comment +HiLink slangSpecial SpecialChar +HiLink slangTodo Todo +HiLink slangDelim Delimiter - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "slang" diff --git a/runtime/syntax/slice.vim b/runtime/syntax/slice.vim index 4e2f9a860..202aee759 100644 --- a/runtime/syntax/slice.vim +++ b/runtime/syntax/slice.vim @@ -3,11 +3,8 @@ " Maintainer: Morel Bodin <slice06@nym.hush.com> " Last Change: 2005 Dec 03 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -58,33 +55,25 @@ syn match sliceComment "//.*" syn sync ccomment sliceComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_slice_syn_inits") - if version < 508 - let did_slice_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink sliceComment Comment - HiLink sliceConstruct Keyword - HiLink sliceType Type - HiLink sliceString String - HiLink sliceIncluded String - HiLink sliceQualifier Keyword - HiLink sliceInclude Include - HiLink sliceGuard PreProc - HiLink sliceBoolean Boolean - HiLink sliceFloat Number - HiLink sliceNumber Number - HiLink sliceOctal Number - HiLink sliceOctalZero Special - HiLink sliceNumberError Special +HiLink sliceComment Comment +HiLink sliceConstruct Keyword +HiLink sliceType Type +HiLink sliceString String +HiLink sliceIncluded String +HiLink sliceQualifier Keyword +HiLink sliceInclude Include +HiLink sliceGuard PreProc +HiLink sliceBoolean Boolean +HiLink sliceFloat Number +HiLink sliceNumber Number +HiLink sliceOctal Number +HiLink sliceOctalZero Special +HiLink sliceNumberError Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "slice" diff --git a/runtime/syntax/slrnrc.vim b/runtime/syntax/slrnrc.vim index 038b62e16..a55439a20 100644 --- a/runtime/syntax/slrnrc.vim +++ b/runtime/syntax/slrnrc.vim @@ -3,11 +3,8 @@ " Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> " Last Change: 23 April 2006 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -150,44 +147,36 @@ syn match slrnrcSetkey "^\s*setkey\>" skipwhite nextgroup=slrnrcSetkeyArt,slrn syn match slrnrcUnsetkey '^\s*unsetkey\s\+\("\)\=\(article\|group\|readline\)\>\1' skipwhite nextgroup=slrnrcKey contains=slrnrcSetkeyObj\(Str\)\= " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_slrnrc_syntax_inits") - if version < 508 - let did_slrnrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink slrnrcTodo Todo - HiLink slrnrcSpaceError Error - HiLink slrnrcNumber Number - HiLink slrnrcSpecKey SpecialChar - HiLink slrnrcKey String - HiLink slrnrcSpecChar SpecialChar - HiLink slrnrcString String - HiLink slrnSlangPreCondit Special - HiLink slrnrcComment Comment - HiLink slrnrcVarInt Identifier - HiLink slrnrcVarStr Identifier - HiLink slrnrcCmd slrnrcSet - HiLink slrnrcSet Operator - HiLink slrnrcColor Keyword - HiLink slrnrcColorObj Identifier - HiLink slrnrcColorVal String - HiLink slrnrcMono Keyword - HiLink slrnrcMonoObj Identifier - HiLink slrnrcMonoVal String - HiLink slrnrcFunArt Macro - HiLink slrnrcFunGroup Macro - HiLink slrnrcFunRead Macro - HiLink slrnrcSetkeyObj Identifier - HiLink slrnrcSetkey Keyword - HiLink slrnrcUnsetkey slrnrcSetkey - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink slrnrcTodo Todo +HiLink slrnrcSpaceError Error +HiLink slrnrcNumber Number +HiLink slrnrcSpecKey SpecialChar +HiLink slrnrcKey String +HiLink slrnrcSpecChar SpecialChar +HiLink slrnrcString String +HiLink slrnSlangPreCondit Special +HiLink slrnrcComment Comment +HiLink slrnrcVarInt Identifier +HiLink slrnrcVarStr Identifier +HiLink slrnrcCmd slrnrcSet +HiLink slrnrcSet Operator +HiLink slrnrcColor Keyword +HiLink slrnrcColorObj Identifier +HiLink slrnrcColorVal String +HiLink slrnrcMono Keyword +HiLink slrnrcMonoObj Identifier +HiLink slrnrcMonoVal String +HiLink slrnrcFunArt Macro +HiLink slrnrcFunGroup Macro +HiLink slrnrcFunRead Macro +HiLink slrnrcSetkeyObj Identifier +HiLink slrnrcSetkey Keyword +HiLink slrnrcUnsetkey slrnrcSetkey + +delcommand HiLink let b:current_syntax = "slrnrc" diff --git a/runtime/syntax/slrnsc.vim b/runtime/syntax/slrnsc.vim index 838af6ad1..a5dfa55e5 100644 --- a/runtime/syntax/slrnsc.vim +++ b/runtime/syntax/slrnsc.vim @@ -3,20 +3,13 @@ " Maintainer: Preben 'Peppe' Guldberg <peppe@wielders.org> " Last Change: 8 Oct 2004 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " characters in newsgroup names -if version < 600 - set isk=@,48-57,.,-,_,+ -else - setlocal isk=@,48-57,.,-,_,+ -endif +setlocal isk=@,48-57,.,-,_,+ syn match slrnscComment "%.*$" syn match slrnscSectionCom ".].*"lc=2 @@ -51,34 +44,26 @@ syn match slrnscScoreIdent contained "%.*" syn match slrnScoreLine "^\s*Score::\=\s\+=\=[-+]\=\d\+\s*\(%.*\)\=$" skipempty nextgroup=slrnscScoreItem contains=slrnscScore,slrnscDelim,slrnscOper,slrnscNumber,slrnscScoreIdent " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_slrnsc_syntax_inits") - if version < 508 - let did_slrnsc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink slrnscComment Comment - HiLink slrnscSectionCom slrnscComment - HiLink slrnscGroup String - HiLink slrnscNumber Number - HiLink slrnscDate Special - HiLink slrnscDelim Delimiter - HiLink slrnscComma SpecialChar - HiLink slrnscOper SpecialChar - HiLink slrnscEsc String - HiLink slrnscSectionStd Type - HiLink slrnscSectionNot Delimiter - HiLink slrnscItem Statement - HiLink slrnscScore Keyword - HiLink slrnscScoreIdent Identifier - HiLink slrnscInclude Keyword +HiLink slrnscComment Comment +HiLink slrnscSectionCom slrnscComment +HiLink slrnscGroup String +HiLink slrnscNumber Number +HiLink slrnscDate Special +HiLink slrnscDelim Delimiter +HiLink slrnscComma SpecialChar +HiLink slrnscOper SpecialChar +HiLink slrnscEsc String +HiLink slrnscSectionStd Type +HiLink slrnscSectionNot Delimiter +HiLink slrnscItem Statement +HiLink slrnscScore Keyword +HiLink slrnscScoreIdent Identifier +HiLink slrnscInclude Keyword - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "slrnsc" diff --git a/runtime/syntax/sm.vim b/runtime/syntax/sm.vim index 8fdc14b71..33a67724f 100644 --- a/runtime/syntax/sm.vim +++ b/runtime/syntax/sm.vim @@ -56,36 +56,28 @@ syn match smClauseCont contained "^\t" syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_smil_syntax_inits") - if version < 508 - let did_smil_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smClause Special - HiLink smClauseError Error - HiLink smComment Comment - HiLink smDefine Statement - HiLink smElse Delimiter - HiLink smHeader Statement - HiLink smHeaderSep String - HiLink smMesg Special - HiLink smPrecedence Number - HiLink smRewrite Statement - HiLink smRewriteComment Comment - HiLink smRewriteLhsToken String - HiLink smRewriteLhsUser Statement - HiLink smRewriteRhsToken String - HiLink smRuleset Preproc - HiLink smTrusted Special - HiLink smVar String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink smClause Special +HiLink smClauseError Error +HiLink smComment Comment +HiLink smDefine Statement +HiLink smElse Delimiter +HiLink smHeader Statement +HiLink smHeaderSep String +HiLink smMesg Special +HiLink smPrecedence Number +HiLink smRewrite Statement +HiLink smRewriteComment Comment +HiLink smRewriteLhsToken String +HiLink smRewriteLhsUser Statement +HiLink smRewriteRhsToken String +HiLink smRuleset Preproc +HiLink smTrusted Special +HiLink smVar String + +delcommand HiLink let b:current_syntax = "sm" diff --git a/runtime/syntax/smarty.vim b/runtime/syntax/smarty.vim index 6dda366ba..ab8e85dce 100644 --- a/runtime/syntax/smarty.vim +++ b/runtime/syntax/smarty.vim @@ -8,11 +8,10 @@ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish -endif + " quit when a syntax file was already loaded + if exists("b:current_syntax") + finish + endif let main_syntax = 'smarty' endif @@ -57,25 +56,18 @@ syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,ja syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc,smartyZone -if version >= 508 || !exists("did_smarty_syn_inits") - if version < 508 - let did_smarty_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink smartyTagName Identifier - HiLink smartyProperty Constant - " if you want the text inside the braces to be colored, then - " remove the comment in from of the next statement - "HiLink smartyZone Include - HiLink smartyInFunc Function - HiLink smartyBlock Constant - HiLink smartyDot SpecialChar - HiLink smartyModifier Function - delcommand HiLink -endif +HiLink smartyTagName Identifier +HiLink smartyProperty Constant +" if you want the text inside the braces to be colored, then +" remove the comment in from of the next statement +"HiLink smartyZone Include +HiLink smartyInFunc Function +HiLink smartyBlock Constant +HiLink smartyDot SpecialChar +HiLink smartyModifier Function +delcommand HiLink let b:current_syntax = "smarty" diff --git a/runtime/syntax/smcl.vim b/runtime/syntax/smcl.vim index d9afba6de..a5baa47e9 100644 --- a/runtime/syntax/smcl.vim +++ b/runtime/syntax/smcl.vim @@ -10,9 +10,8 @@ " check for 'b:current_syntax', removed 'did_smcl_syntax_inits' " 26apr2006 changed 'stata_smcl' to 'smcl' -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/smil.vim b/runtime/syntax/smil.vim index 6b5a00286..84826323c 100644 --- a/runtime/syntax/smil.vim +++ b/runtime/syntax/smil.vim @@ -7,11 +7,8 @@ " To learn more about SMIL, please refer to http://www.w3.org/AudioVideo/ " and to http://www.helio.org/products/smil/tutorial/ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -115,38 +112,30 @@ endif syn region smilComment start=+<!DOCTYPE+ keepend end=+>+ " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_smil_syntax_inits") - if version < 508 - let did_smil_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smilTag Function - HiLink smilEndTag Identifier - HiLink smilArg Type - HiLink smilTagName smilStatement - HiLink smilSpecialTagName Exception - HiLink smilValue Value - HiLink smilSpecialChar Special - - HiLink smilSpecial Special - HiLink smilSpecialChar Special - HiLink smilString String - HiLink smilStatement Statement - HiLink smilComment Comment - HiLink smilCommentPart Comment - HiLink smilPreProc PreProc - HiLink smilValue String - HiLink smilCommentError smilError - HiLink smilTagError smilError - HiLink smilError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink smilTag Function +HiLink smilEndTag Identifier +HiLink smilArg Type +HiLink smilTagName smilStatement +HiLink smilSpecialTagName Exception +HiLink smilValue Value +HiLink smilSpecialChar Special + +HiLink smilSpecial Special +HiLink smilSpecialChar Special +HiLink smilString String +HiLink smilStatement Statement +HiLink smilComment Comment +HiLink smilCommentPart Comment +HiLink smilPreProc PreProc +HiLink smilValue String +HiLink smilCommentError smilError +HiLink smilTagError smilError +HiLink smilError Error + +delcommand HiLink let b:current_syntax = "smil" diff --git a/runtime/syntax/smith.vim b/runtime/syntax/smith.vim index e05ce6968..82429691c 100644 --- a/runtime/syntax/smith.vim +++ b/runtime/syntax/smith.vim @@ -3,11 +3,8 @@ " Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl> " Last Change: 21.07.2000 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -28,24 +25,16 @@ syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_smith_syntax_inits") - if version < 508 - let did_smith_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smithRegister Identifier - HiLink smithKeyword Keyword - HiLink smithComment Comment - HiLink smithString String - HiLink smithNumber Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink smithRegister Identifier +HiLink smithKeyword Keyword +HiLink smithComment Comment +HiLink smithString String +HiLink smithNumber Number + +delcommand HiLink let b:current_syntax = "smith" diff --git a/runtime/syntax/sml.vim b/runtime/syntax/sml.vim index aa7d64a33..01d494d2b 100644 --- a/runtime/syntax/sml.vim +++ b/runtime/syntax/sml.vim @@ -8,11 +8,8 @@ " 2002 Jun 02 - Fixed small typo (MM) " 2001 Nov 20 - Fixed small highlighting bug with modules (MM) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -168,62 +165,54 @@ syn sync match smlSigSync grouphere smlSig "\<sig\>" syn sync match smlSigSync groupthere smlSig "\<end\>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sml_syntax_inits") - if version < 508 - let did_sml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smlBraceErr Error - HiLink smlBrackErr Error - HiLink smlParenErr Error - - HiLink smlCommentErr Error - - HiLink smlEndErr Error - HiLink smlThenErr Error - - HiLink smlCharErr Error - - HiLink smlComment Comment - - HiLink smlModPath Include - HiLink smlModule Include - HiLink smlModParam1 Include - HiLink smlModType Include - HiLink smlMPRestr3 Include - HiLink smlFullMod Include - HiLink smlModTypeRestr Include - HiLink smlWith Include - HiLink smlMTDef Include - - HiLink smlConstructor Constant - - HiLink smlModPreRHS Keyword - HiLink smlMPRestr2 Keyword - HiLink smlKeyword Keyword - HiLink smlFunDef Keyword - HiLink smlRefAssign Keyword - HiLink smlKeyChar Keyword - HiLink smlAnyVar Keyword - HiLink smlTopStop Keyword - HiLink smlOperator Keyword - - HiLink smlBoolean Boolean - HiLink smlCharacter Character - HiLink smlNumber Number - HiLink smlReal Float - HiLink smlString String - HiLink smlType Type - HiLink smlTodo Todo - HiLink smlEncl Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink smlBraceErr Error +HiLink smlBrackErr Error +HiLink smlParenErr Error + +HiLink smlCommentErr Error + +HiLink smlEndErr Error +HiLink smlThenErr Error + +HiLink smlCharErr Error + +HiLink smlComment Comment + +HiLink smlModPath Include +HiLink smlModule Include +HiLink smlModParam1 Include +HiLink smlModType Include +HiLink smlMPRestr3 Include +HiLink smlFullMod Include +HiLink smlModTypeRestr Include +HiLink smlWith Include +HiLink smlMTDef Include + +HiLink smlConstructor Constant + +HiLink smlModPreRHS Keyword +HiLink smlMPRestr2 Keyword +HiLink smlKeyword Keyword +HiLink smlFunDef Keyword +HiLink smlRefAssign Keyword +HiLink smlKeyChar Keyword +HiLink smlAnyVar Keyword +HiLink smlTopStop Keyword +HiLink smlOperator Keyword + +HiLink smlBoolean Boolean +HiLink smlCharacter Character +HiLink smlNumber Number +HiLink smlReal Float +HiLink smlString String +HiLink smlType Type +HiLink smlTodo Todo +HiLink smlEncl Keyword + +delcommand HiLink let b:current_syntax = "sml" diff --git a/runtime/syntax/snnsnet.vim b/runtime/syntax/snnsnet.vim index 6b24de563..c73891e2b 100644 --- a/runtime/syntax/snnsnet.vim +++ b/runtime/syntax/snnsnet.vim @@ -8,9 +8,8 @@ " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -54,23 +53,16 @@ syn match snnsnetNumbers "\d" contained syn match snnsnetComment "#.*$" contains=snnsnetTodo syn keyword snnsnetTodo TODO XXX FIXME contained -if version >= 508 || !exists("did_snnsnet_syn_inits") - if version < 508 - let did_snnsnet_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink snnsnetType Type - HiLink snnsnetComment Comment - HiLink snnsnetNumbers Number - HiLink snnsnetSection Statement - HiLink snnsnetTitle Label - HiLink snnsnetTodo Todo +HiLink snnsnetType Type +HiLink snnsnetComment Comment +HiLink snnsnetNumbers Number +HiLink snnsnetSection Statement +HiLink snnsnetTitle Label +HiLink snnsnetTodo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "snnsnet" diff --git a/runtime/syntax/snnspat.vim b/runtime/syntax/snnspat.vim index 5bfa48e62..ffc4caea7 100644 --- a/runtime/syntax/snnspat.vim +++ b/runtime/syntax/snnspat.vim @@ -8,9 +8,8 @@ " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -44,26 +43,19 @@ syn match snnspatNumbers "\d" contained syn match snnspatComment "#.*$" contains=snnspatTodo syn keyword snnspatTodo TODO XXX FIXME contained -if version >= 508 || !exists("did_snnspat_syn_inits") - if version < 508 - let did_snnspat_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink snnspatGen Statement - HiLink snnspatHeader Error - HiLink snnspatNoHeader Define - HiLink snnspatNumbers Number - HiLink snnspatComment Comment - HiLink snnspatError Error - HiLink snnspatTodo Todo - HiLink snnspatAccepted NONE - HiLink snnspatBrac NONE +HiLink snnspatGen Statement +HiLink snnspatHeader Error +HiLink snnspatNoHeader Define +HiLink snnspatNumbers Number +HiLink snnspatComment Comment +HiLink snnspatError Error +HiLink snnspatTodo Todo +HiLink snnspatAccepted NONE +HiLink snnspatBrac NONE - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "snnspat" diff --git a/runtime/syntax/snnsres.vim b/runtime/syntax/snnsres.vim index 4c1d59600..2d2791696 100644 --- a/runtime/syntax/snnsres.vim +++ b/runtime/syntax/snnsres.vim @@ -8,9 +8,8 @@ " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -37,23 +36,16 @@ syn match snnsresNumbers "\d" contained syn match snnsresComment "#.*$" contains=snnsresTodo syn keyword snnsresTodo TODO XXX FIXME contained -if version >= 508 || !exists("did_snnsres_syn_inits") - if version < 508 - let did_snnsres_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink snnsresGen Statement - HiLink snnsresHeader Statement - HiLink snnsresNoHeader Define - HiLink snnsresNumbers Number - HiLink snnsresComment Comment - HiLink snnsresTodo Todo - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink snnsresGen Statement +HiLink snnsresHeader Statement +HiLink snnsresNoHeader Define +HiLink snnsresNumbers Number +HiLink snnsresComment Comment +HiLink snnsresTodo Todo + +delcommand HiLink let b:current_syntax = "snnsres" diff --git a/runtime/syntax/snobol4.vim b/runtime/syntax/snobol4.vim index 07eb63dec..691acdec9 100644 --- a/runtime/syntax/snobol4.vim +++ b/runtime/syntax/snobol4.vim @@ -10,11 +10,8 @@ " - one character labels weren't displayed correctly. " - nonexistent Snobol4 keywords displayed as errors. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -79,47 +76,39 @@ syn match snobol4ErrInBracket display contained "[){}]\|<%\|%>" " syn match snobol4Comment "^\#\!.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_snobol4_syntax_inits") - if version < 508 - let did_snobol4_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink snobol4Constant Constant - HiLink snobol4Label Label - HiLink snobol4Goto Repeat - HiLink snobol4Conditional Conditional - HiLink snobol4Repeat Repeat - HiLink snobol4Number Number - HiLink snobol4Error Error - HiLink snobol4Statement PreProc - HiLink snobol4BogusStatement snobol4Error - HiLink snobol4String String - HiLink snobol4Comment Comment - HiLink snobol4Special Special - HiLink snobol4Todo Todo - HiLink snobol4Keyword Keyword - HiLink snobol4Function Function - HiLink snobol4MathsOperator Operator - HiLink snobol4ParenError snobol4Error - HiLink snobol4ErrInParen snobol4Error - HiLink snobol4ErrInBracket snobol4Error - HiLink snobol4SysVar Keyword - HiLink snobol4BogusSysVar snobol4Error - if exists("snobol4_strict_mode") - HiLink snobol4ExtSysVar WarningMsg - HiLink snobol4ExtKeyword WarningMsg - else - HiLink snobol4ExtSysVar snobol4SysVar - HiLink snobol4ExtKeyword snobol4Keyword - endif - - delcommand HiLink +HiLink snobol4Constant Constant +HiLink snobol4Label Label +HiLink snobol4Goto Repeat +HiLink snobol4Conditional Conditional +HiLink snobol4Repeat Repeat +HiLink snobol4Number Number +HiLink snobol4Error Error +HiLink snobol4Statement PreProc +HiLink snobol4BogusStatement snobol4Error +HiLink snobol4String String +HiLink snobol4Comment Comment +HiLink snobol4Special Special +HiLink snobol4Todo Todo +HiLink snobol4Keyword Keyword +HiLink snobol4Function Function +HiLink snobol4MathsOperator Operator +HiLink snobol4ParenError snobol4Error +HiLink snobol4ErrInParen snobol4Error +HiLink snobol4ErrInBracket snobol4Error +HiLink snobol4SysVar Keyword +HiLink snobol4BogusSysVar snobol4Error +if exists("snobol4_strict_mode") +HiLink snobol4ExtSysVar WarningMsg +HiLink snobol4ExtKeyword WarningMsg +else +HiLink snobol4ExtSysVar snobol4SysVar +HiLink snobol4ExtKeyword snobol4Keyword endif +delcommand HiLink + let b:current_syntax = "snobol4" " vim: ts=8 diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim index 9952bd254..edfdf4365 100644 --- a/runtime/syntax/spec.vim +++ b/runtime/syntax/spec.vim @@ -5,11 +5,8 @@ " Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014) " Last Change: Sat Apr 9 15:30 2016 Filip SzymaÅ„ski -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -159,78 +156,70 @@ syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_spec_syntax_inits") - if version < 508 - let did_spec_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - "main types color definitions - HiLink specSection Structure - HiLink specSectionMacro Macro - HiLink specWWWlink PreProc - HiLink specOpts Operator - - "yes, it's ugly, but white is sooo cool - if &background == "dark" - hi def specGlobalMacro ctermfg=white - else - HiLink specGlobalMacro Identifier - endif - - "sh colors - HiLink shComment Comment - HiLink shIf Statement - HiLink shOperator Special - HiLink shQuote1 String - HiLink shQuote2 String - HiLink shQuoteDelim Statement - - "spec colors - HiLink specBlock Function - HiLink specColon Special - HiLink specCommand Statement - HiLink specCommandOpts specOpts - HiLink specCommandSpecial Special - HiLink specComment Comment - HiLink specConfigure specCommand - HiLink specDate String - HiLink specDescriptionOpts specOpts - HiLink specEmail specWWWlink - HiLink specError Error - HiLink specFilesDirective specSectionMacro - HiLink specFilesOpts specOpts - HiLink specLicense String - HiLink specMacroNameLocal specGlobalMacro - HiLink specMacroNameOther specGlobalMacro - HiLink specManpageFile NONE - HiLink specMonth specDate - HiLink specNoNumberHilite NONE - HiLink specNumber Number - HiLink specPackageOpts specOpts - HiLink specPercent Special - HiLink specSpecialChar Special - HiLink specSpecialVariables specGlobalMacro - HiLink specSpecialVariablesNames specGlobalMacro - HiLink specTarCommand specCommand - HiLink specURL specWWWlink - HiLink specURLMacro specWWWlink - HiLink specVariables Identifier - HiLink specWeekday specDate - HiLink specListedFilesBin Statement - HiLink specListedFilesDoc Statement - HiLink specListedFilesEtc Statement - HiLink specListedFilesLib Statement - HiLink specListedFilesPrefix Statement - HiLink specListedFilesShare Statement - - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +"main types color definitions +HiLink specSection Structure +HiLink specSectionMacro Macro +HiLink specWWWlink PreProc +HiLink specOpts Operator + +"yes, it's ugly, but white is sooo cool +if &background == "dark" +hi def specGlobalMacro ctermfg=white +else +HiLink specGlobalMacro Identifier endif +"sh colors +HiLink shComment Comment +HiLink shIf Statement +HiLink shOperator Special +HiLink shQuote1 String +HiLink shQuote2 String +HiLink shQuoteDelim Statement + +"spec colors +HiLink specBlock Function +HiLink specColon Special +HiLink specCommand Statement +HiLink specCommandOpts specOpts +HiLink specCommandSpecial Special +HiLink specComment Comment +HiLink specConfigure specCommand +HiLink specDate String +HiLink specDescriptionOpts specOpts +HiLink specEmail specWWWlink +HiLink specError Error +HiLink specFilesDirective specSectionMacro +HiLink specFilesOpts specOpts +HiLink specLicense String +HiLink specMacroNameLocal specGlobalMacro +HiLink specMacroNameOther specGlobalMacro +HiLink specManpageFile NONE +HiLink specMonth specDate +HiLink specNoNumberHilite NONE +HiLink specNumber Number +HiLink specPackageOpts specOpts +HiLink specPercent Special +HiLink specSpecialChar Special +HiLink specSpecialVariables specGlobalMacro +HiLink specSpecialVariablesNames specGlobalMacro +HiLink specTarCommand specCommand +HiLink specURL specWWWlink +HiLink specURLMacro specWWWlink +HiLink specVariables Identifier +HiLink specWeekday specDate +HiLink specListedFilesBin Statement +HiLink specListedFilesDoc Statement +HiLink specListedFilesEtc Statement +HiLink specListedFilesLib Statement +HiLink specListedFilesPrefix Statement +HiLink specListedFilesShare Statement + +delcommand HiLink + let b:current_syntax = "spec" " vim: ts=8 diff --git a/runtime/syntax/specman.vim b/runtime/syntax/specman.vim index 3fb77a2af..c426c998a 100644 --- a/runtime/syntax/specman.vim +++ b/runtime/syntax/specman.vim @@ -10,11 +10,8 @@ "--------------------------------------------------------- " Remove any old syntax stuff hanging around -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -137,46 +134,38 @@ syn region specmanString start=+"+ end=+"+ syn sync lines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_specman_syn_inits") - if version < 508 - let did_specman_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " The default methods for highlighting. Can be overridden later - HiLink specmanConditional Conditional - HiLink specmanConstraint Conditional - HiLink specmanRepeat Repeat - HiLink specmanString String - HiLink specmanComment Comment - HiLink specmanConstant Macro - HiLink specmanNumber Number - HiLink specmanCompare Operator - HiLink specmanOperator Operator - HiLink specmanLogical Operator - HiLink specmanStatement Statement - HiLink specmanHDL SpecialChar - HiLink specmanMethod Function - HiLink specmanInclude Include - HiLink specmanStructure Structure - HiLink specmanBoolean Boolean - HiLink specmanFSM Label - HiLink specmanSpecial Special - HiLink specmanType Type - HiLink specmanTemporal Type - HiLink specmanFile Include - HiLink specmanPreCondit Include - HiLink specmanDefine Typedef - HiLink specmanLabel Label - HiLink specmanPacking keyword - HiLink specmanTodo Todo - HiLink specmanParenError Error - HiLink specmanErrInParen Error - HiLink specmanErrInBracket Error - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +" The default methods for highlighting. Can be overridden later +HiLink specmanConditional Conditional +HiLink specmanConstraint Conditional +HiLink specmanRepeat Repeat +HiLink specmanString String +HiLink specmanComment Comment +HiLink specmanConstant Macro +HiLink specmanNumber Number +HiLink specmanCompare Operator +HiLink specmanOperator Operator +HiLink specmanLogical Operator +HiLink specmanStatement Statement +HiLink specmanHDL SpecialChar +HiLink specmanMethod Function +HiLink specmanInclude Include +HiLink specmanStructure Structure +HiLink specmanBoolean Boolean +HiLink specmanFSM Label +HiLink specmanSpecial Special +HiLink specmanType Type +HiLink specmanTemporal Type +HiLink specmanFile Include +HiLink specmanPreCondit Include +HiLink specmanDefine Typedef +HiLink specmanLabel Label +HiLink specmanPacking keyword +HiLink specmanTodo Todo +HiLink specmanParenError Error +HiLink specmanErrInParen Error +HiLink specmanErrInBracket Error +delcommand HiLink let b:current_syntax = "specman" diff --git a/runtime/syntax/spice.vim b/runtime/syntax/spice.vim index 200e1aaea..57ff05f80 100644 --- a/runtime/syntax/spice.vim +++ b/runtime/syntax/spice.vim @@ -7,11 +7,8 @@ " This is based on sh.vim by Lennart Schultz " but greatly simplified -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -53,28 +50,20 @@ syn match spiceParenError ")" syn sync minlines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_spice_syntax_inits") - if version < 508 - let did_spice_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink spiceTodo Todo - HiLink spiceWrapLineOperator spiceOperator - HiLink spiceSinglequote spiceExpr - HiLink spiceExpr Function - HiLink spiceParenError Error - HiLink spiceStatement Statement - HiLink spiceNumber Number - HiLink spiceComment Comment - HiLink spiceOperator Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink spiceTodo Todo +HiLink spiceWrapLineOperator spiceOperator +HiLink spiceSinglequote spiceExpr +HiLink spiceExpr Function +HiLink spiceParenError Error +HiLink spiceStatement Statement +HiLink spiceNumber Number +HiLink spiceComment Comment +HiLink spiceOperator Operator + +delcommand HiLink let b:current_syntax = "spice" diff --git a/runtime/syntax/splint.vim b/runtime/syntax/splint.vim index dc09d8b9d..14f84a869 100644 --- a/runtime/syntax/splint.vim +++ b/runtime/syntax/splint.vim @@ -15,20 +15,13 @@ " in your vimrc file or filetype.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim " FIXME: uses and changes several clusters defined in c.vim @@ -199,61 +192,53 @@ syn cluster cPreProcGroup add=@splintAllStuff syn cluster cMultiGroup add=@splintAllStuff " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_splint_syntax_inits") - if version < 508 - let did_splint_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink splintShortAnn splintAnnotation - HiLink splintAnnotation Comment - HiLink splintAnnError splintError - HiLink splintAnnError2 splintError - HiLink splintFlag SpecialComment - HiLink splintGlobalFlag splintError - HiLink splintSpecialAnnot splintAnnKey - HiLink splintStateAnnot splintAnnKey - HiLink splintSpecTag splintAnnKey - HiLink splintModifies splintAnnKey - HiLink splintRequires splintAnnKey - HiLink splintGlobals splintAnnKey - HiLink splintGlobitem Constant - HiLink splintGlobannot splintAnnKey - HiLink splintWarning splintAnnKey - HiLink splintModitem Constant - HiLink splintIter splintAnnKey - HiLink splintConst splintAnnKey - HiLink splintAlt splintAnnKey - HiLink splintType splintAnnKey - HiLink splintGlobalType splintAnnKey - HiLink splintMemMgm splintAnnKey - HiLink splintAlias splintAnnKey - HiLink splintExposure splintAnnKey - HiLink splintDefState splintAnnKey - HiLink splintGlobState splintAnnKey - HiLink splintNullState splintAnnKey - HiLink splintNullPred splintAnnKey - HiLink splintExit splintAnnKey - HiLink splintExec splintAnnKey - HiLink splintSef splintAnnKey - HiLink splintDecl splintAnnKey - HiLink splintCase splintAnnKey - HiLink splintBreak splintAnnKey - HiLink splintUnreach splintAnnKey - HiLink splintSpecFunc splintAnnKey - HiLink splintErrSupp splintAnnKey - HiLink splintTypeAcc splintAnnKey - HiLink splintMacro splintAnnKey - HiLink splintSpecType splintAnnKey - HiLink splintAnnKey Type - HiLink splintError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink splintShortAnn splintAnnotation +HiLink splintAnnotation Comment +HiLink splintAnnError splintError +HiLink splintAnnError2 splintError +HiLink splintFlag SpecialComment +HiLink splintGlobalFlag splintError +HiLink splintSpecialAnnot splintAnnKey +HiLink splintStateAnnot splintAnnKey +HiLink splintSpecTag splintAnnKey +HiLink splintModifies splintAnnKey +HiLink splintRequires splintAnnKey +HiLink splintGlobals splintAnnKey +HiLink splintGlobitem Constant +HiLink splintGlobannot splintAnnKey +HiLink splintWarning splintAnnKey +HiLink splintModitem Constant +HiLink splintIter splintAnnKey +HiLink splintConst splintAnnKey +HiLink splintAlt splintAnnKey +HiLink splintType splintAnnKey +HiLink splintGlobalType splintAnnKey +HiLink splintMemMgm splintAnnKey +HiLink splintAlias splintAnnKey +HiLink splintExposure splintAnnKey +HiLink splintDefState splintAnnKey +HiLink splintGlobState splintAnnKey +HiLink splintNullState splintAnnKey +HiLink splintNullPred splintAnnKey +HiLink splintExit splintAnnKey +HiLink splintExec splintAnnKey +HiLink splintSef splintAnnKey +HiLink splintDecl splintAnnKey +HiLink splintCase splintAnnKey +HiLink splintBreak splintAnnKey +HiLink splintUnreach splintAnnKey +HiLink splintSpecFunc splintAnnKey +HiLink splintErrSupp splintAnnKey +HiLink splintTypeAcc splintAnnKey +HiLink splintMacro splintAnnKey +HiLink splintSpecType splintAnnKey +HiLink splintAnnKey Type +HiLink splintError Error + +delcommand HiLink let b:current_syntax = "splint" diff --git a/runtime/syntax/spup.vim b/runtime/syntax/spup.vim index 07e9708ea..a07262944 100644 --- a/runtime/syntax/spup.vim +++ b/runtime/syntax/spup.vim @@ -17,11 +17,8 @@ " If you encounter problems or have questions or suggestions, mail me " Remove old syntax stuff -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -206,74 +203,66 @@ syn sync match spupSyncTitle grouphere spupTitle "^TITLE" syn sync match spupSyncUnit grouphere spupUnit "^UNIT" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_spup_syn_inits") - if version < 508 - let did_spup_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink spupCdi spupSection - HiLink spupConditions spupSection - HiLink spupDeclare spupSection - HiLink spupEstimation spupSection - HiLink spupExternal spupSection - HiLink spupFlowsheet spupSection - HiLink spupFunction spupSection - HiLink spupGlobal spupSection - HiLink spupHomotopy spupSection - HiLink spupMacro spupSection - HiLink spupModel spupSection - HiLink spupOperation spupSection - HiLink spupOptions spupSection - HiLink spupProcedure spupSection - HiLink spupProfiles spupSection - HiLink spupReport spupSection - HiLink spupTitle spupConstant " this is correct, truly ;) - HiLink spupUnit spupSection +HiLink spupCdi spupSection +HiLink spupConditions spupSection +HiLink spupDeclare spupSection +HiLink spupEstimation spupSection +HiLink spupExternal spupSection +HiLink spupFlowsheet spupSection +HiLink spupFunction spupSection +HiLink spupGlobal spupSection +HiLink spupHomotopy spupSection +HiLink spupMacro spupSection +HiLink spupModel spupSection +HiLink spupOperation spupSection +HiLink spupOptions spupSection +HiLink spupProcedure spupSection +HiLink spupProfiles spupSection +HiLink spupReport spupSection +HiLink spupTitle spupConstant " this is correct, truly ;) +HiLink spupUnit spupSection - HiLink spupCdiSubs spupSubs - HiLink spupConditionsSubs spupSubs - HiLink spupDeclareSubs spupSubs - HiLink spupEstimationSubs spupSubs - HiLink spupExternalSubs spupSubs - HiLink spupFlowsheetSubs spupSubs - HiLink spupFunctionSubs spupSubs - HiLink spupHomotopySubs spupSubs - HiLink spupMacroSubs spupSubs - HiLink spupModelSubs spupSubs - HiLink spupOperationSubs spupSubs - HiLink spupOptionsSubs spupSubs - HiLink spupProcedureSubs spupSubs - HiLink spupReportSubs spupSubs - HiLink spupUnitSubs spupSubs +HiLink spupCdiSubs spupSubs +HiLink spupConditionsSubs spupSubs +HiLink spupDeclareSubs spupSubs +HiLink spupEstimationSubs spupSubs +HiLink spupExternalSubs spupSubs +HiLink spupFlowsheetSubs spupSubs +HiLink spupFunctionSubs spupSubs +HiLink spupHomotopySubs spupSubs +HiLink spupMacroSubs spupSubs +HiLink spupModelSubs spupSubs +HiLink spupOperationSubs spupSubs +HiLink spupOptionsSubs spupSubs +HiLink spupProcedureSubs spupSubs +HiLink spupReportSubs spupSubs +HiLink spupUnitSubs spupSubs - HiLink spupCode Normal - HiLink spupComment Comment - HiLink spupComment2 spupComment - HiLink spupConditional Statement - HiLink spupConstant Constant - HiLink spupError Error - HiLink spupHelp Normal - HiLink spupIdentifier Identifier - HiLink spupNumber Constant - HiLink spupOperator Special - HiLink spupOpenBrace spupError - HiLink spupSection Statement - HiLink spupSpecial spupTextprocGeneric - HiLink spupStreams Type - HiLink spupString Constant - HiLink spupSubs Statement - HiLink spupSymbol Special - HiLink spupTextprocError Normal - HiLink spupTextprocGeneric PreProc - HiLink spupTypes Type +HiLink spupCode Normal +HiLink spupComment Comment +HiLink spupComment2 spupComment +HiLink spupConditional Statement +HiLink spupConstant Constant +HiLink spupError Error +HiLink spupHelp Normal +HiLink spupIdentifier Identifier +HiLink spupNumber Constant +HiLink spupOperator Special +HiLink spupOpenBrace spupError +HiLink spupSection Statement +HiLink spupSpecial spupTextprocGeneric +HiLink spupStreams Type +HiLink spupString Constant +HiLink spupSubs Statement +HiLink spupSymbol Special +HiLink spupTextprocError Normal +HiLink spupTextprocGeneric PreProc +HiLink spupTypes Type - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "spup" diff --git a/runtime/syntax/spyce.vim b/runtime/syntax/spyce.vim index e76cb1a1a..169de199d 100644 --- a/runtime/syntax/spyce.vim +++ b/runtime/syntax/spyce.vim @@ -4,11 +4,8 @@ " URL: http://spyce.sourceforge.net " Last Change: 2009 Nov 11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -20,13 +17,9 @@ endif " Read the HTML syntax to start with let b:did_indent = 1 " don't perform HTML indentation! let html_no_rendering = 1 " do not render <b>,<i>, etc... -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax - syntax spell default " added by Bram -endif +runtime! syntax/html.vim +unlet b:current_syntax +syntax spell default " added by Bram " include python syn include @Python <sfile>:p:h/python.vim diff --git a/runtime/syntax/sql.vim b/runtime/syntax/sql.vim index 7ba20f344..6de3f4a5c 100644 --- a/runtime/syntax/sql.vim +++ b/runtime/syntax/sql.vim @@ -10,11 +10,8 @@ " If the above exist, it will source the type specified. " If none exist, it will source the default sql.vim file. " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/sqlanywhere.vim b/runtime/syntax/sqlanywhere.vim index 05b05c9f4..e91a99de6 100644 --- a/runtime/syntax/sqlanywhere.vim +++ b/runtime/syntax/sqlanywhere.vim @@ -12,11 +12,8 @@ " Updated to Adaptive Server Anywhere 9.0.1 " Updated to Adaptive Server Anywhere 9.0.0 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/sqlforms.vim b/runtime/syntax/sqlforms.vim index 055b2ae87..358349c46 100644 --- a/runtime/syntax/sqlforms.vim +++ b/runtime/syntax/sqlforms.vim @@ -7,21 +7,14 @@ " " TODO Find a new maintainer who knows SQL*Forms. - " For version 5.x, clear all syntax items. - " For version 6.x, quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif syntax case ignore -if version >= 600 - setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> -else - set iskeyword=a-z,A-Z,48-57,_,.,-,> -endif +setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> " The SQL reserved words, defined as keywords. @@ -138,30 +131,23 @@ syntax match sqlNumber "-\=\<[0-9]*\.\=[0-9_]\>" syntax sync ccomment sqlComment -if version >= 508 || !exists("did_sqlforms_syn_inits") - if version < 508 - let did_sqlforms_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sqlComment Comment - HiLink sqlKeyword Statement - HiLink sqlNumber Number - HiLink sqlOperator Statement - HiLink sqlProcedure Statement - HiLink sqlFunction Statement - HiLink sqlSystem Identifier - HiLink sqlSpecial Special - HiLink sqlStatement Statement - HiLink sqlString String - HiLink sqlType Type - HiLink sqlCodes Identifier - HiLink sqlTriggers PreProc - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink sqlComment Comment +HiLink sqlKeyword Statement +HiLink sqlNumber Number +HiLink sqlOperator Statement +HiLink sqlProcedure Statement +HiLink sqlFunction Statement +HiLink sqlSystem Identifier +HiLink sqlSpecial Special +HiLink sqlStatement Statement +HiLink sqlString String +HiLink sqlType Type +HiLink sqlCodes Identifier +HiLink sqlTriggers PreProc + +delcommand HiLink let b:current_syntax = "sqlforms" diff --git a/runtime/syntax/sqlhana.vim b/runtime/syntax/sqlhana.vim index 1410e99eb..2e334bb56 100644 --- a/runtime/syntax/sqlhana.vim +++ b/runtime/syntax/sqlhana.vim @@ -7,11 +7,8 @@ " Description: Updated to SAP HANA SP4 " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/sqlinformix.vim b/runtime/syntax/sqlinformix.vim index b4d023600..20a88acf4 100644 --- a/runtime/syntax/sqlinformix.vim +++ b/runtime/syntax/sqlinformix.vim @@ -4,11 +4,8 @@ " Maintainer: Dean Hill <dhill@hotmail.com> " Last Change: 2004 Aug 30 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -154,43 +151,35 @@ syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_sql_syn_inits") - if version < 508 - let did_sql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - " === Comment syntax group === - HiLink sqlComment Comment - - " === Constant syntax group === - HiLink sqlNumber Number - HiLink sqlBoolean Boolean - HiLink sqlString String - - " === Statment syntax group === - HiLink sqlStatement Statement - HiLink sqlConditional Conditional - HiLink sqlRepeat Repeat - HiLink sqlKeyword Keyword - HiLink sqlOperator Operator - HiLink sqlException Exception - - " === Identifier syntax group === - HiLink sqlFunction Function - - " === Type syntax group === - HiLink sqlType Type - - " === Todo syntax group === - HiLink sqlTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + + +" === Comment syntax group === +HiLink sqlComment Comment + +" === Constant syntax group === +HiLink sqlNumber Number +HiLink sqlBoolean Boolean +HiLink sqlString String + +" === Statment syntax group === +HiLink sqlStatement Statement +HiLink sqlConditional Conditional +HiLink sqlRepeat Repeat +HiLink sqlKeyword Keyword +HiLink sqlOperator Operator +HiLink sqlException Exception + +" === Identifier syntax group === +HiLink sqlFunction Function + +" === Type syntax group === +HiLink sqlType Type + +" === Todo syntax group === +HiLink sqlTodo Todo + +delcommand HiLink let b:current_syntax = "sqlinformix" diff --git a/runtime/syntax/sqlj.vim b/runtime/syntax/sqlj.vim index 51398ef9c..ea8d7ecb6 100644 --- a/runtime/syntax/sqlj.vim +++ b/runtime/syntax/sqlj.vim @@ -8,10 +8,8 @@ " au BufNewFile,BufRead *.sqlj so $VIM/syntax/sqlj.vim -" Remove any old syntax stuff hanging around -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -76,27 +74,20 @@ syn match sqlComment "--.*" syn sync ccomment sqljComment -if version >= 508 || !exists("did_sqlj_syn_inits") - if version < 508 - let did_sqlj_syn_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later. - HiLink sqljComment Comment - HiLink sqljKeyword sqljSpecial - HiLink sqljNumber Number - HiLink sqljOperator sqljStatement - HiLink sqljSpecial Special - HiLink sqljStatement Statement - HiLink sqljString String - HiLink sqljType Type - HiLink sqljPre PreProc - - delcommand HiLink -endif +command! -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later. +HiLink sqljComment Comment +HiLink sqljKeyword sqljSpecial +HiLink sqljNumber Number +HiLink sqljOperator sqljStatement +HiLink sqljSpecial Special +HiLink sqljStatement Statement +HiLink sqljString String +HiLink sqljType Type +HiLink sqljPre PreProc + +delcommand HiLink let b:current_syntax = "sqlj" diff --git a/runtime/syntax/sqr.vim b/runtime/syntax/sqr.vim index 8c9e7b49e..7e7344357 100644 --- a/runtime/syntax/sqr.vim +++ b/runtime/syntax/sqr.vim @@ -16,19 +16,12 @@ " http://lanzarotta.tripod.com/vim.html " jefflanzarotta at yahoo dot com -" For version 5.x, clear all syntax items. -" For version 6.x, quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif -if version >= 600 - setlocal iskeyword=@,48-57,_,-,#,$,{,} -else - set iskeyword=@,48-57,_,-,#,$,{,} -endif +setlocal iskeyword=@,48-57,_,-,#,$,{,} syn case ignore @@ -220,75 +213,51 @@ syn match sqrNumber /-\=\<\d*\.\=[0-9_]\>/ syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE ### syn match sqrTodo /???/ -if version >= 600 - " See also the sqrString section above for handling of ! characters - " inside of strings. (Those patterns override the ones below.) - syn match sqrComment /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo - " the ! can't be preceded by another !, - " and must be followed by at least one - " character other than ! or =, or immediately - " by the end-of-line - syn match sqrComment /^!=.*/ contains=sqrTodo - syn match sqrComment /^!!.*/ contains=sqrTodo - syn match sqrError /^\s\+\zs!=.*/ - " it's an error to have "!=" preceded by - " just whitespace on the line ("!=" - " preceded by non-whitespace is treated - " as neither a comment nor an error, since - " it is often correct, i.e. - " if #count != 7 - syn match sqrError /.\+\zs!!.*/ - " a "!!" anywhere but at the beginning of - " the line is always an error -else "For versions before 6.0, same idea as above but we are limited - "to simple patterns only. Also, the sqrString patterns above - "don't seem to take precedence in v5 as they do in v6, so - "we split the last rule to ignore comments found inside of - "string literals. - syn match sqrComment /!\([^!=].*\|$\)/ contains=sqrTodo - syn match sqrComment /^!=.*/ contains=sqrTodo - syn match sqrComment /^!!.*/ contains=sqrTodo - syn match sqrError /^\s\+!=.*/ - syn match sqrError /^[^'!]\+!!/ - " flag !! on lines that don't have ! or ' - syn match sqrError /^\([^!']*'[^']*'[^!']*\)\+!!/ - " flag !! found after matched ' ' chars - " (that aren't also commented) -endif +" See also the sqrString section above for handling of ! characters +" inside of strings. (Those patterns override the ones below.) +syn match sqrComment /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo +" the ! can't be preceded by another !, +" and must be followed by at least one +" character other than ! or =, or immediately +" by the end-of-line +syn match sqrComment /^!=.*/ contains=sqrTodo +syn match sqrComment /^!!.*/ contains=sqrTodo +syn match sqrError /^\s\+\zs!=.*/ +" it's an error to have "!=" preceded by +" just whitespace on the line ("!=" +" preceded by non-whitespace is treated +" as neither a comment nor an error, since +" it is often correct, i.e. +" if #count != 7 +syn match sqrError /.\+\zs!!.*/ +" a "!!" anywhere but at the beginning of +" the line is always an error " Define the default highlighting. -" For version 5.7 and earlier, only when not done already. -" For version 5.8 and later, only when an item doesn't have highlighting yet. -if version >= 508 || !exists("did_sqr_syn_inits") - if version < 508 - let did_sqr_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sqrSection Statement - HiLink sqrParagraph Statement - HiLink sqrReserved Statement - HiLink sqrParameter Statement - HiLink sqrPreProc PreProc - HiLink sqrSubstVar PreProc - HiLink sqrCommand Statement - HiLink sqrParam Type - HiLink sqrFunction Special - - HiLink sqrString String - HiLink sqrStrOpen Todo - HiLink sqrNumber Number - HiLink sqrVariable Identifier - - HiLink sqrComment Comment - HiLink sqrTodo Todo - HiLink sqrError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet. +command -nargs=+ HiLink hi def link <args> + +HiLink sqrSection Statement +HiLink sqrParagraph Statement +HiLink sqrReserved Statement +HiLink sqrParameter Statement +HiLink sqrPreProc PreProc +HiLink sqrSubstVar PreProc +HiLink sqrCommand Statement +HiLink sqrParam Type +HiLink sqrFunction Special + +HiLink sqrString String +HiLink sqrStrOpen Todo +HiLink sqrNumber Number +HiLink sqrVariable Identifier + +HiLink sqrComment Comment +HiLink sqrTodo Todo +HiLink sqrError Error + +delcommand HiLink let b:current_syntax = "sqr" diff --git a/runtime/syntax/squid.vim b/runtime/syntax/squid.vim index a8462bbdc..ee2b854ad 100644 --- a/runtime/syntax/squid.vim +++ b/runtime/syntax/squid.vim @@ -7,11 +7,8 @@ " Michael Dotzler <Michael.Dotzler@leoni.com> -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -123,30 +120,22 @@ syn match squidRegexOpt contained "\(^\s*acl\s\+\S\+\s\+\S\+\(_regex\|_mime_type syn sync minlines=3 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_squid_syntax_inits") - if version < 508 - let did_squid_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink squidTodo Todo - HiLink squidComment Comment - HiLink squidTag Special - HiLink squidConf Keyword - HiLink squidOpt Constant - HiLink squidAction String - HiLink squidNumber Number - HiLink squidIP Number - HiLink squidAcl Keyword - HiLink squidStr String - HiLink squidRegexOpt Special +HiLink squidTodo Todo +HiLink squidComment Comment +HiLink squidTag Special +HiLink squidConf Keyword +HiLink squidOpt Constant +HiLink squidAction String +HiLink squidNumber Number +HiLink squidIP Number +HiLink squidAcl Keyword +HiLink squidStr String +HiLink squidRegexOpt Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "squid" diff --git a/runtime/syntax/srec.vim b/runtime/syntax/srec.vim index 19b6d9742..834cec7ba 100644 --- a/runtime/syntax/srec.vim +++ b/runtime/syntax/srec.vim @@ -24,11 +24,8 @@ " States in parentheses in the upper format description indicate that they " should not appear in a valid file. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -63,33 +60,25 @@ syn match srecDataUnexpected "[0-9a-fA-F]\{2}" contained nextgroup=srecDataUnexp syn match srecChecksum "[0-9a-fA-F]\{2}$" contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_srec_syntax_inits") - if version < 508 - let did_srec_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " The default methods for highlighting. Can be overridden later - HiLink srecRecStart srecRecType - HiLink srecRecTypeUnknown srecRecType - HiLink srecRecType WarningMsg - HiLink srecByteCount Constant - hi def srecAddressFieldUnknown term=italic cterm=italic gui=italic - HiLink srecNoAddress DiffAdd - HiLink srecDataAddress Comment - HiLink srecRecCount srecNoAddress - HiLink srecStartAddress srecDataAddress - hi def srecDataOdd term=bold cterm=bold gui=bold - hi def srecDataEven term=NONE cterm=NONE gui=NONE - HiLink srecDataUnexpected Error - HiLink srecChecksum DiffChange +" The default methods for highlighting. Can be overridden later +HiLink srecRecStart srecRecType +HiLink srecRecTypeUnknown srecRecType +HiLink srecRecType WarningMsg +HiLink srecByteCount Constant +hi def srecAddressFieldUnknown term=italic cterm=italic gui=italic +HiLink srecNoAddress DiffAdd +HiLink srecDataAddress Comment +HiLink srecRecCount srecNoAddress +HiLink srecStartAddress srecDataAddress +hi def srecDataOdd term=bold cterm=bold gui=bold +hi def srecDataEven term=NONE cterm=NONE gui=NONE +HiLink srecDataUnexpected Error +HiLink srecChecksum DiffChange - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "srec" diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim index 302d073f1..051b2f9a8 100644 --- a/runtime/syntax/sshconfig.vim +++ b/runtime/syntax/sshconfig.vim @@ -10,19 +10,12 @@ " " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 " case on @@ -233,40 +226,33 @@ syn keyword sshconfigKeyword VisualHostKey syn keyword sshconfigKeyword XAuthLocation " Define the default highlighting -if version >= 508 || !exists("did_sshconfig_syntax_inits") - if version < 508 - let did_sshconfig_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink sshconfigComment Comment - HiLink sshconfigTodo Todo - HiLink sshconfigHostPort sshconfigConstant - HiLink sshconfigNumber sshconfigConstant - HiLink sshconfigConstant Constant - HiLink sshconfigYesNo sshconfigEnum - HiLink sshconfigCipher sshconfigEnum - HiLink sshconfigCiphers sshconfigEnum - HiLink sshconfigMAC sshconfigEnum - HiLink sshconfigHostKeyAlgo sshconfigEnum - HiLink sshconfigLogLevel sshconfigEnum - HiLink sshconfigSysLogFacility sshconfigEnum - HiLink sshconfigAddressFamily sshconfigEnum - HiLink sshconfigIPQoS sshconfigEnum - HiLink sshconfigKbdInteractive sshconfigEnum - HiLink sshconfigKexAlgo sshconfigEnum - HiLink sshconfigTunnel sshconfigEnum - HiLink sshconfigPreferredAuth sshconfigEnum - HiLink sshconfigVar sshconfigEnum - HiLink sshconfigEnum Identifier - HiLink sshconfigSpecial Special - HiLink sshconfigKeyword Keyword - HiLink sshconfigHostSect Type - HiLink sshconfigMatch Type - delcommand HiLink -endif +HiLink sshconfigComment Comment +HiLink sshconfigTodo Todo +HiLink sshconfigHostPort sshconfigConstant +HiLink sshconfigNumber sshconfigConstant +HiLink sshconfigConstant Constant +HiLink sshconfigYesNo sshconfigEnum +HiLink sshconfigCipher sshconfigEnum +HiLink sshconfigCiphers sshconfigEnum +HiLink sshconfigMAC sshconfigEnum +HiLink sshconfigHostKeyAlgo sshconfigEnum +HiLink sshconfigLogLevel sshconfigEnum +HiLink sshconfigSysLogFacility sshconfigEnum +HiLink sshconfigAddressFamily sshconfigEnum +HiLink sshconfigIPQoS sshconfigEnum +HiLink sshconfigKbdInteractive sshconfigEnum +HiLink sshconfigKexAlgo sshconfigEnum +HiLink sshconfigTunnel sshconfigEnum +HiLink sshconfigPreferredAuth sshconfigEnum +HiLink sshconfigVar sshconfigEnum +HiLink sshconfigEnum Identifier +HiLink sshconfigSpecial Special +HiLink sshconfigKeyword Keyword +HiLink sshconfigHostSect Type +HiLink sshconfigMatch Type +delcommand HiLink let b:current_syntax = "sshconfig" diff --git a/runtime/syntax/sshdconfig.vim b/runtime/syntax/sshdconfig.vim index 6b7b98d89..28b8acaf6 100644 --- a/runtime/syntax/sshdconfig.vim +++ b/runtime/syntax/sshdconfig.vim @@ -11,19 +11,12 @@ " " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 " case on @@ -239,43 +232,36 @@ syn keyword sshdconfigKeyword XAuthLocation " Define the default highlighting -if version >= 508 || !exists("did_sshdconfig_syntax_inits") - if version < 508 - let did_sshdconfig_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sshdconfigComment Comment - HiLink sshdconfigTodo Todo - HiLink sshdconfigHostPort sshdconfigConstant - HiLink sshdconfigTime sshdconfigConstant - HiLink sshdconfigNumber sshdconfigConstant - HiLink sshdconfigConstant Constant - HiLink sshdconfigYesNo sshdconfigEnum - HiLink sshdconfigAddressFamily sshdconfigEnum - HiLink sshdconfigPrivilegeSeparation sshdconfigEnum - HiLink sshdconfigTcpForwarding sshdconfigEnum - HiLink sshdconfigRootLogin sshdconfigEnum - HiLink sshdconfigCiphers sshdconfigEnum - HiLink sshdconfigMAC sshdconfigEnum - HiLink sshdconfigHostKeyAlgo sshdconfigEnum - HiLink sshdconfigRootLogin sshdconfigEnum - HiLink sshdconfigLogLevel sshdconfigEnum - HiLink sshdconfigSysLogFacility sshdconfigEnum - HiLink sshdconfigVar sshdconfigEnum - HiLink sshdconfigCompression sshdconfigEnum - HiLink sshdconfigIPQoS sshdconfigEnum - HiLink sshdconfigKexAlgo sshdconfigEnum - HiLink sshdconfigTunnel sshdconfigEnum - HiLink sshdconfigSubsystem sshdconfigEnum - HiLink sshdconfigEnum Function - HiLink sshdconfigSpecial Special - HiLink sshdconfigKeyword Keyword - HiLink sshdconfigMatch Type - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink sshdconfigComment Comment +HiLink sshdconfigTodo Todo +HiLink sshdconfigHostPort sshdconfigConstant +HiLink sshdconfigTime sshdconfigConstant +HiLink sshdconfigNumber sshdconfigConstant +HiLink sshdconfigConstant Constant +HiLink sshdconfigYesNo sshdconfigEnum +HiLink sshdconfigAddressFamily sshdconfigEnum +HiLink sshdconfigPrivilegeSeparation sshdconfigEnum +HiLink sshdconfigTcpForwarding sshdconfigEnum +HiLink sshdconfigRootLogin sshdconfigEnum +HiLink sshdconfigCiphers sshdconfigEnum +HiLink sshdconfigMAC sshdconfigEnum +HiLink sshdconfigHostKeyAlgo sshdconfigEnum +HiLink sshdconfigRootLogin sshdconfigEnum +HiLink sshdconfigLogLevel sshdconfigEnum +HiLink sshdconfigSysLogFacility sshdconfigEnum +HiLink sshdconfigVar sshdconfigEnum +HiLink sshdconfigCompression sshdconfigEnum +HiLink sshdconfigIPQoS sshdconfigEnum +HiLink sshdconfigKexAlgo sshdconfigEnum +HiLink sshdconfigTunnel sshdconfigEnum +HiLink sshdconfigSubsystem sshdconfigEnum +HiLink sshdconfigEnum Function +HiLink sshdconfigSpecial Special +HiLink sshdconfigKeyword Keyword +HiLink sshdconfigMatch Type +delcommand HiLink let b:current_syntax = "sshdconfig" diff --git a/runtime/syntax/st.vim b/runtime/syntax/st.vim index 47aa07de5..1071caa7b 100644 --- a/runtime/syntax/st.vim +++ b/runtime/syntax/st.vim @@ -3,11 +3,8 @@ " Maintainer: Arndt Hesse <hesse@self.de> " Last Change: 2012 Feb 12 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -77,30 +74,22 @@ hi link stBlockError stError syn sync minlines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_st_syntax_inits") - if version < 508 - let did_st_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink stKeyword Statement - HiLink stMethod Statement - HiLink stComment Comment - HiLink stCharacter Constant - HiLink stString Constant - HiLink stSymbol Special - HiLink stNumber Type - HiLink stFloat Type - HiLink stError Error - HiLink stLocalVariables Identifier - HiLink stBlockVariable Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink stKeyword Statement +HiLink stMethod Statement +HiLink stComment Comment +HiLink stCharacter Constant +HiLink stString Constant +HiLink stSymbol Special +HiLink stNumber Type +HiLink stFloat Type +HiLink stError Error +HiLink stLocalVariables Identifier +HiLink stBlockVariable Identifier + +delcommand HiLink let b:current_syntax = "st" diff --git a/runtime/syntax/stata.vim b/runtime/syntax/stata.vim index e1f19c84f..29f5052eb 100644 --- a/runtime/syntax/stata.vim +++ b/runtime/syntax/stata.vim @@ -12,9 +12,8 @@ " 26apr2006 fixed brace confusion in stataErrInParen and stataErrInBracket " fixed paren/bracket confusion in stataFuncGroup -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/stp.vim b/runtime/syntax/stp.vim index f4f0f3b61..fbd659682 100644 --- a/runtime/syntax/stp.vim +++ b/runtime/syntax/stp.vim @@ -4,11 +4,8 @@ " URL: http://lanzarotta.tripod.com/vim/syntax/stp.vim.zip " Last Change: March 05, 2002 -" For version 5.x, clear all syntax items. -" For version 6.x, quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -131,36 +128,28 @@ syn match stpParenError ")" syn sync minlines=10 maxlines=100 " Define the default highlighting. -" For version 5.x and earlier, only when not done already. -" For version 5.8 and later, only when and item doesn't have highlighting yet. -if version >= 508 || !exists("did_stp_syn_inits") - if version < 508 - let did_stp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink stpConditional Conditional - HiLink stpComment Comment - HiLink stpKeyword Keyword - HiLink stpNumber Number - HiLink stpOperator Operator - HiLink stpSpecial Special - HiLink stpStatement Statement - HiLink stpString String - HiLink stpStringError Error - HiLink stpType Type - HiLink stpTodo Todo - HiLink stpFunction Function - HiLink stpGlobals Macro - HiLink stpParen Normal - HiLink stpParenError Error - HiLink stpSQLKeyword Function - HiLink stpRepeat Repeat - - delcommand HiLink -endif +" Only when and item doesn't have highlighting yet. +command -nargs=+ HiLink hi def link <args> + +HiLink stpConditional Conditional +HiLink stpComment Comment +HiLink stpKeyword Keyword +HiLink stpNumber Number +HiLink stpOperator Operator +HiLink stpSpecial Special +HiLink stpStatement Statement +HiLink stpString String +HiLink stpStringError Error +HiLink stpType Type +HiLink stpTodo Todo +HiLink stpFunction Function +HiLink stpGlobals Macro +HiLink stpParen Normal +HiLink stpParenError Error +HiLink stpSQLKeyword Function +HiLink stpRepeat Repeat + +delcommand HiLink let b:current_syntax = "stp" diff --git a/runtime/syntax/strace.vim b/runtime/syntax/strace.vim index 0f686fd80..45b70071a 100644 --- a/runtime/syntax/strace.vim +++ b/runtime/syntax/strace.vim @@ -5,12 +5,9 @@ " Last Change: 2015-01-16 " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -35,31 +32,24 @@ syn match straceOperator "[-+=*/!%&|:,]" syn region straceComment start="/\*" end="\*/" oneline " Define the default highlighting -if version >= 508 || !exists("did_strace_syntax_inits") - if version < 508 - let did_strace_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink straceComment Comment - HiLink straceVerbosed Comment - HiLink stracePID PreProc - HiLink straceNumber Number - HiLink straceNumberRHS Type - HiLink straceOtherRHS Type - HiLink straceString String - HiLink straceConstant Function - HiLink straceEquals Type - HiLink straceSysCallEmbed straceSysCall - HiLink straceSysCall Statement - HiLink straceParenthesis Statement - HiLink straceOperator Normal - HiLink straceSpecialChar Special - HiLink straceOtherPID PreProc +HiLink straceComment Comment +HiLink straceVerbosed Comment +HiLink stracePID PreProc +HiLink straceNumber Number +HiLink straceNumberRHS Type +HiLink straceOtherRHS Type +HiLink straceString String +HiLink straceConstant Function +HiLink straceEquals Type +HiLink straceSysCallEmbed straceSysCall +HiLink straceSysCall Statement +HiLink straceParenthesis Statement +HiLink straceOperator Normal +HiLink straceSpecialChar Special +HiLink straceOtherPID PreProc - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "strace" diff --git a/runtime/syntax/svn.vim b/runtime/syntax/svn.vim index 6536d6d11..8b8375389 100644 --- a/runtime/syntax/svn.vim +++ b/runtime/syntax/svn.vim @@ -15,11 +15,8 @@ " Myk Taylor " Stefano Zacchiroli -" For version 5.x: Clear all syntax items. -" For version 6.x: Quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded. +if exists("b:current_syntax") finish endif @@ -42,28 +39,20 @@ syn sync clear syn sync match svnSync grouphere svnRegion "^--.*--$"me=s-1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already. -" For version 5.8 and later: only when an item doesn't have highlighting yet. -if version >= 508 || !exists("did_svn_syn_inits") - if version <= 508 - let did_svn_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet. +command -nargs=+ HiLink hi def link <args> - HiLink svnSummary Keyword - HiLink svnBlank Error +HiLink svnSummary Keyword +HiLink svnBlank Error - HiLink svnRegion Comment - HiLink svnDelimiter NonText - HiLink svnRemoved Constant - HiLink svnAdded Identifier - HiLink svnModified Special - HiLink svnProperty Special - HiLink svnRenamed Special +HiLink svnRegion Comment +HiLink svnDelimiter NonText +HiLink svnRemoved Constant +HiLink svnAdded Identifier +HiLink svnModified Special +HiLink svnProperty Special +HiLink svnRenamed Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "svn" diff --git a/runtime/syntax/systemverilog.vim b/runtime/syntax/systemverilog.vim index 5bf293507..94074bd08 100644 --- a/runtime/syntax/systemverilog.vim +++ b/runtime/syntax/systemverilog.vim @@ -3,21 +3,14 @@ " Maintainer: kocha <kocha.lsifrontend@gmail.com> " Last Change: 12-Aug-2013. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read in Verilog syntax files -if version < 600 - so <sfile>:p:h/verilog.vim -else - runtime! syntax/verilog.vim - unlet b:current_syntax -endif +runtime! syntax/verilog.vim +unlet b:current_syntax " IEEE1800-2005 syn keyword systemverilogStatement always_comb always_ff always_latch @@ -76,25 +69,18 @@ syn keyword systemverilogStatement implements syn keyword systemverilogStatement interconnect soft nettype " Define the default highlighting. -if version >= 508 || !exists("did_systemverilog_syn_inits") - if version < 508 - let did_systemverilog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - " The default highlighting. - HiLink systemverilogStatement Statement - HiLink systemverilogTypeDef TypeDef - HiLink systemverilogConditional Conditional - HiLink systemverilogRepeat Repeat - HiLink systemverilogLabel Label - HiLink systemverilogGlobal Define - HiLink systemverilogNumber Number +" The default highlighting. +HiLink systemverilogStatement Statement +HiLink systemverilogTypeDef TypeDef +HiLink systemverilogConditional Conditional +HiLink systemverilogRepeat Repeat +HiLink systemverilogLabel Label +HiLink systemverilogGlobal Define +HiLink systemverilogNumber Number - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "systemverilog" diff --git a/runtime/syntax/tads.vim b/runtime/syntax/tads.vim index 260ff360f..0f63bea2f 100644 --- a/runtime/syntax/tads.vim +++ b/runtime/syntax/tads.vim @@ -13,11 +13,8 @@ " Actually, should cvtstr etc. be functions?! (change tadsFunction) " Make global etc. into Identifiers, since we don't have regular variables? -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -122,57 +119,49 @@ endif execute "syn sync maxlines=" . tads_sync_dist " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tads_syn_inits") - if version < 508 - let did_tads_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink tadsFunctionDef Function - HiLink tadsFunction Structure - HiLink tadsClass Structure - HiLink tadsClassDef Identifier - HiLink tadsObjectDef Identifier +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +HiLink tadsFunctionDef Function +HiLink tadsFunction Structure +HiLink tadsClass Structure +HiLink tadsClassDef Identifier +HiLink tadsObjectDef Identifier " no highlight for tadsEmbedded, so it prints as normal text w/in the string - HiLink tadsOperator Operator - HiLink tadsStructure Structure - HiLink tadsTodo Todo - HiLink tadsLabel Label - HiLink tadsConditional Conditional - HiLink tadsRepeat Repeat - HiLink tadsException Exception - HiLink tadsStatement Statement - HiLink tadsStorageClass StorageClass - HiLink tadsKeyWord Keyword - HiLink tadsSpecial SpecialChar - HiLink tadsNumber Number - HiLink tadsBoolean Boolean - HiLink tadsDoubleString tadsString - HiLink tadsSingleString tadsString - - HiLink tadsOctalError tadsError - HiLink tadsCommentError tadsError - HiLink tadsBraceError tadsError - HiLink tadsInBrace tadsError - HiLink tadsError Error - - HiLink tadsInclude Include - HiLink tadsPreProc PreProc - HiLink tadsDefine Macro - HiLink tadsIncluded tadsString - HiLink tadsPreCondit PreCondit - - HiLink tadsString String - HiLink tadsComment Comment - - delcommand HiLink -endif +HiLink tadsOperator Operator +HiLink tadsStructure Structure +HiLink tadsTodo Todo +HiLink tadsLabel Label +HiLink tadsConditional Conditional +HiLink tadsRepeat Repeat +HiLink tadsException Exception +HiLink tadsStatement Statement +HiLink tadsStorageClass StorageClass +HiLink tadsKeyWord Keyword +HiLink tadsSpecial SpecialChar +HiLink tadsNumber Number +HiLink tadsBoolean Boolean +HiLink tadsDoubleString tadsString +HiLink tadsSingleString tadsString + +HiLink tadsOctalError tadsError +HiLink tadsCommentError tadsError +HiLink tadsBraceError tadsError +HiLink tadsInBrace tadsError +HiLink tadsError Error + +HiLink tadsInclude Include +HiLink tadsPreProc PreProc +HiLink tadsDefine Macro +HiLink tadsIncluded tadsString +HiLink tadsPreCondit PreCondit + +HiLink tadsString String +HiLink tadsComment Comment + +delcommand HiLink let b:current_syntax = "tads" diff --git a/runtime/syntax/tags.vim b/runtime/syntax/tags.vim index c86f17a61..a7044c04e 100644 --- a/runtime/syntax/tags.vim +++ b/runtime/syntax/tags.vim @@ -4,11 +4,8 @@ " Version: 4 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -22,25 +19,17 @@ syn match tagComment "^!_TAG_.*$" syn match tagField contained "[a-z]*:" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_drchip_tags_inits") - if version < 508 - let did_drchip_tags_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink tagBaseFile PreProc - HiLink tagComment Comment - HiLink tagDelim Delimiter - HiLink tagField Number - HiLink tagName Identifier - HiLink tagPath PreProc +HiLink tagBaseFile PreProc +HiLink tagComment Comment +HiLink tagDelim Delimiter +HiLink tagField Number +HiLink tagName Identifier +HiLink tagPath PreProc - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "tags" diff --git a/runtime/syntax/tak.vim b/runtime/syntax/tak.vim index 20186db14..b363ea33c 100644 --- a/runtime/syntax/tak.vim +++ b/runtime/syntax/tak.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -32,11 +29,7 @@ syn case ignore let fortran_free_source=1 " Load FORTRAN syntax file -if version < 600 - source <sfile>:p:h/fortran.vim -else - runtime! syntax/fortran.vim -endif +runtime! syntax/fortran.vim unlet b:current_syntax @@ -95,40 +88,32 @@ endif " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tak_syntax_inits") - if version < 508 - let did_tak_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink takMacro Macro - HiLink takOptions Special - HiLink takRoutine Type - HiLink takControl Special - HiLink takSolids Special - HiLink takSolidsArg Statement - HiLink takIdentifier Identifier - - HiLink takFortran PreProc - HiLink takMotran PreProc - - HiLink takComment Comment - HiLink takHeader Typedef - HiLink takIncludeFile Type - HiLink takInteger Number - HiLink takFloat Float - HiLink takScientific Float - - HiLink takEndData Macro - - HiLink takTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink takMacro Macro +HiLink takOptions Special +HiLink takRoutine Type +HiLink takControl Special +HiLink takSolids Special +HiLink takSolidsArg Statement +HiLink takIdentifier Identifier + +HiLink takFortran PreProc +HiLink takMotran PreProc + +HiLink takComment Comment +HiLink takHeader Typedef +HiLink takIncludeFile Type +HiLink takInteger Number +HiLink takFloat Float +HiLink takScientific Float + +HiLink takEndData Macro + +HiLink takTodo Todo + +delcommand HiLink let b:current_syntax = "tak" diff --git a/runtime/syntax/takcmp.vim b/runtime/syntax/takcmp.vim index a94609b32..6faddc264 100644 --- a/runtime/syntax/takcmp.vim +++ b/runtime/syntax/takcmp.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -51,30 +48,22 @@ syn case ignore " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_takcmp_syntax_inits") - if version < 508 - let did_takcmp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink takcmpTitle Type - HiLink takcmpUnit PreProc +HiLink takcmpTitle Type +HiLink takcmpUnit PreProc - HiLink takcmpLabel Statement +HiLink takcmpLabel Statement - HiLink takcmpHeader takHeader +HiLink takcmpHeader takHeader - HiLink takcmpDate Identifier - HiLink takcmpTime Identifier - HiLink takcmpInteger Number - HiLink takcmpFloat Special +HiLink takcmpDate Identifier +HiLink takcmpTime Identifier +HiLink takcmpInteger Number +HiLink takcmpFloat Special - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "takcmp" diff --git a/runtime/syntax/takout.vim b/runtime/syntax/takout.vim index 774353942..ed69ff0a2 100644 --- a/runtime/syntax/takout.vim +++ b/runtime/syntax/takout.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -24,11 +21,7 @@ syn case match " Load TAK syntax file -if version < 600 - source <sfile>:p:h/tak.vim -else - runtime! syntax/tak.vim -endif +runtime! syntax/tak.vim unlet b:current_syntax @@ -70,31 +63,23 @@ syn match takoutError "<<< Error >>>" " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_takout_syntax_inits") - if version < 508 - let did_takout_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink takoutPos Statement - HiLink takoutNeg PreProc - HiLink takoutTitle Type - HiLink takoutFile takIncludeFile - HiLink takoutInteger takInteger - - HiLink takoutSectionDelim Delimiter - HiLink takoutSectionTitle Exception - HiLink takoutHeaderDelim SpecialComment - HiLink takoutLabel Identifier - - HiLink takoutError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink takoutPos Statement +HiLink takoutNeg PreProc +HiLink takoutTitle Type +HiLink takoutFile takIncludeFile +HiLink takoutInteger takInteger + +HiLink takoutSectionDelim Delimiter +HiLink takoutSectionTitle Exception +HiLink takoutHeaderDelim SpecialComment +HiLink takoutLabel Identifier + +HiLink takoutError Error + +delcommand HiLink let b:current_syntax = "takout" diff --git a/runtime/syntax/taskdata.vim b/runtime/syntax/taskdata.vim index b37c70cc1..63a8284ad 100644 --- a/runtime/syntax/taskdata.vim +++ b/runtime/syntax/taskdata.vim @@ -4,11 +4,8 @@ " Updated: Wed Jul 8 19:46:20 EDT 2009 -" For version 5.x: Clear all syntax items. -" For version 6.x: Quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded. +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo diff --git a/runtime/syntax/taskedit.vim b/runtime/syntax/taskedit.vim index 170153c0e..d33ca7865 100644 --- a/runtime/syntax/taskedit.vim +++ b/runtime/syntax/taskedit.vim @@ -4,11 +4,8 @@ " Updated: Wed Jul 8 19:46:32 EDT 2009 -" For version 5.x: Clear all syntax items. -" For version 6.x: Quit when a syntax file was already loaded. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded. +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo diff --git a/runtime/syntax/tasm.vim b/runtime/syntax/tasm.vim index 2f8559610..995e8b49d 100644 --- a/runtime/syntax/tasm.vim +++ b/runtime/syntax/tasm.vim @@ -3,11 +3,8 @@ " Maintaner: FooLman of United Force <foolman@bigfoot.com> " Last Change: 2012 Feb 03 by Thilo Six -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -95,32 +92,24 @@ syn match tasmOct "\<[0-7]\+O\>" syn match tasmBin "\<[01]\+B\>" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tasm_syntax_inits") - if version < 508 - let did_tasm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink tasmString String - HiLink tasmDec Number - HiLink tasmHex Number - HiLink tasmOct Number - HiLink tasmBin Number - HiLink tasmInstruction Keyword - HiLink tasmCoprocInstr Keyword - HiLink tasmMMXInst Keyword - HiLink tasmDirective PreProc - HiLink tasmRegister Identifier - HiLink tasmProctype PreProc - HiLink tasmComment Comment - HiLink tasmLabel Label +HiLink tasmString String +HiLink tasmDec Number +HiLink tasmHex Number +HiLink tasmOct Number +HiLink tasmBin Number +HiLink tasmInstruction Keyword +HiLink tasmCoprocInstr Keyword +HiLink tasmMMXInst Keyword +HiLink tasmDirective PreProc +HiLink tasmRegister Identifier +HiLink tasmProctype PreProc +HiLink tasmComment Comment +HiLink tasmLabel Label - delcommand HiLink -endif +delcommand HiLink let b:curret_syntax = "tasm" diff --git a/runtime/syntax/tcl.vim b/runtime/syntax/tcl.vim index 3c598267d..778b16484 100644 --- a/runtime/syntax/tcl.vim +++ b/runtime/syntax/tcl.vim @@ -10,11 +10,8 @@ " Version: 1.14 " URL: http://bitbucket.org/taylor_venable/metasyntax/src/tip/Config/vim/syntax/tcl.vim -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -238,49 +235,41 @@ syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo "syn sync ccomment tclComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tcl_syntax_inits") - if version < 508 - let did_tcl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tcltkSwitch Special - HiLink tclExpand Special - HiLink tclLabel Label - HiLink tclConditional Conditional - HiLink tclRepeat Repeat - HiLink tclNumber Number - HiLink tclError Error - HiLink tclCommand Statement - HiLink tclProcCommand Type - HiLink tclString String - HiLink tclComment Comment - HiLink tclSpecial Special - HiLink tclTodo Todo - " Below here are the commands and their options. - HiLink tcltkCommandColor Statement - HiLink tcltkWidgetColor Structure - HiLink tclLineContinue WarningMsg +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink tcltkSwitch Special +HiLink tclExpand Special +HiLink tclLabel Label +HiLink tclConditional Conditional +HiLink tclRepeat Repeat +HiLink tclNumber Number +HiLink tclError Error +HiLink tclCommand Statement +HiLink tclProcCommand Type +HiLink tclString String +HiLink tclComment Comment +HiLink tclSpecial Special +HiLink tclTodo Todo +" Below here are the commands and their options. +HiLink tcltkCommandColor Statement +HiLink tcltkWidgetColor Structure +HiLink tclLineContinue WarningMsg if exists('g:tcl_warn_continuation') - HiLink tclNotLineContinue ErrorMsg -endif - HiLink tcltkStringSwitch Special - HiLink tcltkArraySwitch Special - HiLink tcltkLsortSwitch Special - HiLink tcltkPackSwitch Special - HiLink tcltkPackConfSwitch Special - HiLink tcltkMaths Special - HiLink tcltkNamespaceSwitch Special - HiLink tcltkWidgetSwitch Special - HiLink tcltkPackConfColor Identifier - HiLink tclVarRef Identifier - - delcommand HiLink +HiLink tclNotLineContinue ErrorMsg endif +HiLink tcltkStringSwitch Special +HiLink tcltkArraySwitch Special +HiLink tcltkLsortSwitch Special +HiLink tcltkPackSwitch Special +HiLink tcltkPackConfSwitch Special +HiLink tcltkMaths Special +HiLink tcltkNamespaceSwitch Special +HiLink tcltkWidgetSwitch Special +HiLink tcltkPackConfColor Identifier +HiLink tclVarRef Identifier + +delcommand HiLink let b:current_syntax = "tcl" diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index c0982d84d..6cb27ea4b 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -40,11 +40,8 @@ " using conceal mode :help tex-conceal " Version Clears: {{{1 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo @@ -54,14 +51,8 @@ scriptencoding utf-8 " Define the default highlighting. {{{1 " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tex_syntax_inits") - let did_tex_syntax_inits = 1 - if version < 508 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif -endif +let did_tex_syntax_inits = 1 +command -nargs=+ HiLink hi def link <args> " by default, enable all region-based highlighting let s:tex_fast= "bcmMprsSvV" @@ -598,27 +589,17 @@ if s:tex_fast =~# 'v' syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell " listings package: syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell - if version < 600 - syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" contains=@Spell - syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" contains=@Spell + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell else - if b:tex_stylish - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell - else - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell - endif + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell endif else syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" - if version < 600 - syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" - syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" else - if b:tex_stylish - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" - else - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" - endif + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" endif endif endif diff --git a/runtime/syntax/texinfo.vim b/runtime/syntax/texinfo.vim index 134fc6763..ec353bb14 100644 --- a/runtime/syntax/texinfo.vim +++ b/runtime/syntax/texinfo.vim @@ -9,10 +9,8 @@ " since @ can have special meanings, everything is 'match'-ed and 'region'-ed " (including @ in 'iskeyword' option has unexpected effects) -" Remove any old syntax stuff hanging around, if needed -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -356,48 +354,39 @@ syn cluster texinfoReducedAll contains=texinfoSpecialChar,texinfoBrcPrmAtCmd "============================================================================== " highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_texinfo_syn_inits") - - if version < 508 - let did_texinfo_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink texinfoSpecialChar Special - HiLink texinfoHFSpecialChar Special - - HiLink texinfoError Error - HiLink texinfoIdent Identifier - HiLink texinfoAssignment Identifier - HiLink texinfoSinglePar Identifier - HiLink texinfoIndexPar Identifier - HiLink texinfoSIPar Identifier - HiLink texinfoDIEPar Identifier - HiLink texinfoTexCmd PreProc - - - HiLink texinfoAtCmd Statement "@-command - HiLink texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters - "is String because is found as a region and is 'matchgroup'-ed - "to texinfoAtCmd - HiLink texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({}) - "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd - HiLink texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands - HiLink texinfoMltlnAtCmd String "@-command in multiple lines - "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd - HiLink texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) - HiLink texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu) - HiLink texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) - HiLink texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series) - - HiLink texinfoComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink texinfoSpecialChar Special +HiLink texinfoHFSpecialChar Special + +HiLink texinfoError Error +HiLink texinfoIdent Identifier +HiLink texinfoAssignment Identifier +HiLink texinfoSinglePar Identifier +HiLink texinfoIndexPar Identifier +HiLink texinfoSIPar Identifier +HiLink texinfoDIEPar Identifier +HiLink texinfoTexCmd PreProc + + +HiLink texinfoAtCmd Statement "@-command +HiLink texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters + "is String because is found as a region and is 'matchgroup'-ed + "to texinfoAtCmd +HiLink texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({}) + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd +HiLink texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands +HiLink texinfoMltlnAtCmd String "@-command in multiple lines + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd +HiLink texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) +HiLink texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu) +HiLink texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) +HiLink texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series) + +HiLink texinfoComment Comment + +delcommand HiLink let b:current_syntax = "texinfo" diff --git a/runtime/syntax/texmf.vim b/runtime/syntax/texmf.vim index 7b91168f0..4c3ccf8f4 100644 --- a/runtime/syntax/texmf.vim +++ b/runtime/syntax/texmf.vim @@ -6,12 +6,9 @@ " URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -45,42 +42,35 @@ syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLB syn match texmfBraceError "}" " Define the default highlighting -if version >= 508 || !exists("did_texmf_syntax_inits") - if version < 508 - let did_texmf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +command -nargs=+ HiLink hi def link <args> - HiLink texmfComment Comment - HiLink texmfTodo Todo +HiLink texmfComment Comment +HiLink texmfTodo Todo - HiLink texmfPassedParameter texmfVariable - HiLink texmfVariable Identifier +HiLink texmfPassedParameter texmfVariable +HiLink texmfVariable Identifier - HiLink texmfNumber Number - HiLink texmfString String +HiLink texmfNumber Number +HiLink texmfString String - HiLink texmfLHSStart texmfLHS - HiLink texmfLHSVariable texmfLHS - HiLink texmfLHSDot texmfLHS - HiLink texmfLHS Type +HiLink texmfLHSStart texmfLHS +HiLink texmfLHSVariable texmfLHS +HiLink texmfLHSDot texmfLHS +HiLink texmfLHS Type - HiLink texmfEquals Normal +HiLink texmfEquals Normal - HiLink texmfBraceBrace texmfDelimiter - HiLink texmfComma texmfDelimiter - HiLink texmfColons texmfDelimiter - HiLink texmfDelimiter Preproc +HiLink texmfBraceBrace texmfDelimiter +HiLink texmfComma texmfDelimiter +HiLink texmfColons texmfDelimiter +HiLink texmfDelimiter Preproc - HiLink texmfDoubleExclam Statement - HiLink texmfSpecial Special +HiLink texmfDoubleExclam Statement +HiLink texmfSpecial Special - HiLink texmfBraceError texmfError - HiLink texmfError Error +HiLink texmfBraceError texmfError +HiLink texmfError Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "texmf" diff --git a/runtime/syntax/tf.vim b/runtime/syntax/tf.vim index 2a9a99988..9de93dae2 100644 --- a/runtime/syntax/tf.vim +++ b/runtime/syntax/tf.vim @@ -9,11 +9,8 @@ " Remove any old syntax stuff hanging around -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -161,44 +158,36 @@ else endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tf_syn_inits") - if version < 508 - let did_tf_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tfComment Comment - HiLink tfString String - HiLink tfNumber Number - HiLink tfFloat Float - HiLink tfIdentifier Identifier - HiLink tfVar Identifier - HiLink tfWorld Identifier - HiLink tfReadonly Identifier - HiLink tfHook Identifier - HiLink tfFunctions Function - HiLink tfRepeat Repeat - HiLink tfConditional Conditional - HiLink tfLabel Label - HiLink tfStatement Statement - HiLink tfType Type - HiLink tfInclude Include - HiLink tfDefine Define - HiLink tfSpecialChar SpecialChar - HiLink tfSpecialCharEsc SpecialChar - HiLink tfParentError Error - HiLink tfTodo Todo - HiLink tfEndCommand Delimiter - HiLink tfJoinLines Delimiter - HiLink tfOperator Operator - HiLink tfRelation Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink tfComment Comment +HiLink tfString String +HiLink tfNumber Number +HiLink tfFloat Float +HiLink tfIdentifier Identifier +HiLink tfVar Identifier +HiLink tfWorld Identifier +HiLink tfReadonly Identifier +HiLink tfHook Identifier +HiLink tfFunctions Function +HiLink tfRepeat Repeat +HiLink tfConditional Conditional +HiLink tfLabel Label +HiLink tfStatement Statement +HiLink tfType Type +HiLink tfInclude Include +HiLink tfDefine Define +HiLink tfSpecialChar SpecialChar +HiLink tfSpecialCharEsc SpecialChar +HiLink tfParentError Error +HiLink tfTodo Todo +HiLink tfEndCommand Delimiter +HiLink tfJoinLines Delimiter +HiLink tfOperator Operator +HiLink tfRelation Operator + +delcommand HiLink let b:current_syntax = "tf" diff --git a/runtime/syntax/tli.vim b/runtime/syntax/tli.vim index 5685a6cbf..e0e19ab98 100644 --- a/runtime/syntax/tli.vim +++ b/runtime/syntax/tli.vim @@ -4,11 +4,8 @@ " Last Change: 2001 May 10 " Version: 1.0 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -44,27 +41,19 @@ syn match tliComment "#.*" syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tli_syntax_inits") - if version < 508 - let did_tli_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tliNumber Number - HiLink tliString String - HiLink tliComment Comment - HiLink tliSpecial SpecialChar - HiLink tliIdentifier Identifier - HiLink tliObject Statement - HiLink tliField Type - HiLink tliStyle PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink tliNumber Number +HiLink tliString String +HiLink tliComment Comment +HiLink tliSpecial SpecialChar +HiLink tliIdentifier Identifier +HiLink tliObject Statement +HiLink tliField Type +HiLink tliStyle PreProc + +delcommand HiLink let b:current_syntax = "tli" diff --git a/runtime/syntax/tpp.vim b/runtime/syntax/tpp.vim index 050a2ba78..b1ea35f04 100644 --- a/runtime/syntax/tpp.vim +++ b/runtime/syntax/tpp.vim @@ -17,11 +17,8 @@ " the latest version of this file. " SPAM is _NOT_ welcome - be ready to be reported! -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -51,11 +48,7 @@ syn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" if main_syntax != 'sh' " shell command - if version < 600 - syn include @tppShExec <sfile>:p:h/sh.vim - else - syn include @tppShExec syntax/sh.vim - endif + syn include @tppShExec syntax/sh.vim unlet b:current_syntax syn region shExec matchgroup=tppPageLocalOptionKey start='^--exec *' keepend end='$' contains=@tppShExec @@ -65,35 +58,27 @@ endif syn match tppComment "^--##.*$" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tpp_syn_inits") - if version < 508 - let did_tpp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink tppAbstractOptionKey Special - HiLink tppPageLocalOptionKey Keyword - HiLink tppPageLocalSwitchKey Keyword - HiLink tppColorOptionKey Keyword - HiLink tppTimeOptionKey Comment - HiLink tppNewPageOptionKey PreProc - HiLink tppString String - HiLink tppColor String - HiLink tppTime Number - HiLink tppComment Comment - HiLink tppAbstractOption Error - HiLink tppPageLocalOption Error - HiLink tppPageLocalSwitch Error - HiLink tppColorOption Error - HiLink tppNewPageOption Error - HiLink tppTimeOption Error +HiLink tppAbstractOptionKey Special +HiLink tppPageLocalOptionKey Keyword +HiLink tppPageLocalSwitchKey Keyword +HiLink tppColorOptionKey Keyword +HiLink tppTimeOptionKey Comment +HiLink tppNewPageOptionKey PreProc +HiLink tppString String +HiLink tppColor String +HiLink tppTime Number +HiLink tppComment Comment +HiLink tppAbstractOption Error +HiLink tppPageLocalOption Error +HiLink tppPageLocalSwitch Error +HiLink tppColorOption Error +HiLink tppNewPageOption Error +HiLink tppTimeOption Error - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "tpp" diff --git a/runtime/syntax/trasys.vim b/runtime/syntax/trasys.vim index cfecc1c1f..1e7f75c35 100644 --- a/runtime/syntax/trasys.vim +++ b/runtime/syntax/trasys.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -21,11 +18,7 @@ endif let fortran_free_source=1 " Load FORTRAN syntax file -if version < 600 - source <sfile>:p:h/fortran.vim -else - runtime! syntax/fortran.vim -endif +runtime! syntax/fortran.vim unlet b:current_syntax @@ -136,40 +129,32 @@ syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA" " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_trasys_syntax_inits") - if version < 508 - let did_trasys_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink trasysOptions Special - HiLink trasysSurface Special - HiLink trasysSurfaceType Constant - HiLink trasysSurfaceArgs Constant - HiLink trasysArgs Constant - HiLink trasysOperations Statement - HiLink trasysSubRoutine Statement - HiLink trassyPrcsrSegm PreProc - HiLink trasysIdentifier Identifier - HiLink trasysComment Comment - HiLink trasysHeader Typedef - HiLink trasysMacro Macro - HiLink trasysInteger Number - HiLink trasysFloat Float - HiLink trasysScientific Float - - HiLink trasysBlank SpecialChar - - HiLink trasysEndData Macro - - HiLink trasysTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink trasysOptions Special +HiLink trasysSurface Special +HiLink trasysSurfaceType Constant +HiLink trasysSurfaceArgs Constant +HiLink trasysArgs Constant +HiLink trasysOperations Statement +HiLink trasysSubRoutine Statement +HiLink trassyPrcsrSegm PreProc +HiLink trasysIdentifier Identifier +HiLink trasysComment Comment +HiLink trasysHeader Typedef +HiLink trasysMacro Macro +HiLink trasysInteger Number +HiLink trasysFloat Float +HiLink trasysScientific Float + +HiLink trasysBlank SpecialChar + +HiLink trasysEndData Macro + +HiLink trasysTodo Todo + +delcommand HiLink let b:current_syntax = "trasys" diff --git a/runtime/syntax/trustees.vim b/runtime/syntax/trustees.vim index 4bc887477..6c58d3983 100644 --- a/runtime/syntax/trustees.vim +++ b/runtime/syntax/trustees.vim @@ -3,9 +3,8 @@ " Maintainer: Nima Talebi <nima@it.net.au> " Last Change: 2005-10-12 -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/tsalt.vim b/runtime/syntax/tsalt.vim index 887d6b75e..7bccde0e5 100644 --- a/runtime/syntax/tsalt.vim +++ b/runtime/syntax/tsalt.vim @@ -4,11 +4,8 @@ " Last Change: 2012 Feb 03 by Thilo Six " Version Info: @(#)tsalt.vim 1.5 97/12/16 08:11:15 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -171,46 +168,38 @@ syn sync ccomment tsaltComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tsalt_syntax_inits") - if version < 508 - let did_tsalt_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tsaltFunction Statement - HiLink tsaltSysVar Type - "HiLink tsaltLibFunc UserDefFunc - "HiLink tsaltConstants Type - "HiLink tsaltFuncArg Type - "HiLink tsaltOperator Operator - "HiLink tsaltLabel Label - "HiLink tsaltUserLabel Label - HiLink tsaltConditional Conditional - HiLink tsaltRepeat Repeat - HiLink tsaltCharacter SpecialChar - HiLink tsaltSpecialCharacter SpecialChar - HiLink tsaltNumber Number - HiLink tsaltFloat Float - HiLink tsaltCommentError tsaltError - HiLink tsaltInclude Include - HiLink tsaltPreProc PreProc - HiLink tsaltDefine Macro - HiLink tsaltIncluded tsaltString - HiLink tsaltError Error - HiLink tsaltStatement Statement - HiLink tsaltPreCondit PreCondit - HiLink tsaltType Type - HiLink tsaltString String - HiLink tsaltComment Comment - HiLink tsaltSpecial Special - HiLink tsaltTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink tsaltFunction Statement +HiLink tsaltSysVar Type +"HiLink tsaltLibFunc UserDefFunc +"HiLink tsaltConstants Type +"HiLink tsaltFuncArg Type +"HiLink tsaltOperator Operator +"HiLink tsaltLabel Label +"HiLink tsaltUserLabel Label +HiLink tsaltConditional Conditional +HiLink tsaltRepeat Repeat +HiLink tsaltCharacter SpecialChar +HiLink tsaltSpecialCharacter SpecialChar +HiLink tsaltNumber Number +HiLink tsaltFloat Float +HiLink tsaltCommentError tsaltError +HiLink tsaltInclude Include +HiLink tsaltPreProc PreProc +HiLink tsaltDefine Macro +HiLink tsaltIncluded tsaltString +HiLink tsaltError Error +HiLink tsaltStatement Statement +HiLink tsaltPreCondit PreCondit +HiLink tsaltType Type +HiLink tsaltString String +HiLink tsaltComment Comment +HiLink tsaltSpecial Special +HiLink tsaltTodo Todo + +delcommand HiLink let b:current_syntax = "tsalt" diff --git a/runtime/syntax/tsscl.vim b/runtime/syntax/tsscl.vim index 3fc18c684..32ca8d435 100644 --- a/runtime/syntax/tsscl.vim +++ b/runtime/syntax/tsscl.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -179,37 +176,29 @@ syn match tssclScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tsscl_syntax_inits") - if version < 508 - let did_tsscl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tssclCommand Statement - HiLink tssclKeyword Special - HiLink tssclEnd Macro - HiLink tssclUnits Special - - HiLink tssclComment Comment - HiLink tssclDirective Statement - HiLink tssclConditional Conditional - HiLink tssclContChar Macro - HiLink tssclQualifier Typedef - HiLink tssclSymbol Identifier - HiLink tssclSymbol2 Symbol - HiLink tssclString String - HiLink tssclOper Operator - - HiLink tssclInteger Number - HiLink tssclFloat Number - HiLink tssclScientific Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink tssclCommand Statement +HiLink tssclKeyword Special +HiLink tssclEnd Macro +HiLink tssclUnits Special + +HiLink tssclComment Comment +HiLink tssclDirective Statement +HiLink tssclConditional Conditional +HiLink tssclContChar Macro +HiLink tssclQualifier Typedef +HiLink tssclSymbol Identifier +HiLink tssclSymbol2 Symbol +HiLink tssclString String +HiLink tssclOper Operator + +HiLink tssclInteger Number +HiLink tssclFloat Number +HiLink tssclScientific Number + +delcommand HiLink let b:current_syntax = "tsscl" diff --git a/runtime/syntax/tssgm.vim b/runtime/syntax/tssgm.vim index b8182d48e..c575347c6 100644 --- a/runtime/syntax/tssgm.vim +++ b/runtime/syntax/tssgm.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -75,35 +72,27 @@ syn match tssgmScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tssgm_syntax_inits") - if version < 508 - let did_tssgm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tssgmParam Statement - HiLink tssgmSurfType Type - HiLink tssgmArgs Special - HiLink tssgmDelim Typedef - HiLink tssgmEnd Macro - HiLink tssgmUnits Special - - HiLink tssgmDefault SpecialComment - HiLink tssgmComment Statement - HiLink tssgmCommentString Comment - HiLink tssgmSurfIdent Identifier - HiLink tssgmString Delimiter - - HiLink tssgmInteger Number - HiLink tssgmFloat Float - HiLink tssgmScientific Float - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink tssgmParam Statement +HiLink tssgmSurfType Type +HiLink tssgmArgs Special +HiLink tssgmDelim Typedef +HiLink tssgmEnd Macro +HiLink tssgmUnits Special + +HiLink tssgmDefault SpecialComment +HiLink tssgmComment Statement +HiLink tssgmCommentString Comment +HiLink tssgmSurfIdent Identifier +HiLink tssgmString Delimiter + +HiLink tssgmInteger Number +HiLink tssgmFloat Float +HiLink tssgmScientific Float + +delcommand HiLink let b:current_syntax = "tssgm" diff --git a/runtime/syntax/tssop.vim b/runtime/syntax/tssop.vim index d416df054..f8fadab33 100644 --- a/runtime/syntax/tssop.vim +++ b/runtime/syntax/tssop.vim @@ -8,11 +8,8 @@ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -56,30 +53,22 @@ syn match tssopScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tssop_syntax_inits") - if version < 508 - let did_tssop_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tssopParam Statement - HiLink tssopProp Identifier - HiLink tssopArgs Special - - HiLink tssopComment Statement - HiLink tssopCommentString Comment - HiLink tssopPropName Typedef - - HiLink tssopInteger Number - HiLink tssopFloat Float - HiLink tssopScientific Float - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink tssopParam Statement +HiLink tssopProp Identifier +HiLink tssopArgs Special + +HiLink tssopComment Statement +HiLink tssopCommentString Comment +HiLink tssopPropName Typedef + +HiLink tssopInteger Number +HiLink tssopFloat Float +HiLink tssopScientific Float + +delcommand HiLink let b:current_syntax = "tssop" diff --git a/runtime/syntax/uc.vim b/runtime/syntax/uc.vim index 7eab1d48a..e128cbf82 100644 --- a/runtime/syntax/uc.vim +++ b/runtime/syntax/uc.vim @@ -7,11 +7,8 @@ " Please check :help uc.vim for comments on some of the options available. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -110,64 +107,56 @@ endif exec "syn sync ccomment ucComment minlines=" . uc_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_uc_syntax_inits") - if version < 508 - let did_uc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ucFuncDef Conditional - HiLink ucEventDef Conditional - HiLink ucBraces Function - HiLink ucBranch Conditional - HiLink ucLabel Label - HiLink ucUserLabel Label - HiLink ucConditional Conditional - HiLink ucRepeat Repeat - HiLink ucStorageClass StorageClass - HiLink ucMethodDecl ucStorageClass - HiLink ucClassDecl ucStorageClass - HiLink ucScopeDecl ucStorageClass - HiLink ucBoolean Boolean - HiLink ucSpecial Special - HiLink ucSpecialError Error - HiLink ucSpecialCharError Error - HiLink ucString String - HiLink ucCharacter Character - HiLink ucSpecialChar SpecialChar - HiLink ucNumber Number - HiLink ucError Error - HiLink ucStringError Error - HiLink ucStatement Statement - HiLink ucOperator Operator - HiLink ucOverLoaded Operator - HiLink ucComment Comment - HiLink ucDocComment Comment - HiLink ucLineComment Comment - HiLink ucConstant ucBoolean - HiLink ucTypedef Typedef - HiLink ucTodo Todo - - HiLink ucCommentTitle SpecialComment - HiLink ucDocTags Special - HiLink ucDocParam Function - HiLink ucCommentStar ucComment - - HiLink ucType Type - HiLink ucExternal Include - - HiLink ucClassKeys Conditional - HiLink ucClassLabel Conditional - - HiLink htmlComment Special - HiLink htmlCommentPart Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink ucFuncDef Conditional +HiLink ucEventDef Conditional +HiLink ucBraces Function +HiLink ucBranch Conditional +HiLink ucLabel Label +HiLink ucUserLabel Label +HiLink ucConditional Conditional +HiLink ucRepeat Repeat +HiLink ucStorageClass StorageClass +HiLink ucMethodDecl ucStorageClass +HiLink ucClassDecl ucStorageClass +HiLink ucScopeDecl ucStorageClass +HiLink ucBoolean Boolean +HiLink ucSpecial Special +HiLink ucSpecialError Error +HiLink ucSpecialCharError Error +HiLink ucString String +HiLink ucCharacter Character +HiLink ucSpecialChar SpecialChar +HiLink ucNumber Number +HiLink ucError Error +HiLink ucStringError Error +HiLink ucStatement Statement +HiLink ucOperator Operator +HiLink ucOverLoaded Operator +HiLink ucComment Comment +HiLink ucDocComment Comment +HiLink ucLineComment Comment +HiLink ucConstant ucBoolean +HiLink ucTypedef Typedef +HiLink ucTodo Todo + +HiLink ucCommentTitle SpecialComment +HiLink ucDocTags Special +HiLink ucDocParam Function +HiLink ucCommentStar ucComment + +HiLink ucType Type +HiLink ucExternal Include + +HiLink ucClassKeys Conditional +HiLink ucClassLabel Conditional + +HiLink htmlComment Special +HiLink htmlCommentPart Special + +delcommand HiLink let b:current_syntax = "uc" diff --git a/runtime/syntax/uil.vim b/runtime/syntax/uil.vim index b5421bcfd..689b187a2 100644 --- a/runtime/syntax/uil.vim +++ b/runtime/syntax/uil.vim @@ -4,10 +4,8 @@ " Last Change: 2013 May 23 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim -" Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -47,37 +45,29 @@ syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLin syn sync ccomment uilComment " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_uil_syn_inits") - if version < 508 - let did_uil_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " The default highlighting. - HiLink uilCharacter uilString - HiLink uilSpecialCharacter uilSpecial - HiLink uilNumber uilString - HiLink uilCommentError uilError - HiLink uilInclude uilPreCondit - HiLink uilDefine uilPreCondit - HiLink uilIncluded uilString - HiLink uilSpecialFunction uilRessource - HiLink uilRessource Identifier - HiLink uilSpecialStatement Keyword - HiLink uilError Error - HiLink uilPreCondit PreCondit - HiLink uilType Type - HiLink uilString String - HiLink uilComment Comment - HiLink uilSpecial Special - HiLink uilTodo Todo +" The default highlighting. +HiLink uilCharacter uilString +HiLink uilSpecialCharacter uilSpecial +HiLink uilNumber uilString +HiLink uilCommentError uilError +HiLink uilInclude uilPreCondit +HiLink uilDefine uilPreCondit +HiLink uilIncluded uilString +HiLink uilSpecialFunction uilRessource +HiLink uilRessource Identifier +HiLink uilSpecialStatement Keyword +HiLink uilError Error +HiLink uilPreCondit PreCondit +HiLink uilType Type +HiLink uilString String +HiLink uilComment Comment +HiLink uilSpecial Special +HiLink uilTodo Todo - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "uil" diff --git a/runtime/syntax/upstart.vim b/runtime/syntax/upstart.vim index b3f2b9e63..140cd174e 100644 --- a/runtime/syntax/upstart.vim +++ b/runtime/syntax/upstart.vim @@ -10,9 +10,8 @@ " It is inspired by the initng syntax file and includes sh.vim to do the " highlighting of script blocks. -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/vb.vim b/runtime/syntax/vb.vim index 0c05b35fb..24c94fd5b 100644 --- a/runtime/syntax/vb.vim +++ b/runtime/syntax/vb.vim @@ -11,11 +11,8 @@ " VIM and VIM-DEV mailing lists. It is by no means complete. " Send comments, suggestions and requests to the maintainer. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -338,40 +335,32 @@ syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_vb_syntax_inits") - if version < 508 - let did_vb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink vbBoolean Boolean - HiLink vbLineNumber Comment - HiLink vbComment Comment - HiLink vbConditional Conditional - HiLink vbConst Constant - HiLink vbDefine Constant - HiLink vbError Error - HiLink vbFunction Identifier - HiLink vbIdentifier Identifier - HiLink vbNumber Number - HiLink vbFloat Float - HiLink vbMethods PreProc - HiLink vbOperator Operator - HiLink vbRepeat Repeat - HiLink vbString String - HiLink vbStatement Statement - HiLink vbKeyword Statement - HiLink vbEvents Special - HiLink vbTodo Todo - HiLink vbTypes Type - HiLink vbTypeSpecifier Type +HiLink vbBoolean Boolean +HiLink vbLineNumber Comment +HiLink vbComment Comment +HiLink vbConditional Conditional +HiLink vbConst Constant +HiLink vbDefine Constant +HiLink vbError Error +HiLink vbFunction Identifier +HiLink vbIdentifier Identifier +HiLink vbNumber Number +HiLink vbFloat Float +HiLink vbMethods PreProc +HiLink vbOperator Operator +HiLink vbRepeat Repeat +HiLink vbString String +HiLink vbStatement Statement +HiLink vbKeyword Statement +HiLink vbEvents Special +HiLink vbTodo Todo +HiLink vbTypes Type +HiLink vbTypeSpecifier Type - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "vb" diff --git a/runtime/syntax/vera.vim b/runtime/syntax/vera.vim index b8e25cf34..7952c9429 100644 --- a/runtime/syntax/vera.vim +++ b/runtime/syntax/vera.vim @@ -10,11 +10,8 @@ " (change the value for guibg to any color you like) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -287,74 +284,66 @@ endif exec "syn sync ccomment veraComment minlines=" . b:vera_minlines " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_vera_syn_inits") - if version < 508 - let did_vera_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink veraClass Identifier - HiLink veraObject Identifier - HiLink veraUserMethod Function - HiLink veraTask Keyword - HiLink veraModifier Tag - HiLink veraDeprecated veraError - HiLink veraMethods Statement - " HiLink veraInterface Label - HiLink veraInterface Function - - HiLink veraFormat veraSpecial - HiLink veraCppString veraString - HiLink veraCommentL veraComment - HiLink veraCommentStart veraComment - HiLink veraLabel Label - HiLink veraUserLabel Label - HiLink veraConditional Conditional - HiLink veraRepeat Repeat - HiLink veraCharacter Character - HiLink veraSpecialCharacter veraSpecial - HiLink veraNumber Number - HiLink veraOctal Number - HiLink veraOctalZero PreProc " link this to Error if you want - HiLink veraFloat Float - HiLink veraOctalError veraError - HiLink veraParenError veraError - HiLink veraErrInParen veraError - HiLink veraErrInBracket veraError - HiLink veraCommentError veraError - HiLink veraCommentStartError veraError - HiLink veraSpaceError SpaceError - HiLink veraSpecialError veraError - HiLink veraOperator Operator - HiLink veraStructure Structure - HiLink veraInclude Include - HiLink veraPreProc PreProc - HiLink veraDefine Macro - HiLink veraIncluded veraString - HiLink veraError Error - HiLink veraStatement Statement - HiLink veraPreCondit PreCondit - HiLink veraType Type - " HiLink veraConstant Constant - HiLink veraConstant Keyword - HiLink veraUserConstant Constant - HiLink veraCommentString veraString - HiLink veraComment2String veraString - HiLink veraCommentSkip veraComment - HiLink veraString String - HiLink veraComment Comment - HiLink veraSpecial SpecialChar - HiLink veraTodo Todo - HiLink veraCppSkip veraCppOut - HiLink veraCppOut2 veraCppOut - HiLink veraCppOut Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink veraClass Identifier +HiLink veraObject Identifier +HiLink veraUserMethod Function +HiLink veraTask Keyword +HiLink veraModifier Tag +HiLink veraDeprecated veraError +HiLink veraMethods Statement +" HiLink veraInterface Label +HiLink veraInterface Function + +HiLink veraFormat veraSpecial +HiLink veraCppString veraString +HiLink veraCommentL veraComment +HiLink veraCommentStart veraComment +HiLink veraLabel Label +HiLink veraUserLabel Label +HiLink veraConditional Conditional +HiLink veraRepeat Repeat +HiLink veraCharacter Character +HiLink veraSpecialCharacter veraSpecial +HiLink veraNumber Number +HiLink veraOctal Number +HiLink veraOctalZero PreProc " link this to Error if you want +HiLink veraFloat Float +HiLink veraOctalError veraError +HiLink veraParenError veraError +HiLink veraErrInParen veraError +HiLink veraErrInBracket veraError +HiLink veraCommentError veraError +HiLink veraCommentStartError veraError +HiLink veraSpaceError SpaceError +HiLink veraSpecialError veraError +HiLink veraOperator Operator +HiLink veraStructure Structure +HiLink veraInclude Include +HiLink veraPreProc PreProc +HiLink veraDefine Macro +HiLink veraIncluded veraString +HiLink veraError Error +HiLink veraStatement Statement +HiLink veraPreCondit PreCondit +HiLink veraType Type +" HiLink veraConstant Constant +HiLink veraConstant Keyword +HiLink veraUserConstant Constant +HiLink veraCommentString veraString +HiLink veraComment2String veraString +HiLink veraCommentSkip veraComment +HiLink veraString String +HiLink veraComment Comment +HiLink veraSpecial SpecialChar +HiLink veraTodo Todo +HiLink veraCppSkip veraCppOut +HiLink veraCppOut2 veraCppOut +HiLink veraCppOut Comment + +delcommand HiLink let b:current_syntax = "vera" diff --git a/runtime/syntax/verilog.vim b/runtime/syntax/verilog.vim index f4d21d073..4b7570a13 100644 --- a/runtime/syntax/verilog.vim +++ b/runtime/syntax/verilog.vim @@ -3,22 +3,15 @@ " Maintainer: Mun Johl <Mun.Johl@emulex.com> " Last Update: Wed Jul 20 16:04:19 PDT 2011 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Set the local value of the 'iskeyword' option. " NOTE: '?' was added so that verilogNumber would be processed correctly when " '?' is the last character of the number. -if version >= 600 - setlocal iskeyword=@,48-57,63,_,192-255 -else - set iskeyword=@,48-57,63,_,192-255 -endif +setlocal iskeyword=@,48-57,63,_,192-255 " A bunch of useful Verilog keywords @@ -102,34 +95,26 @@ syn region verilogDirective start="//\s*\$s dc_script_begin\>" end="//\s*\$s syn sync minlines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_verilog_syn_inits") - if version < 508 - let did_verilog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink verilogCharacter Character - HiLink verilogConditional Conditional - HiLink verilogRepeat Repeat - HiLink verilogString String - HiLink verilogTodo Todo - HiLink verilogComment Comment - HiLink verilogConstant Constant - HiLink verilogLabel Label - HiLink verilogNumber Number - HiLink verilogOperator Special - HiLink verilogStatement Statement - HiLink verilogGlobal Define - HiLink verilogDirective SpecialComment - HiLink verilogEscape Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default highlighting. +HiLink verilogCharacter Character +HiLink verilogConditional Conditional +HiLink verilogRepeat Repeat +HiLink verilogString String +HiLink verilogTodo Todo +HiLink verilogComment Comment +HiLink verilogConstant Constant +HiLink verilogLabel Label +HiLink verilogNumber Number +HiLink verilogOperator Special +HiLink verilogStatement Statement +HiLink verilogGlobal Define +HiLink verilogDirective SpecialComment +HiLink verilogEscape Special + +delcommand HiLink let b:current_syntax = "verilog" diff --git a/runtime/syntax/verilogams.vim b/runtime/syntax/verilogams.vim index d16e4bffb..3e236099f 100644 --- a/runtime/syntax/verilogams.vim +++ b/runtime/syntax/verilogams.vim @@ -9,20 +9,13 @@ " Minor reserved keyword updates. " Last Update: Thursday September 15 15:36:03 CST 2005 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Set the local value of the 'iskeyword' option -if version >= 600 - setlocal iskeyword=@,48-57,_,192-255 -else - set iskeyword=@,48-57,_,192-255 -endif +setlocal iskeyword=@,48-57,_,192-255 " Annex B.1 'All keywords' syn keyword verilogamsStatement above abs absdelay acos acosh ac_stim @@ -113,36 +106,28 @@ syn match verilogamsEscape "\\\o\o\=\o\=" contained syn sync lines=50 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_verilogams_syn_inits") - if version < 508 - let did_verilogams_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " The default highlighting. - HiLink verilogamsCharacter Character - HiLink verilogamsConditional Conditional - HiLink verilogamsRepeat Repeat - HiLink verilogamsString String - HiLink verilogamsTodo Todo - HiLink verilogamsComment Comment - HiLink verilogamsConstant Constant - HiLink verilogamsLabel Label - HiLink verilogamsNumber Number - HiLink verilogamsOperator Special - HiLink verilogamsStatement Statement - HiLink verilogamsGlobal Define - HiLink verilogamsDirective SpecialComment - HiLink verilogamsEscape Special - HiLink verilogamsType Type - HiLink verilogamsSystask Function +" The default highlighting. +HiLink verilogamsCharacter Character +HiLink verilogamsConditional Conditional +HiLink verilogamsRepeat Repeat +HiLink verilogamsString String +HiLink verilogamsTodo Todo +HiLink verilogamsComment Comment +HiLink verilogamsConstant Constant +HiLink verilogamsLabel Label +HiLink verilogamsNumber Number +HiLink verilogamsOperator Special +HiLink verilogamsStatement Statement +HiLink verilogamsGlobal Define +HiLink verilogamsDirective SpecialComment +HiLink verilogamsEscape Special +HiLink verilogamsType Type +HiLink verilogamsSystask Function - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "verilogams" diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim index 32503823e..4a5421608 100644 --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -5,9 +5,8 @@ " Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn> " Last Changed: 2016 Mar 05 by Daniel Kho -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -234,35 +233,27 @@ syn match vhdlPreProc "\(^\|\s\)--\s*synopsys\s\+translate_\(on\|off\)\s*" syn sync minlines=600 " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_vhdl_syntax_inits") - if version < 508 - let did_vhdl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink vhdlSpecial Special - HiLink vhdlStatement Statement - HiLink vhdlCharacter Character - HiLink vhdlString String - HiLink vhdlVector Number - HiLink vhdlBoolean Number - HiLink vhdlTodo Todo - HiLink vhdlFixme Fixme - HiLink vhdlComment Comment - HiLink vhdlNumber Number - HiLink vhdlTime Number - HiLink vhdlType Type - HiLink vhdlOperator Operator - HiLink vhdlError Error - HiLink vhdlAttribute Special - HiLink vhdlPreProc PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink vhdlSpecial Special +HiLink vhdlStatement Statement +HiLink vhdlCharacter Character +HiLink vhdlString String +HiLink vhdlVector Number +HiLink vhdlBoolean Number +HiLink vhdlTodo Todo +HiLink vhdlFixme Fixme +HiLink vhdlComment Comment +HiLink vhdlNumber Number +HiLink vhdlTime Number +HiLink vhdlType Type +HiLink vhdlOperator Operator +HiLink vhdlError Error +HiLink vhdlAttribute Special +HiLink vhdlPreProc PreProc + +delcommand HiLink let b:current_syntax = "vhdl" diff --git a/runtime/syntax/virata.vim b/runtime/syntax/virata.vim index e597b8e31..3023f13a9 100644 --- a/runtime/syntax/virata.vim +++ b/runtime/syntax/virata.vim @@ -13,10 +13,8 @@ " Setup Syntax: -if version < 600 - " Clear old syntax settings - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Virata syntax is case insensitive (mostly) @@ -156,63 +154,55 @@ syn sync minlines=50 "for multiple region nesting " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later : only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_virata_syntax_inits") - if version < 508 - let did_virata_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Sub Links: - HiLink virataDefSubstError virataPreProcError - HiLink virataDefSubst virataPreProc - HiLink virataInAlter virataOperator - HiLink virataInExec virataOperator - HiLink virataInExport virataOperator - HiLink virataInImport virataOperator - HiLink virataInInstance virataOperator - HiLink virataInMake virataOperator - HiLink virataInModule virataOperator - HiLink virataInProcess virataOperator - HiLink virataInMacAddr virataHexNumber - - " Comment Group: - HiLink virataComment Comment - HiLink virataSpclComment SpecialComment - HiLink virataInCommentTodo Todo - - " Constant Group: - HiLink virataString String - HiLink virataStringError Error - HiLink virataCharacter Character - HiLink virataSpclChar Special - HiLink virataDecNumber Number - HiLink virataHexNumber Number - HiLink virataSizeNumber Number - HiLink virataNumberError Error - - " Identifier Group: - HiLink virataIdentError Error - - " PreProc Group: - HiLink virataPreProc PreProc - HiLink virataDefine Define - HiLink virataInclude Include - HiLink virataPreCondit PreCondit - HiLink virataPreProcError Error - HiLink virataPreProcWarn Todo - - " Directive Group: - HiLink virataStatement Statement - HiLink virataCfgStatement Statement - HiLink virataOperator Operator - HiLink virataDirective Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" Sub Links: +HiLink virataDefSubstError virataPreProcError +HiLink virataDefSubst virataPreProc +HiLink virataInAlter virataOperator +HiLink virataInExec virataOperator +HiLink virataInExport virataOperator +HiLink virataInImport virataOperator +HiLink virataInInstance virataOperator +HiLink virataInMake virataOperator +HiLink virataInModule virataOperator +HiLink virataInProcess virataOperator +HiLink virataInMacAddr virataHexNumber + +" Comment Group: +HiLink virataComment Comment +HiLink virataSpclComment SpecialComment +HiLink virataInCommentTodo Todo + +" Constant Group: +HiLink virataString String +HiLink virataStringError Error +HiLink virataCharacter Character +HiLink virataSpclChar Special +HiLink virataDecNumber Number +HiLink virataHexNumber Number +HiLink virataSizeNumber Number +HiLink virataNumberError Error + +" Identifier Group: +HiLink virataIdentError Error + +" PreProc Group: +HiLink virataPreProc PreProc +HiLink virataDefine Define +HiLink virataInclude Include +HiLink virataPreCondit PreCondit +HiLink virataPreProcError Error +HiLink virataPreProcWarn Todo + +" Directive Group: +HiLink virataStatement Statement +HiLink virataCfgStatement Statement +HiLink virataOperator Operator +HiLink virataDirective Keyword + +delcommand HiLink let b:current_syntax = "virata" diff --git a/runtime/syntax/vmasm.vim b/runtime/syntax/vmasm.vim index 85d044125..a4b71229e 100644 --- a/runtime/syntax/vmasm.vim +++ b/runtime/syntax/vmasm.vim @@ -6,11 +6,8 @@ " This is incomplete. Feel free to contribute... " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -196,55 +193,47 @@ syn match vmasmDirective "\.\(signed_\)\=word\>" syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_macro_syntax_inits") - if version < 508 - let did_macro_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - " Comment Constant Error Identifier PreProc Special Statement Todo Type - " - " Constant Boolean Character Number String - " Identifier Function - " PreProc Define Include Macro PreCondit - " Special Debug Delimiter SpecialChar SpecialComment Tag - " Statement Conditional Exception Keyword Label Operator Repeat - " Type StorageClass Structure Typedef - - HiLink vmasmComment Comment - HiLink vmasmTodo Todo - - HiLink vmasmhexNumber Number " Constant - HiLink vmasmoctNumber Number " Constant - HiLink vmasmbinNumber Number " Constant - HiLink vmasmdecNumber Number " Constant - HiLink vmasmfloatNumber Number " Constant +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overridden later +" Comment Constant Error Identifier PreProc Special Statement Todo Type +" +" Constant Boolean Character Number String +" Identifier Function +" PreProc Define Include Macro PreCondit +" Special Debug Delimiter SpecialChar SpecialComment Tag +" Statement Conditional Exception Keyword Label Operator Repeat +" Type StorageClass Structure Typedef + +HiLink vmasmComment Comment +HiLink vmasmTodo Todo + +HiLink vmasmhexNumber Number " Constant +HiLink vmasmoctNumber Number " Constant +HiLink vmasmbinNumber Number " Constant +HiLink vmasmdecNumber Number " Constant +HiLink vmasmfloatNumber Number " Constant " HiLink vmasmString String " Constant - HiLink vmasmReg Identifier - HiLink vmasmOperator Identifier +HiLink vmasmReg Identifier +HiLink vmasmOperator Identifier - HiLink vmasmInclude Include " PreProc - HiLink vmasmMacro Macro " PreProc - " HiLink vmasmMacroParam Keyword " Statement +HiLink vmasmInclude Include " PreProc +HiLink vmasmMacro Macro " PreProc +" HiLink vmasmMacroParam Keyword " Statement - HiLink vmasmDirective Special - HiLink vmasmPreCond Special +HiLink vmasmDirective Special +HiLink vmasmPreCond Special - HiLink vmasmOpcode Statement - HiLink vmasmCond Conditional " Statement - HiLink vmasmRepeat Repeat " Statement +HiLink vmasmOpcode Statement +HiLink vmasmCond Conditional " Statement +HiLink vmasmRepeat Repeat " Statement - HiLink vmasmLabel Type - delcommand HiLink -endif +HiLink vmasmLabel Type +delcommand HiLink let b:current_syntax = "vmasm" diff --git a/runtime/syntax/vrml.vim b/runtime/syntax/vrml.vim index 44814aad8..530becb55 100644 --- a/runtime/syntax/vrml.vim +++ b/runtime/syntax/vrml.vim @@ -5,11 +5,8 @@ " Former Maintainer: Gregory Seidman <gsslist+vim@anthropohedron.net> " Last change: 2006 May 03 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -168,11 +165,9 @@ syn keyword VRMLProtos contained EXTERNPROTO PROTO IS syn keyword VRMLRoutes contained ROUTE TO -if version >= 502 "containment! - syn include @jscript $VIMRUNTIME/syntax/javascript.vim - syn region VRMLjScriptString contained start=+"\(\(javascript\)\|\(vrmlscript\)\|\(ecmascript\)\):+ms=e+1 skip=+\\\\\|\\"+ end=+"+me=e-1 contains=@jscript -endif +syn include @jscript $VIMRUNTIME/syntax/javascript.vim +syn region VRMLjScriptString contained start=+"\(\(javascript\)\|\(vrmlscript\)\|\(ecmascript\)\):+ms=e+1 skip=+\\\\\|\\"+ end=+"+me=e-1 contains=@jscript " match definitions. syn match VRMLSpecial contained "\\[0-9][0-9][0-9]\|\\." @@ -192,47 +187,37 @@ syn region VRMLInstName start="USE\>"hs=e+1 skip="USE\(,\|\s\)*" end="[A-Za-z syn keyword VRMLInstances contained DEF USE syn sync minlines=1 -if version >= 600 "FOLDS! - syn sync fromstart - "setlocal foldmethod=syntax - syn region braceFold start="{" end="}" transparent fold contains=TOP - syn region bracketFold start="\[" end="]" transparent fold contains=TOP - syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ fold contains=VRMLSpecial,VRMLjScriptString -endif +syn sync fromstart +"setlocal foldmethod=syntax +syn region braceFold start="{" end="}" transparent fold contains=TOP +syn region bracketFold start="\[" end="]" transparent fold contains=TOP +syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ fold contains=VRMLSpecial,VRMLjScriptString " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_VRML_syntax_inits") - if version < 508 - let did_VRML_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink VRMLCharacter VRMLString - HiLink VRMLSpecialCharacter VRMLSpecial - HiLink VRMLNumber VRMLString - HiLink VRMLValues VRMLString - HiLink VRMLString String - HiLink VRMLSpecial Special - HiLink VRMLComment Comment - HiLink VRMLNodes Statement - HiLink VRMLFields Type - HiLink VRMLEvents Type - HiLink VRMLfTypes LineNr +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink VRMLCharacter VRMLString +HiLink VRMLSpecialCharacter VRMLSpecial +HiLink VRMLNumber VRMLString +HiLink VRMLValues VRMLString +HiLink VRMLString String +HiLink VRMLSpecial Special +HiLink VRMLComment Comment +HiLink VRMLNodes Statement +HiLink VRMLFields Type +HiLink VRMLEvents Type +HiLink VRMLfTypes LineNr " hi VRMLfTypes ctermfg=6 guifg=Brown - HiLink VRMLInstances PreCondit - HiLink VRMLRoutes PreCondit - HiLink VRMLProtos PreProc - HiLink VRMLRouteNode Identifier - HiLink VRMLInstName Identifier - HiLink VRMLTypes Identifier - - delcommand HiLink -endif +HiLink VRMLInstances PreCondit +HiLink VRMLRoutes PreCondit +HiLink VRMLProtos PreProc +HiLink VRMLRouteNode Identifier +HiLink VRMLInstName Identifier +HiLink VRMLTypes Identifier + +delcommand HiLink let b:current_syntax = "vrml" diff --git a/runtime/syntax/vroom.vim b/runtime/syntax/vroom.vim index 0cd6ccce1..0509e30b1 100644 --- a/runtime/syntax/vroom.vim +++ b/runtime/syntax/vroom.vim @@ -3,11 +3,8 @@ " Maintainer: David Barnett (https://github.com/google/vim-ft-vroom) " Last Change: 2014 Jul 23 -" For version 5.x: Clear all syntax items. -" For version 6.x and later: Quit when a syntax file was already loaded. -if v:version < 600 - syntax clear -elseif exists('b:current_syntax') +" quit when a syntax file was already loaded +if exists('b:current_syntax') finish endif diff --git a/runtime/syntax/vsejcl.vim b/runtime/syntax/vsejcl.vim index f4f00c65e..5a106c2ef 100644 --- a/runtime/syntax/vsejcl.vim +++ b/runtime/syntax/vsejcl.vim @@ -4,11 +4,8 @@ " URL: " Last change: 2001 May 10 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -23,26 +20,18 @@ syn match vsejclString /'.\{-}'/ syn match vsejclParms /(.\{-})/ contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_vsejcl_syntax") - if version < 508 - let did_vsejcl_syntax = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink vsejclComment Comment - HiLink vsejclField Type - HiLink vsejclKeyword Statement - HiLink vsejclObject Constant - HiLink vsejclString Constant - HiLink vsejclMisc Special - HiLink vsejclParms Constant +HiLink vsejclComment Comment +HiLink vsejclField Type +HiLink vsejclKeyword Statement +HiLink vsejclObject Constant +HiLink vsejclString Constant +HiLink vsejclMisc Special +HiLink vsejclParms Constant - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "vsejcl" diff --git a/runtime/syntax/wdiff.vim b/runtime/syntax/wdiff.vim index 9cd061181..bdc7be713 100644 --- a/runtime/syntax/wdiff.vim +++ b/runtime/syntax/wdiff.vim @@ -9,11 +9,8 @@ " SPAM is _NOT_ welcome - be ready to be reported! -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -23,21 +20,12 @@ syn region wdiffNew start="{+" end="+}" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_wdiff_syn_inits") - let did_wdiff_syn_inits = 1 - if version < 508 - let did_wdiff_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink wdiffOld Special - HiLink wdiffNew Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink wdiffOld Special +HiLink wdiffNew Identifier + +delcommand HiLink let b:current_syntax = "wdiff" diff --git a/runtime/syntax/web.vim b/runtime/syntax/web.vim index f7a7fdfdc..54eebda39 100644 --- a/runtime/syntax/web.vim +++ b/runtime/syntax/web.vim @@ -8,11 +8,8 @@ " the standard WEB distribution, available for anonymous ftp at " ftp://labrea.stanford.edu/pub/tex/web/. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -20,12 +17,8 @@ endif " we base this syntax file on the modern superset, CWEB. Note: This shortcut " may introduce some illegal constructs, e.g., CWEB's "@c" does _not_ start a " code section in WEB. Anyway, I'm not a WEB programmer. -if version < 600 - source <sfile>:p:h/cweb.vim -else - runtime! syntax/cweb.vim - unlet b:current_syntax -endif +runtime! syntax/cweb.vim +unlet b:current_syntax " Replace C/C++ syntax by Pascal syntax. syntax include @webIncludedC <sfile>:p:h/pascal.vim diff --git a/runtime/syntax/webmacro.vim b/runtime/syntax/webmacro.vim index 3b863f7c3..2c32f537d 100644 --- a/runtime/syntax/webmacro.vim +++ b/runtime/syntax/webmacro.vim @@ -11,21 +11,16 @@ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + " quit when a syntax file was already loaded + if exists("b:current_syntax") finish endif let main_syntax = 'webmacro' endif -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment @@ -49,31 +44,23 @@ syn match webmacroComment "##.*$" syn match webmacroHash "[#{}\$]" contained " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_webmacro_syn_inits") - if version < 508 - let did_webmacro_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink webmacroComment CommentTitle - HiLink webmacroVariable PreProc - HiLink webmacroIf webmacroStatement - HiLink webmacroForeach webmacroStatement - HiLink webmacroSet webmacroStatement - HiLink webmacroInclude webmacroStatement - HiLink webmacroParse webmacroStatement - HiLink webmacroStatement Function - HiLink webmacroNumber Number - HiLink webmacroBoolean Boolean - HiLink webmacroSpecial Special - HiLink webmacroString String - HiLink webmacroBracesError Error - delcommand HiLink -endif +HiLink webmacroComment CommentTitle +HiLink webmacroVariable PreProc +HiLink webmacroIf webmacroStatement +HiLink webmacroForeach webmacroStatement +HiLink webmacroSet webmacroStatement +HiLink webmacroInclude webmacroStatement +HiLink webmacroParse webmacroStatement +HiLink webmacroStatement Function +HiLink webmacroNumber Number +HiLink webmacroBoolean Boolean +HiLink webmacroSpecial Special +HiLink webmacroString String +HiLink webmacroBracesError Error +delcommand HiLink let b:current_syntax = "webmacro" diff --git a/runtime/syntax/winbatch.vim b/runtime/syntax/winbatch.vim index aea2cdebc..e787a5d09 100644 --- a/runtime/syntax/winbatch.vim +++ b/runtime/syntax/winbatch.vim @@ -4,11 +4,8 @@ " URL: http://www.mggen.com/vim/syntax/winbatch.zip " Last change: 2001 May 10 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -158,29 +155,21 @@ syn keyword winbatchImplicit xgetchildhwnd xgetelapsed xhex xmemcompact xmessage syn keyword winbatchImplicit xsendmessage xverifyccard yield " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_winbatch_syntax_inits") - if version < 508 - let did_winbatch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink winbatchLabel PreProc - HiLink winbatchCtl Operator - HiLink winbatchStatement Statement - HiLink winbatchTodo Todo - HiLink winbatchString String - HiLink winbatchVar Type - HiLink winbatchComment Comment - HiLink winbatchImplicit Special - HiLink winbatchNumber Number - HiLink winbatchConstant StorageClass +HiLink winbatchLabel PreProc +HiLink winbatchCtl Operator +HiLink winbatchStatement Statement +HiLink winbatchTodo Todo +HiLink winbatchString String +HiLink winbatchVar Type +HiLink winbatchComment Comment +HiLink winbatchImplicit Special +HiLink winbatchNumber Number +HiLink winbatchConstant StorageClass - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "winbatch" diff --git a/runtime/syntax/wml.vim b/runtime/syntax/wml.vim index 5957930c8..b9169d003 100644 --- a/runtime/syntax/wml.vim +++ b/runtime/syntax/wml.vim @@ -16,21 +16,14 @@ " vim-package around your corner :) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " A lot of the web stuff looks like HTML so we load that first -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax if !exists("main_syntax") @@ -108,11 +101,7 @@ syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" cont " The perl include stuff if main_syntax != 'perl' " Perl script - if version < 600 - syn include @wmlPerlScript <sfile>:p:h/perl.vim - else - syn include @wmlPerlScript syntax/perl.vim - endif + syn include @wmlPerlScript syntax/perl.vim unlet b:current_syntax syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag @@ -140,33 +129,24 @@ if main_syntax == "html" endif " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_wml_syn_inits") - let did_wml_syn_inits = 1 - if version < 508 - let did_wml_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink wmlNextLine Special - HiLink wmlUse Include - HiLink wmlUsed String - HiLink wmlBody Special - HiLink wmlDiverted Label - HiLink wmlDivert Delimiter - HiLink wmlDivertEnd Delimiter - HiLink wmlLocationId Label - HiLink wmlLocation Delimiter +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink wmlNextLine Special +HiLink wmlUse Include +HiLink wmlUsed String +HiLink wmlBody Special +HiLink wmlDiverted Label +HiLink wmlDivert Delimiter +HiLink wmlDivertEnd Delimiter +HiLink wmlLocationId Label +HiLink wmlLocation Delimiter " HiLink wmlLocationed Delimiter - HiLink wmlDefineName String - HiLink wmlComment Comment - HiLink wmlInclude Include - HiLink wmlSharpBang PreProc +HiLink wmlDefineName String +HiLink wmlComment Comment +HiLink wmlInclude Include +HiLink wmlSharpBang PreProc - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "wml" diff --git a/runtime/syntax/wsml.vim b/runtime/syntax/wsml.vim index 2a92a0d54..f2fbbf25c 100644 --- a/runtime/syntax/wsml.vim +++ b/runtime/syntax/wsml.vim @@ -4,10 +4,8 @@ " URL: none " Last Change: 2006 Apr 30 -" Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -78,45 +76,37 @@ syn match wsmlSpecial "\\u\d\{4\}" syn cluster wsmlTop add=wsmlString,wsmlCharacter,wsmlNumber,wsmlSpecial,wsmlStringError " Define the default highlighting. -" " For version 5.7 and earlier: only when not done already -" " For version 5.8 and later: only when an item doesn't have highlighting yet - if version >= 508 || !exists("did_wsml_syn_inits") - if version < 508 - let did_wsml_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink wsmlHeader TypeDef - HiLink wsmlNamespace TypeDef - HiLink wsmlOntology Statement - HiLink wsmlAxiom TypeDef - HiLink wsmlService TypeDef - HiLink wsmlNFP TypeDef - HiLink wsmlTopLevel TypeDef - HiLink wsmlMediation TypeDef - HiLink wsmlBehavioral TypeDef - HiLink wsmlChoreographyPri TypeDef - HiLink wsmlChoreographySec Operator - HiLink wsmlChoreographyTer Special - HiLink wsmlString String - HiLink wsmlIdentifier Normal - HiLink wsmlSqName Normal - HiLink wsmlVariable Define - HiLink wsmlKeywordsInsideLEs Operator - HiLink wsmlOperator Operator - HiLink wsmlBrace Operator - HiLink wsmlCharacter Character - HiLink wsmlNumber Number - HiLink wsmlDataTypes Special - HiLink wsmlComment Comment - HiLink wsmlDocComment Comment - HiLink wsmlLineComment Comment - HiLink wsmlTodo Todo - HiLink wsmlFixMe Error - HiLink wsmlCommentTitle SpecialComment - HiLink wsmlCommentStar wsmlComment - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink wsmlHeader TypeDef +HiLink wsmlNamespace TypeDef +HiLink wsmlOntology Statement +HiLink wsmlAxiom TypeDef +HiLink wsmlService TypeDef +HiLink wsmlNFP TypeDef +HiLink wsmlTopLevel TypeDef +HiLink wsmlMediation TypeDef +HiLink wsmlBehavioral TypeDef +HiLink wsmlChoreographyPri TypeDef +HiLink wsmlChoreographySec Operator +HiLink wsmlChoreographyTer Special +HiLink wsmlString String +HiLink wsmlIdentifier Normal +HiLink wsmlSqName Normal +HiLink wsmlVariable Define +HiLink wsmlKeywordsInsideLEs Operator +HiLink wsmlOperator Operator +HiLink wsmlBrace Operator +HiLink wsmlCharacter Character +HiLink wsmlNumber Number +HiLink wsmlDataTypes Special +HiLink wsmlComment Comment +HiLink wsmlDocComment Comment +HiLink wsmlLineComment Comment +HiLink wsmlTodo Todo +HiLink wsmlFixMe Error +HiLink wsmlCommentTitle SpecialComment +HiLink wsmlCommentStar wsmlComment delcommand HiLink diff --git a/runtime/syntax/xdefaults.vim b/runtime/syntax/xdefaults.vim index 5e38952a7..1dfcc34ae 100644 --- a/runtime/syntax/xdefaults.vim +++ b/runtime/syntax/xdefaults.vim @@ -10,11 +10,8 @@ " xrdb manual page " xrdb source: ftp://ftp.x.org/pub/R6.4/xc/programs/xrdb/xrdb.c -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -109,36 +106,28 @@ syn keyword xdefaultsSymbol contained X_RESOLUTION syn keyword xdefaultsSymbol contained Y_RESOLUTION " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_xdefaults_syntax_inits") - if version < 508 - let did_xdefaults_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink xdefaultsLabel Type - HiLink xdefaultsValue Constant - HiLink xdefaultsComment Comment - HiLink xdefaultsCommentH xdefaultsComment - HiLink xdefaultsPreProc PreProc - HiLink xdefaultsInclude xdefaultsPreProc - HiLink xdefaultsCppSkip xdefaultsCppOut - HiLink xdefaultsCppOut2 xdefaultsCppOut - HiLink xdefaultsCppOut Comment - HiLink xdefaultsIncluded String - HiLink xdefaultsDefine Macro - HiLink xdefaultsSymbol Statement - HiLink xdefaultsSpecial Statement - HiLink xdefaultsErrorLine Error - HiLink xdefaultsCommentError Error - HiLink xdefaultsPunct Normal - HiLink xdefaultsLineEnd Special - HiLink xdefaultsTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> +HiLink xdefaultsLabel Type +HiLink xdefaultsValue Constant +HiLink xdefaultsComment Comment +HiLink xdefaultsCommentH xdefaultsComment +HiLink xdefaultsPreProc PreProc +HiLink xdefaultsInclude xdefaultsPreProc +HiLink xdefaultsCppSkip xdefaultsCppOut +HiLink xdefaultsCppOut2 xdefaultsCppOut +HiLink xdefaultsCppOut Comment +HiLink xdefaultsIncluded String +HiLink xdefaultsDefine Macro +HiLink xdefaultsSymbol Statement +HiLink xdefaultsSpecial Statement +HiLink xdefaultsErrorLine Error +HiLink xdefaultsCommentError Error +HiLink xdefaultsPunct Normal +HiLink xdefaultsLineEnd Special +HiLink xdefaultsTodo Todo + +delcommand HiLink let b:current_syntax = "xdefaults" diff --git a/runtime/syntax/xf86conf.vim b/runtime/syntax/xf86conf.vim index 62784d228..545eda7db 100644 --- a/runtime/syntax/xf86conf.vim +++ b/runtime/syntax/xf86conf.vim @@ -10,12 +10,8 @@ " to force XFree86 3.x or 4.x XF86Config syntax " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/xkb.vim b/runtime/syntax/xkb.vim index ff9bfd0da..efb7d66c0 100644 --- a/runtime/syntax/xkb.vim +++ b/runtime/syntax/xkb.vim @@ -6,12 +6,9 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -50,42 +47,35 @@ syn keyword xkbTModif default hidden partial virtual syn keyword xkbSect alphanumeric_keys alternate_group function_keys keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types " Define the default highlighting -if version >= 508 || !exists("did_xkb_syntax_inits") - if version < 508 - let did_xkb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink xkbModif xkbPreproc - HiLink xkbTModif xkbPreproc - HiLink xkbPreproc Preproc - - HiLink xkbIdentifier Keyword - HiLink xkbFunction Function - HiLink xkbSect Type - HiLink xkbPhysicalKey Identifier - HiLink xkbKeyword Keyword - - HiLink xkbComment Comment - HiLink xkbTodo Todo - - HiLink xkbConstant Constant - HiLink xkbString String - - HiLink xkbSpecialChar xkbSpecial - HiLink xkbSpecial Special - - HiLink xkbParenError xkbBalancingError - HiLink xkbBraceError xkbBalancingError - HiLink xkbBraketError xkbBalancingError - HiLink xkbBalancingError xkbError - HiLink xkbCommentStartError xkbCommentError - HiLink xkbCommentError xkbError - HiLink xkbError Error - - delcommand HiLink -endif +command -nargs=+ HiLink hi def link <args> + +HiLink xkbModif xkbPreproc +HiLink xkbTModif xkbPreproc +HiLink xkbPreproc Preproc + +HiLink xkbIdentifier Keyword +HiLink xkbFunction Function +HiLink xkbSect Type +HiLink xkbPhysicalKey Identifier +HiLink xkbKeyword Keyword + +HiLink xkbComment Comment +HiLink xkbTodo Todo + +HiLink xkbConstant Constant +HiLink xkbString String + +HiLink xkbSpecialChar xkbSpecial +HiLink xkbSpecial Special + +HiLink xkbParenError xkbBalancingError +HiLink xkbBraceError xkbBalancingError +HiLink xkbBraketError xkbBalancingError +HiLink xkbBalancingError xkbError +HiLink xkbCommentStartError xkbCommentError +HiLink xkbCommentError xkbError +HiLink xkbError Error + +delcommand HiLink let b:current_syntax = "xkb" diff --git a/runtime/syntax/xmath.vim b/runtime/syntax/xmath.vim index 5434f928c..a81adf53c 100644 --- a/runtime/syntax/xmath.vim +++ b/runtime/syntax/xmath.vim @@ -5,11 +5,8 @@ " Version: 7 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -194,42 +191,34 @@ syn sync match xmathSyncComment grouphere xmathCommentBlock "#{" syn sync match xmathSyncComment groupthere NONE "}#" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_xmath_syntax_inits") - if version < 508 - let did_xmath_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink xmathBraceError xmathError - HiLink xmathCmd xmathStatement - HiLink xmathCommentBlock xmathComment - HiLink xmathCurlyError xmathError - HiLink xmathFuncCmd xmathStatement - HiLink xmathParenError xmathError - - " The default methods for highlighting. Can be overridden later - HiLink xmathCharacter Character - HiLink xmathComma Delimiter - HiLink xmathComment Comment - HiLink xmathCommentBlock Comment - HiLink xmathConditional Conditional - HiLink xmathError Error - HiLink xmathFunc Function - HiLink xmathLabel PreProc - HiLink xmathNumber Number - HiLink xmathRepeat Repeat - HiLink xmathSpecial Type - HiLink xmathSpecialChar SpecialChar - HiLink xmathStatement Statement - HiLink xmathString String - HiLink xmathTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink xmathBraceError xmathError +HiLink xmathCmd xmathStatement +HiLink xmathCommentBlock xmathComment +HiLink xmathCurlyError xmathError +HiLink xmathFuncCmd xmathStatement +HiLink xmathParenError xmathError + +" The default methods for highlighting. Can be overridden later +HiLink xmathCharacter Character +HiLink xmathComma Delimiter +HiLink xmathComment Comment +HiLink xmathCommentBlock Comment +HiLink xmathConditional Conditional +HiLink xmathError Error +HiLink xmathFunc Function +HiLink xmathLabel PreProc +HiLink xmathNumber Number +HiLink xmathRepeat Repeat +HiLink xmathSpecial Type +HiLink xmathSpecialChar SpecialChar +HiLink xmathStatement Statement +HiLink xmathString String +HiLink xmathTodo Todo + +delcommand HiLink let b:current_syntax = "xmath" diff --git a/runtime/syntax/xpm.vim b/runtime/syntax/xpm.vim index 3cbc1b54f..8cc92a118 100644 --- a/runtime/syntax/xpm.vim +++ b/runtime/syntax/xpm.vim @@ -4,11 +4,8 @@ " Last Change: 2008 May 28 " Version: 5.4n.1 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -126,24 +123,16 @@ unlet color chars colors cpp n i s endif " has("gui_running") " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_xpm_syntax_inits") - if version < 508 - let did_xpm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink xpmType Type - HiLink xpmStorageClass StorageClass - HiLink xpmTodo Todo - HiLink xpmComment Comment - HiLink xpmPixelString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink xpmType Type +HiLink xpmStorageClass StorageClass +HiLink xpmTodo Todo +HiLink xpmComment Comment +HiLink xpmPixelString String + +delcommand HiLink let b:current_syntax = "xpm" diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim index 74b3c66af..908f3914e 100644 --- a/runtime/syntax/xpm2.vim +++ b/runtime/syntax/xpm2.vim @@ -7,11 +7,8 @@ " " Made from xpm.vim by Ronald Schild <rs@scutum.de> -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -23,13 +20,8 @@ syn keyword xpm2Todo TODO FIXME XXX contained syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo -if version < 508 - command -nargs=+ HiLink hi link <args> - command -nargs=+ Hi hi <args> -else - command -nargs=+ HiLink hi def link <args> - command -nargs=+ Hi hi def <args> -endif +command -nargs=+ HiLink hi def link <args> +command -nargs=+ Hi hi def <args> if has("gui_running") @@ -144,20 +136,14 @@ if has("gui_running") endif " has("gui_running") " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_xpm2_syntax_inits") - if version < 508 - let did_xpm2_syntax_inits = 1 - endif - - " The default highlighting. - HiLink xpm2Type Type - HiLink xpm2StorageClass StorageClass - HiLink xpm2Todo Todo - HiLink xpm2Comment Comment - HiLink xpm2PixelString String -endif +" Only when an item doesn't have highlighting yet +" The default highlighting. +HiLink xpm2Type Type +HiLink xpm2StorageClass StorageClass +HiLink xpm2Todo Todo +HiLink xpm2Comment Comment +HiLink xpm2PixelString String + delcommand HiLink delcommand Hi diff --git a/runtime/syntax/xs.vim b/runtime/syntax/xs.vim index 6fd0a468f..9a9140fdd 100644 --- a/runtime/syntax/xs.vim +++ b/runtime/syntax/xs.vim @@ -5,20 +5,13 @@ " Previous: Vincent Pit <perl@profvince.com> " Last Change: 2013-05-12 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Read the C syntax to start with -if version < 600 - source <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim let xs_superseded = 1 " mark C functions superseded by Perl replacements let xs_not_core = 1 " mark private core functions @@ -3249,29 +3242,21 @@ syn keyword xsMacro what_len_TRICKYFOLD_safe whichsig write xio_any xio_dirp syn keyword xsMacro xiv_iv xuv_uv yystype " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_xs_syntax_inits") - if version < 508 - let did_xs_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink xsPrivate Error - HiLink xsSuperseded Error - HiLink xsType Type - HiLink xsString String - HiLink xsConstant Constant - HiLink xsException Exception - HiLink xsKeyword Keyword - HiLink xsFunction Function - HiLink xsVariable Identifier - HiLink xsMacro Macro +HiLink xsPrivate Error +HiLink xsSuperseded Error +HiLink xsType Type +HiLink xsString String +HiLink xsConstant Constant +HiLink xsException Exception +HiLink xsKeyword Keyword +HiLink xsFunction Function +HiLink xsVariable Identifier +HiLink xsMacro Macro - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "xs" diff --git a/runtime/syntax/xxd.vim b/runtime/syntax/xxd.vim index b2b1e4460..1145ebccf 100644 --- a/runtime/syntax/xxd.vim +++ b/runtime/syntax/xxd.vim @@ -6,11 +6,8 @@ " Notes: use :help xxd to see how to invoke it " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -20,22 +17,14 @@ syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot syn match xxdDot contained "[.\r]" " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_xxd_syntax_inits") - if version < 508 - let did_xxd_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - HiLink xxdAddress Constant - HiLink xxdSep Identifier - HiLink xxdAscii Statement +HiLink xxdAddress Constant +HiLink xxdSep Identifier +HiLink xxdAscii Statement - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "xxd" diff --git a/runtime/syntax/yacc.vim b/runtime/syntax/yacc.vim index c65109e28..8736baf94 100644 --- a/runtime/syntax/yacc.vim +++ b/runtime/syntax/yacc.vim @@ -10,9 +10,6 @@ " --------------------------------------------------------------------- " this version of syntax/yacc.vim requires 6.0 or later -if version < 600 - finish -endif if exists("b:current_syntax") syntax clear endif diff --git a/runtime/syntax/z8a.vim b/runtime/syntax/z8a.vim index a3a8a2bbd..054f6390e 100644 --- a/runtime/syntax/z8a.vim +++ b/runtime/syntax/z8a.vim @@ -3,11 +3,8 @@ " Maintainer: Milan Pikula <www@fornax.elf.stuba.sk> " Last Change: 2003 May 11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -85,30 +82,22 @@ syn match z8aComment ";.*" syn case match " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_z8a_syntax_inits") - if version < 508 - let did_z8a_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink z8aSection Special - HiLink z8aLabel Label - HiLink z8aSpecialLabel Label - HiLink z8aComment Comment - HiLink z8aInstruction Statement - HiLink z8aSpecInst Statement - HiLink z8aInclude Include - HiLink z8aPreCondit PreCondit - HiLink z8aPreProc PreProc - HiLink z8aNumber Number - HiLink z8aString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +HiLink z8aSection Special +HiLink z8aLabel Label +HiLink z8aSpecialLabel Label +HiLink z8aComment Comment +HiLink z8aInstruction Statement +HiLink z8aSpecInst Statement +HiLink z8aInclude Include +HiLink z8aPreCondit PreCondit +HiLink z8aPreProc PreProc +HiLink z8aNumber Number +HiLink z8aString String + +delcommand HiLink let b:current_syntax = "z8a" " vim: ts=8 |