1
0
forked from aniani/vim

Updated runtime files. Remove version checks for Vim older than 6.0.

This commit is contained in:
Bram Moolenaar 2016-08-30 23:26:57 +02:00
parent 4792255eff
commit 89bcfda683
427 changed files with 9298 additions and 12948 deletions

View File

@ -93,7 +93,7 @@ function! s:GetBufferRubyEntity( name, type, ... )
let stopline = 1 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] = searchpos( crex, 'w' )
"let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' ) "let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' )
@ -149,7 +149,7 @@ function! s:GetRubyVarType(v)
let ctors = ctors.'\)' let ctors = ctors.'\)'
let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)' 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) let [lnum,lcol] = searchpos(sstr,'nb',stopline)
if lnum != 0 && lcol != 0 if lnum != 0 && lcol != 0
let str = matchstr(getline(lnum),fstr,lcol) let str = matchstr(getline(lnum),fstr,lcol)
@ -266,6 +266,28 @@ class VimRubyCompletion
end end
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) def load_buffer_class(name)
dprint "load_buffer_class(%s) START" % name dprint "load_buffer_class(%s) START" % name
classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")')
@ -588,6 +610,10 @@ class VimRubyCompletion
load_rails load_rails
end end
want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')")
load_gems unless want_gems.to_i.zero?
input = VIM::Buffer.current.line input = VIM::Buffer.current.line
cpos = VIM::Window.current.cursor[1] - 1 cpos = VIM::Window.current.cursor[1] - 1
input = input[0..cpos] input = input[0..cpos]
@ -678,7 +704,9 @@ class VimRubyCompletion
cv = eval("self.class.constants") cv = eval("self.class.constants")
vartype = get_var_type( receiver ) vartype = get_var_type( receiver )
dprint "vartype: %s" % vartype dprint "vartype: %s" % vartype
if vartype != ''
invalid_vartype = ['', "gets"]
if !invalid_vartype.include?(vartype)
load_buffer_class( vartype ) load_buffer_class( vartype )
begin begin
@ -706,7 +734,7 @@ class VimRubyCompletion
methods.concat m.instance_methods(false) methods.concat m.instance_methods(false)
} }
end 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*\)?\.([^.]*)/ when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/
message = $1 message = $1

View File

@ -1,7 +1,7 @@
" Vim compiler file " Vim compiler file
" Compiler: Cucumber " Compiler: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 Aug 09 " Last Change: 2016 Aug 29
if exists("current_compiler") if exists("current_compiler")
finish finish
@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber
CompilerSet errorformat= CompilerSet errorformat=
\%W%m\ (Cucumber::Undefined), \%W%m\ (Cucumber::Undefined),
\%E%m\ (%.%#), \%E%m\ (%\\S%#),
\%Z%f:%l, \%Z%f:%l,
\%Z%f:%l:%.%# \%Z%f:%l:%.%#

View File

@ -1,7 +1,7 @@
" Vim compiler file " Vim compiler file
" Compiler: Haml " Compiler: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists("current_compiler") if exists("current_compiler")
finish finish
@ -15,7 +15,7 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo-=C set cpo-=C
CompilerSet makeprg=haml\ -c CompilerSet makeprg=haml
CompilerSet errorformat= CompilerSet errorformat=
\Haml\ %trror\ on\ line\ %l:\ %m, \Haml\ %trror\ on\ line\ %l:\ %m,

View File

@ -27,7 +27,11 @@ CompilerSet errorformat=
\%\\s%#[%f:%l:\ %#%m, \%\\s%#[%f:%l:\ %#%m,
\%\\s%#%f:%l:\ %#%m, \%\\s%#%f:%l:\ %#%m,
\%\\s%#%f:%l:, \%\\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 let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save

View File

@ -22,9 +22,10 @@ CompilerSet errorformat=
\%f:%l:\ %tarning:\ %m, \%f:%l:\ %tarning:\ %m,
\%E%.%#:in\ `load':\ %f:%l:%m, \%E%.%#:in\ `load':\ %f:%l:%m,
\%E%f:%l:in\ `%*[^']':\ %m, \%E%f:%l:in\ `%*[^']':\ %m,
\%-Z\ \ \ \ \ \#\ %f:%l:%.%#, \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#,
\%E\ \ %\\d%\\+)%.%#, \%E\ \ %\\d%\\+)%.%#,
\%C\ \ \ \ \ %m, \%C\ \ \ \ \ %m,
\%C%\\s%#,
\%-G%.%# \%-G%.%#
let &cpo = s:cpo_save let &cpo = s:cpo_save

View File

@ -17,6 +17,8 @@ let s:cpo_save = &cpo
set cpo-=C set cpo-=C
CompilerSet makeprg=testrb CompilerSet makeprg=testrb
" CompilerSet makeprg=ruby\ -Itest
" CompilerSet makeprg=m
CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:, CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
\%C%m\ [%f:%l]:, \%C%m\ [%f:%l]:,

View File

@ -1,7 +1,7 @@
" Vim compiler file " Vim compiler file
" Compiler: Sass " Compiler: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists("current_compiler") if exists("current_compiler")
finish finish
@ -15,7 +15,7 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo-=C set cpo-=C
CompilerSet makeprg=sass\ -c CompilerSet makeprg=sass
CompilerSet errorformat= CompilerSet errorformat=
\%f:%l:%m\ (Sass::Syntax%trror), \%f:%l:%m\ (Sass::Syntax%trror),

View File

@ -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. " Show @@@ in the last line if it is truncated.
set display=truncate 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 set scrolloff=5
" Do incremental searching when it's possible to timeout. " Do incremental searching when it's possible to timeout.

View File

@ -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 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: 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 not equal
expr5 > expr5 greater than expr5 > expr5 greater than
expr5 >= expr5 greater than or equal expr5 >= expr5 greater than or equal
@ -666,19 +670,23 @@ Expression syntax summary, from least to most significant:
expr5 is expr5 same |List| instance expr5 is expr5 same |List| instance
expr5 isnot expr5 different |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 .. number subtraction
expr6 . expr6 .. string concatenation expr6 . expr6 .. string concatenation
|expr6| expr7 * expr7 .. number multiplication |expr6| expr7
expr7 * expr7 .. number multiplication
expr7 / expr7 .. number division expr7 / expr7 .. number division
expr7 % expr7 .. number modulo expr7 % expr7 .. number modulo
|expr7| ! expr7 logical NOT |expr7| expr8
! expr7 logical NOT
- expr7 unary minus - expr7 unary minus
+ expr7 unary plus + 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[expr1 : expr1] substring of a String or sublist of a |List|
expr8.name entry in a |Dictionary| expr8.name entry in a |Dictionary|
expr8(expr1, ...) function call with |Funcref| variable expr8(expr1, ...) function call with |Funcref| variable

View File

@ -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 VIM REFERENCE MANUAL by George Reilly
@ -144,29 +144,8 @@ the console.
5. Running under Windows 3.1 *win32-win3.1* 5. Running under Windows 3.1 *win32-win3.1*
*win32s* *windows-3.1* *win32s* *windows-3.1*
There is a special version of Gvim that runs under Windows 3.1 and 3.11. You There was a special version of Gvim that runs under Windows 3.1 and 3.11.
need the gvim.exe that was compiled with Visual C++ 4.1. Support was removed in patch 7.4.1363.
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.
============================================================================== ==============================================================================
6. Win32 mini FAQ *win32-faq* 6. Win32 mini FAQ *win32-faq*

View File

@ -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 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. Make ":filter" work with more commands.
Search for: msg_putchar('\n') 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: +channel:
- Implement |job-term| ? - Implement |job-term| ?
- Channel test fails with Motif. Sometimes kills the X11 server. - 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) Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
What does it change? 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 When generating the Unicode tables with runtime/tools/unicode.vim the
emoji_width table has only one entry. emoji_width table has only one entry.

View File

@ -211,7 +211,7 @@ Ex commands: ~
|:cfdo| execute command in each file in error list |:cfdo| execute command in each file in error list
|:chistory| display quickfix list stack |:chistory| display quickfix list stack
|:clearjumps| clear the jump list |: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 |:helpclose| close one help window
|:lbottom| scroll to the bottom of the location window |:lbottom| scroll to the bottom of the location window
|:ldo| execute command in valid location list entries |: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 src/testdir/test_autocmd.vim, runtime/doc/autocmd.txt
Patch 7.4.2078 Patch 7.4.2078
Problem: Running checks in po diretory fails. Problem: Running checks in po directory fails.
Solution: Add colors used in syntax.c to the builtiin color table. Solution: Add colors used in syntax.c to the builtin color table.
Files: src/term.c Files: src/term.c
Patch 7.4.2079 Patch 7.4.2079

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Cucumber " Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " 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 " Only do this when not done yet for this buffer
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))
@ -19,27 +19,23 @@ setlocal omnifunc=CucumberComplete
let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:undo_ftplugin = "setl fo< com< cms< ofu<"
let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') 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") if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps")
nnoremap <silent><buffer> <C-]> :<C-U>exe <SID>jump('edit',v:count)<CR> cnoremap <SID>foldopen <Bar>if &foldopen =~# 'tag'<Bar>exe 'norm! zv'<Bar>endif
nnoremap <silent><buffer> [<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR> nnoremap <silent> <script> <buffer> [<C-D> :<C-U>exe <SID>jump('edit',v:count)<SID>foldopen<CR>
nnoremap <silent><buffer> ]<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR> nnoremap <silent> <script> <buffer> ]<C-D> :<C-U>exe <SID>jump('edit',v:count)<SID>foldopen<CR>
nnoremap <silent><buffer> <C-W>] :<C-U>exe <SID>jump('split',v:count)<CR> nnoremap <silent> <script> <buffer> <C-W>d :<C-U>exe <SID>jump('split',v:count)<SID>foldopen<CR>
nnoremap <silent><buffer> <C-W><C-]> :<C-U>exe <SID>jump('split',v:count)<CR> nnoremap <silent> <script> <buffer> <C-W><C-D> :<C-U>exe <SID>jump('split',v:count)<SID>foldopen<CR>
nnoremap <silent><buffer> <C-W>d :<C-U>exe <SID>jump('split',v:count)<CR> nnoremap <silent> <script> <buffer> [d :<C-U>exe <SID>jump('pedit',v:count)<CR>
nnoremap <silent><buffer> <C-W><C-D> :<C-U>exe <SID>jump('split',v:count)<CR> nnoremap <silent> <script> <buffer> ]d :<C-U>exe <SID>jump('pedit',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>
let b:undo_ftplugin .= let b:undo_ftplugin .=
\ "|sil! nunmap <buffer> <C-]>" .
\ "|sil! nunmap <buffer> [<C-D>" . \ "|sil! nunmap <buffer> [<C-D>" .
\ "|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>d" .
\ "|sil! nunmap <buffer> <C-W><C-D>" . \ "|sil! nunmap <buffer> <C-W><C-D>" .
\ "|sil! nunmap <buffer> <C-W>}" .
\ "|sil! nunmap <buffer> [d" . \ "|sil! nunmap <buffer> [d" .
\ "|sil! nunmap <buffer> ]d" \ "|sil! nunmap <buffer> ]d"
endif endif
@ -59,7 +55,7 @@ endfunction
function! s:allsteps() function! s:allsteps()
let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)'
let steps = [] 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 lines = readfile(file)
let num = 0 let num = 0
for line in lines for line in lines

View File

@ -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 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\+') let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == '' 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 endif
if b:eruby_subtype == 'rhtml' if b:eruby_subtype == 'rhtml'
let b:eruby_subtype = 'html' let b:eruby_subtype = 'html'

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: generic git output " Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " 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 " Only do this when not done yet for this buffer
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))
@ -12,6 +12,8 @@ let b:did_ftplugin = 1
if !exists('b:git_dir') if !exists('b:git_dir')
if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' if expand('%:p') =~# '[\/]\.git[\/]modules[\/]'
" Stay out of the way " Stay out of the way
elseif expand('%:p') =~# '[\/]\.git[\/]worktrees'
let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>')
elseif expand('%:p') =~# '\.git\>' elseif expand('%:p') =~# '\.git\>'
let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
elseif $GIT_DIR != '' elseif $GIT_DIR != ''

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: git commit file " Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " 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 " Only do this when not done yet for this buffer
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))
@ -11,15 +11,10 @@ endif
runtime! ftplugin/git.vim runtime! ftplugin/git.vim
let b:did_ftplugin = 1 let b:did_ftplugin = 1
setlocal nomodeline tabstop=8 formatoptions-=croq formatoptions+=tl setlocal comments=:# commentstring=#\ %s
setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions<' setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<'
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
if exists("g:no_gitcommit_commands") || v:version < 700 if exists("g:no_gitcommit_commands") || v:version < 700
finish 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>) 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) function! s:diffcomplete(A,L,P)
let args = "" let args = ""
if a:P <= match(a:L." -- "," -- ")+3 if a:P <= match(a:L." -- "," -- ")+3

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: git rebase --interactive " Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " 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 " Only do this when not done yet for this buffer
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))
@ -12,10 +12,11 @@ runtime! ftplugin/git.vim
let b:did_ftplugin = 1 let b:did_ftplugin = 1
setlocal comments=:# commentstring=#\ %s formatoptions-=t setlocal comments=:# commentstring=#\ %s formatoptions-=t
setlocal nomodeline
if !exists("b:undo_ftplugin") if !exists("b:undo_ftplugin")
let b:undo_ftplugin = "" let b:undo_ftplugin = ""
endif 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) function! s:choose(word)
s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Haml " Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " 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 " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Markdown " Language: Markdown
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@ -11,7 +11,7 @@ runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o 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') if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setl cms< com< fo< flp<" let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
@ -19,4 +19,32 @@ else
let b:undo_ftplugin = "setl cms< com< fo< flp<" let b:undo_ftplugin = "setl cms< com< fo< flp<"
endif 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: " vim:set sw=2:

View File

@ -28,12 +28,13 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ ':' . \ ':' .
\ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' . \ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
\ ':' . \ ':' .
\ '\<end\>' . \ '\%(^\|[^.\:@$]\)\@<=\<end\:\@!\>' .
\ ',{:},\[:\],(:)' \ ',{:},\[:\],(:)'
let b:match_skip = let b:match_skip =
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" . \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
\ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Escape\\|" . \ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Escape\\|" .
\ "Regexp\\|RegexpDelimiter\\|" .
\ "Interpolation\\|NoInterpolation\\|Comment\\|Documentation\\|" . \ "Interpolation\\|NoInterpolation\\|Comment\\|Documentation\\|" .
\ "ConditionalModifier\\|RepeatModifier\\|OptionalDo\\|" . \ "ConditionalModifier\\|RepeatModifier\\|OptionalDo\\|" .
\ "Function\\|BlockArgument\\|KeywordAsMethod\\|ClassVariable\\|" . \ "Function\\|BlockArgument\\|KeywordAsMethod\\|ClassVariable\\|" .
@ -43,7 +44,7 @@ endif
setlocal formatoptions-=t formatoptions+=croql setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\>\\\|require\\>\\\|autoload\\s*:\\=[\"']\\=\\h\\w*[\"']\\=,\\) 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 setlocal suffixesadd=.rb
if exists("&ofu") && has("ruby") if exists("&ofu") && has("ruby")
@ -66,32 +67,32 @@ if !exists('g:ruby_version_paths')
let g:ruby_version_paths = {} let g:ruby_version_paths = {}
endif endif
function! s:query_path(root) function! s:query_path(root) abort
let code = "print $:.join %q{,}" let code = "print $:.join %q{,}"
if &shell =~# 'sh' && $PATH !~# '\s' if &shell =~# 'sh'
let prefix = 'env PATH='.$PATH.' ' let prefix = 'env PATH='.shellescape($PATH).' '
else else
let prefix = '' let prefix = ''
endif endif
if &shellxquote == "'" if &shellxquote == "'"
let path_check = prefix.'ruby -e "' . code . '"' let path_check = prefix.'ruby --disable-gems -e "' . code . '"'
else else
let path_check = prefix."ruby -e '" . code . "'" let path_check = prefix."ruby --disable-gems -e '" . code . "'"
endif endif
let cd = haslocaldir() ? 'lcd' : 'cd' let cd = haslocaldir() ? 'lcd' : 'cd'
let cwd = getcwd() let cwd = fnameescape(getcwd())
try try
exe cd fnameescape(a:root) exe cd fnameescape(a:root)
let path = split(system(path_check),',') let path = split(system(path_check),',')
exe cd fnameescape(cwd) exe cd cwd
return path return path
finally finally
exe cd fnameescape(cwd) exe cd cwd
endtry endtry
endfunction endfunction
function! s:build_path(path) function! s:build_path(path) abort
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',') let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
if &g:path !~# '\v^\.%(,/%(usr|emx)/include)=,,$' if &g:path !~# '\v^\.%(,/%(usr|emx)/include)=,,$'
let path = substitute(&g:path,',,$',',','') . ',' . path let path = substitute(&g:path,',,$',',','') . ',' . path
@ -101,7 +102,7 @@ endfunction
if !exists('b:ruby_version') && !exists('g:ruby_path') && isdirectory(expand('%:p:h')) if !exists('b:ruby_version') && !exists('g:ruby_path') && isdirectory(expand('%:p:h'))
let s:version_file = findfile('.ruby-version', '.;') 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), '') let b:ruby_version = get(readfile(s:version_file, '', 1), '')
if !has_key(g:ruby_version_paths, b:ruby_version) 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')) 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"'),',') let &l:tags = &tags . ',' . join(map(copy(s:ruby_paths),'v:val."/tags"'),',')
endif 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" . let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" .
\ "All Files (*.*)\t*.*\n" \ "All Files (*.*)\t*.*\n"
endif 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 exists('&ofu') && has('ruby') | setl ofu< | endif"
\."| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | 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") 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','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('\<def\>','rubyDefine','','n')<CR>
nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','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> [[' | 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'" \."| 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> im :<C-U>call <SID>wrap_i('[m',']M')<CR>
onoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[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> 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'" \."| sil! exe 'xunmap <buffer> im' | sil! exe 'xunmap <buffer> am'"
endif 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> iM :<C-U>call <SID>wrap_i('[[','][')<CR>
onoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR> onoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR>
xnoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<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'" \."| sil! exe 'xunmap <buffer> iM' | sil! exe 'xunmap <buffer> aM'"
endif endif
if maparg("\<C-]>",'n') == '' call s:map('c', '', '<C-R><C-W> <Plug><cword>')
nnoremap <silent> <buffer> <C-]> :<C-U>exe v:count1."tag <C-R>=RubyCursorIdentifier()<CR>"<CR> call s:map('c', '', '<C-R><C-F> <Plug><cfile>')
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') == '' cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : ''
" By using findfile() rather than gf's normal behavior, we prevent call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><cword>"<SID>tagzv<CR>')
" erroneously editing a directory. call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><cword>"<SID>tagzv<CR>')
nnoremap <silent> <buffer> gf :<C-U>exe <SID>gf(v:count1,"gf",'edit')<CR> call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><cword>"<SID>tagzv<CR>')
nnoremap <silent> <buffer> <C-W>f :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>f",'split')<CR> call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>')
nnoremap <silent> <buffer> <C-W><C-F> :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>\<Lt>C-F>",'split')<CR> call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>')
nnoremap <silent> <buffer> <C-W>gf :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>gf",'tabedit')<CR> call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><cword>"<SID>tagzv<CR>')
let b:undo_ftplugin = b:undo_ftplugin call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><cword>"<SID>tagzv<CR>')
\."| 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'" call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><cword>"<CR>')
endif 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 endif
let &cpo = s:cpo_save let &cpo = s:cpo_save
@ -225,7 +232,7 @@ if exists("g:did_ruby_ftplugin_functions")
endif endif
let g:did_ruby_ftplugin_functions = 1 let g:did_ruby_ftplugin_functions = 1
function! RubyBalloonexpr() function! RubyBalloonexpr() abort
if !exists('s:ri_found') if !exists('s:ri_found')
let s:ri_found = executable('ri') let s:ri_found = executable('ri')
endif endif
@ -274,13 +281,13 @@ function! RubyBalloonexpr()
endif endif
endfunction endfunction
function! s:searchsyn(pattern,syn,flags,mode) function! s:searchsyn(pattern, syn, flags, mode) abort
let cnt = v:count1
norm! m' norm! m'
if a:mode ==# 'v' if a:mode ==# 'v'
norm! gv norm! gv
endif endif
let i = 0 let i = 0
let cnt = v:count ? v:count : 1
while i < cnt while i < cnt
let i = i + 1 let i = i + 1
let line = line('.') let line = line('.')
@ -296,11 +303,11 @@ function! s:searchsyn(pattern,syn,flags,mode)
endwhile endwhile
endfunction endfunction
function! s:synname() function! s:synname() abort
return synIDattr(synID(line('.'),col('.'),0),'name') return synIDattr(synID(line('.'),col('.'),0),'name')
endfunction endfunction
function! s:wrap_i(back,forward) function! s:wrap_i(back,forward) abort
execute 'norm k'.a:forward execute 'norm k'.a:forward
let line = line('.') let line = line('.')
execute 'norm '.a:back execute 'norm '.a:back
@ -310,7 +317,7 @@ function! s:wrap_i(back,forward)
execute 'norm jV'.a:forward.'k' execute 'norm jV'.a:forward.'k'
endfunction endfunction
function! s:wrap_a(back,forward) function! s:wrap_a(back,forward) abort
execute 'norm '.a:forward execute 'norm '.a:forward
if line('.') < line('$') && getline(line('.')+1) ==# '' if line('.') < line('$') && getline(line('.')+1) ==# ''
let after = 1 let after = 1
@ -328,37 +335,55 @@ function! s:wrap_a(back,forward)
endif endif
endfunction 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 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 number = '\%(\%(\w\|[]})\"'."'".']\s*\)\@<!-\)\=\%(\<[[:digit:]_]\+\%(\.[[:digit:]_]\+\)\=\%([Ee][[:digit:]_]\+\)\=\>\|\<0[xXbBoOdD][[:xdigit:]_]\+\>\)\|'.asciicode
let operator = '\%(\[\]\|<<\|<=>\|[!<>]=\=\|===\=\|[!=]\~\|>>\|\*\*\|\.\.\.\=\|=>\|[~^&|*/%+-]\)' let operator = '\%(\[\]\|<<\|<=>\|[!<>]=\=\|===\=\|[!=]\~\|>>\|\*\*\|\.\.\.\=\|=>\|[~^&|*/%+-]\)'
let method = '\%(\<[_a-zA-Z]\w*\>\%([?!]\|\s*=>\@!\)\=\)' let method = '\%(\.[_a-zA-Z]\w*\s*=>\@!\|\<[_a-zA-Z]\w*\>[?!]\=\)'
let global = '$\%([!$&"'."'".'*+,./:;<=>?@\`~]\|-\=\w\+\>\)' let global = '$\%([!$&"'."'".'*+,./:;<=>?@\`~]\|-\=\w\+\>\)'
let symbolizable = '\%(\%(@@\=\)\w\+\>\|'.global.'\|'.method.'\|'.operator.'\)' let symbolizable = '\%(\%(@@\=\)\w\+\>\|'.global.'\|'.method.'\|'.operator.'\)'
let pattern = '\C\s*\%('.number.'\|\%(:\@<!:\)\='.symbolizable.'\)' let pattern = '\C\s*\%('.number.'\|\%(:\@<!:\)\='.symbolizable.'\)'
let [lnum, col] = searchpos(pattern,'bcn',line('.')) let [lnum, col] = searchpos(pattern,'bcn',line('.'))
let raw = matchstr(getline('.')[col-1 : ],pattern) 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 return stripped == '' ? expand("<cword>") : stripped
endfunction endfunction
function! s:gf(count,map,edit) abort function! RubyCursorFile() abort
if getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$' let isfname = &isfname
let target = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') try
return a:edit.' %:h/'.target.'.rb' set isfname+=:
elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$' let cfile = expand('<cfile>')
let target = matchstr(getline('.'),'\(["'']\)\.\./\zs.\{-\}\ze\1') finally
return a:edit.' %:h/'.target.'.rb' 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*$' 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 else
let target = expand('<cfile>') return substitute(cfile, '\C\v^(.*):(\d+)%(:in)=$', '+\2 \1', '')
endif endif
let found = findfile(target, &path, a:count) let cwdpat = '^\M' . substitute(getcwd(), '[\/]', '\\[\\/]', 'g').'\ze\[\/]'
if found ==# '' let cfile = substitute(cfile, cwdpat, '.', '')
return 'norm! '.a:count.a:map if fnameescape(cfile) !=# cfile
return '+ '.fnameescape(cfile)
else else
return a:edit.' '.fnameescape(found) return cfile
endif endif
endfunction endfunction

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Sass " Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " 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 " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@ -9,8 +9,9 @@ if exists("b:did_ftplugin")
endif endif
let b:did_ftplugin = 1 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 commentstring=//\ %s
setlocal define=^\\s*\\%(@mixin\\\|=\\) setlocal define=^\\s*\\%(@mixin\\\|=\\)
setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','') setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','')

View File

@ -1,12 +1,13 @@
" Vim filetype plugin " Vim filetype plugin
" Language: SCSS " Language: SCSS
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 Jul 26 " Last Change: 2016 Aug 29
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
endif endif
runtime! ftplugin/sass.vim runtime! ftplugin/sass.vim
setlocal comments=s1:/*,mb:*,ex:*/,://
" vim:set sw=2: " vim:set sw=2:

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Cucumber " Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -27,6 +27,7 @@ function! GetCucumberIndent()
let line = getline(prevnonblank(v:lnum-1)) let line = getline(prevnonblank(v:lnum-1))
let cline = getline(v:lnum) let cline = getline(v:lnum)
let nline = getline(nextnonblank(v:lnum+1)) let nline = getline(nextnonblank(v:lnum+1))
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
let syn = s:syn(prevnonblank(v:lnum-1)) let syn = s:syn(prevnonblank(v:lnum-1))
let csyn = s:syn(v:lnum) let csyn = s:syn(v:lnum)
let nsyn = s:syn(nextnonblank(v:lnum+1)) let nsyn = s:syn(nextnonblank(v:lnum+1))
@ -35,38 +36,38 @@ function! GetCucumberIndent()
return 0 return 0
elseif csyn ==# 'cucumberExamples' || cline =~# '^\s*\%(Examples\|Scenarios\):' elseif csyn ==# 'cucumberExamples' || cline =~# '^\s*\%(Examples\|Scenarios\):'
" examples heading " examples heading
return 2 * &sw return 2 * sw
elseif csyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || cline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' elseif csyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || cline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):'
" background, scenario or outline heading " background, scenario or outline heading
return &sw return sw
elseif syn ==# 'cucumberFeature' || line =~# '^\s*Feature:' elseif syn ==# 'cucumberFeature' || line =~# '^\s*Feature:'
" line after feature heading " line after feature heading
return &sw return sw
elseif syn ==# 'cucumberExamples' || line =~# '^\s*\%(Examples\|Scenarios\):' elseif syn ==# 'cucumberExamples' || line =~# '^\s*\%(Examples\|Scenarios\):'
" line after examples heading " line after examples heading
return 3 * &sw return 3 * sw
elseif syn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || line =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' elseif syn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || line =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):'
" line after background, scenario or outline heading " 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) elseif cline =~# '^\s*[@#]' && (nsyn == 'cucumberFeature' || nline =~# '^\s*Feature:' || indent(prevnonblank(v:lnum-1)) <= 0)
" tag or comment before a feature heading " tag or comment before a feature heading
return 0 return 0
elseif cline =~# '^\s*@' elseif cline =~# '^\s*@'
" other tags " other tags
return &sw return sw
elseif cline =~# '^\s*[#|]' && line =~# '^\s*|' elseif cline =~# '^\s*[#|]' && line =~# '^\s*|'
" mid-table " mid-table
" preserve indent " preserve indent
return indent(prevnonblank(v:lnum-1)) return indent(prevnonblank(v:lnum-1))
elseif cline =~# '^\s*|' && line =~# '^\s*[^|]' elseif cline =~# '^\s*|' && line =~# '^\s*[^|]'
" first line of a table, relative indent " 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*|' elseif cline =~# '^\s*[^|]' && line =~# '^\s*|'
" line after a table, relative unindent " 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\):') elseif cline =~# '^\s*#' && getline(v:lnum-1) =~ '^\s*$' && (nsyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || nline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):')
" comments on scenarios " comments on scenarios
return &sw return sw
endif endif
return indent(prevnonblank(v:lnum-1)) return indent(prevnonblank(v:lnum-1))
endfunction endfunction

View File

@ -19,6 +19,9 @@ else
endif endif
unlet! b:did_indent unlet! b:did_indent
" Force HTML indent to not keep state.
let b:html_indent_usestate = 0
if &l:indentexpr == '' if &l:indentexpr == ''
if &l:cindent if &l:cindent
let &l:indentexpr = 'cindent(v:lnum)' let &l:indentexpr = 'cindent(v:lnum)'
@ -38,7 +41,18 @@ if exists("*GetErubyIndent")
finish finish
endif endif
" this file uses line continuations
let s:cpo_sav = &cpo
set cpo&vim
function! GetErubyIndent(...) 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 == '.' if a:0 && a:1 == '.'
let v:lnum = line('.') let v:lnum = line('.')
elseif a:0 && a:1 =~ '^\d' elseif a:0 && a:1 =~ '^\d'
@ -52,31 +66,44 @@ function! GetErubyIndent(...)
let ind = GetRubyIndent(v:lnum) let ind = GetRubyIndent(v:lnum)
else else
exe "let ind = ".b:eruby_subtype_indentexpr 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 endif
let lnum = prevnonblank(v:lnum-1) let lnum = prevnonblank(v:lnum-1)
let line = getline(lnum) let line = getline(lnum)
let cline = getline(v:lnum) let cline = getline(v:lnum)
if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)' if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw let ind = ind - sw
endif endif
if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)' if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw let ind = ind - sw
endif endif
if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*[-=]\=%>' 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\)\>.*%>' 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 endif
if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>' if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>'
let ind = ind + &sw let ind = ind + sw
endif endif
if line !~# '^\s*<%' && line =~# '%>\s*$' if line !~# '^\s*<%' && line =~# '%>\s*$' && line !~# '^\s*end\>'
let ind = ind - &sw let ind = ind - sw
endif endif
if cline =~# '^\s*[-=]\=%>\s*$' if cline =~# '^\s*[-=]\=%>\s*$'
let ind = ind - &sw let ind = ind - sw
endif endif
return ind return ind
endfunction endfunction
let &cpo = s:cpo_sav
unlet! s:cpo_sav
" vim:set sw=2 sts=2 ts=8 noet: " vim:set sw=2 sts=2 ts=8 noet:

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: 0.45 " 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/> " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-indent from Vim " Usage: For instructions, do :help fortran-indent from Vim
" Credits: " Credits:
@ -152,9 +152,6 @@ function FortranGetIndent(lnum)
if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$' if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$'
let ind = ind + shiftwidth() let ind = ind + shiftwidth()
endif endif
if prevstat =~ '&\s*$' && prevstat =~ '\<else\s*if\>'
let ind = ind - shiftwidth()
endif
"Line after last continuation line "Line after last continuation line
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' && prevstat !~? '\<then\>' if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' && prevstat !~? '\<then\>'
let ind = ind - shiftwidth() let ind = ind - shiftwidth()

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: git config file " Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -20,17 +20,18 @@ if exists("*GetGitconfigIndent")
endif endif
function! GetGitconfigIndent() function! GetGitconfigIndent()
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
let line = getline(prevnonblank(v:lnum-1)) let line = getline(prevnonblank(v:lnum-1))
let cline = getline(v:lnum) let cline = getline(v:lnum)
if line =~ '\\\@<!\%(\\\\\)*\\$' if line =~ '\\\@<!\%(\\\\\)*\\$'
" odd number of slashes, in a line continuation " odd number of slashes, in a line continuation
return 2 * &sw return 2 * sw
elseif cline =~ '^\s*\[' elseif cline =~ '^\s*\['
return 0 return 0
elseif cline =~ '^\s*\a' elseif cline =~ '^\s*\a'
return &sw return sw
elseif cline == '' && line =~ '^\[' elseif cline == '' && line =~ '^\['
return &sw return sw
else else
return -1 return -1
endif endif

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Haml " Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -37,10 +37,11 @@ function! GetHamlIndent()
let line = substitute(line,'^\s\+','','') let line = substitute(line,'^\s\+','','')
let indent = indent(lnum) let indent = indent(lnum)
let cindent = indent(v:lnum) let cindent = indent(v:lnum)
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
if cline =~# '\v^-\s*%(elsif|else|when)>' if cline =~# '\v^-\s*%(elsif|else|when)>'
let indent = cindent < indent ? cindent : indent - &sw let indent = cindent < indent ? cindent : indent - sw
endif endif
let increase = indent + &sw let increase = indent + sw
if indent == indent(lnum) if indent == indent(lnum)
let indent = cindent <= indent ? -1 : increase let indent = cindent <= indent ? -1 : increase
endif endif

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Liquid " Language: Liquid
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists('b:did_indent') if exists('b:did_indent')
finish finish
@ -54,9 +54,10 @@ function! GetLiquidIndent(...)
let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
let line .= matchstr(cline,'\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 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 sw = exists('*shiftwidth') ? shiftwidth() : &sw
let ind -= &sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>') let ind += sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>')
let ind -= &sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>') let ind -= sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>')
let ind -= &sw * s:count(cline,'{%\s*end\w*$') let ind -= sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>')
let ind -= sw * s:count(cline,'{%\s*end\w*$')
return ind return ind
endfunction endfunction

View File

@ -13,12 +13,23 @@ if exists("b:did_indent")
endif endif
let b:did_indent = 1 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 setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it. " Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetRubyIndent(v:lnum) 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+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end
setlocal indentkeys+==private,=protected,=public
" Only define the function once. " Only define the function once.
if exists("*GetRubyIndent") if exists("*GetRubyIndent")
@ -34,7 +45,7 @@ set cpo&vim
" Regex of syntax group names that are or delimit strings/symbols or are comments. " Regex of syntax group names that are or delimit strings/symbols or are comments.
let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' . let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' .
\ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' . \ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' .
\ '\|Interpolation\|NoInterpolation\|Comment\|Documentation\)\>' \ '\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings. " Regex of syntax group names that are strings.
let s:syng_string = let s:syng_string =
@ -49,9 +60,10 @@ let s:skip_expr =
\ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" \ "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. " 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' . let s:ruby_indent_keywords =
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' . \ '^\s*\zs\<\%(module\|class\|if\|for' .
\ '\|rescue\):\@!\>' . \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' .
\ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' .
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' . \ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' \ '\<\%(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)? " TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex = let s:end_start_regex =
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' . \ '\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:\@!\>' \ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
" Regex that defines the middle-match for the 'end' keyword. " 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*\%(#.*\)\=$' let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines continuation lines. " Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:continuation_regex = let s:continuation_regex =
\ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' \ '\%(%\@<![({[\\.,:*/%+]\|\<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 " Regex that defines bracket continuations
let s:bracket_continuation_regex = '%\@<!\%([({[]\)\s*\%(#.*\)\=$' 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 " Regex that defines the first part of a splat pattern
let s:splat_regex = '[[,(]\s*\*\s*\%(#.*\)\=$' 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. " Regex that defines blocks.
" "
" Note that there's a slight problem with this regex and s:continuation_regex. " 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. " The reason is that the pipe matches a hanging "|" operator.
" "
let s:block_regex = 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 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 " 2. Auxiliary Functions {{{1
" ====================== " ======================
@ -165,7 +200,21 @@ function s:GetMSL(lnum)
" Otherwise, terminate search as we have found our MSL already. " Otherwise, terminate search as we have found our MSL already.
let line = getline(lnum) 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 " If the above line looks like the "*" of a splat, use the current one's
" indentation. " indentation.
" "
@ -175,7 +224,7 @@ function s:GetMSL(lnum)
" something " something
" "
return msl 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) \ s:Match(msl, s:non_bracket_continuation_regex)
" If the current line is a non-bracket continuation and so is the " If the current line is a non-bracket continuation and so is the
" previous one, keep its indent and continue looking for an MSL. " previous one, keep its indent and continue looking for an MSL.
@ -186,6 +235,18 @@ function s:GetMSL(lnum)
" three " three
" "
let msl = lnum 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) && elseif s:Match(lnum, s:non_bracket_continuation_regex) &&
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_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 " If the current line is a bracket continuation or a block-starter, but
@ -299,18 +360,39 @@ function s:ExtraBrackets(lnum)
endfunction endfunction
function s:Match(lnum, regex) function s:Match(lnum, regex)
let col = match(getline(a:lnum), '\C'.a:regex) + 1 let line = getline(a:lnum)
return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 let offset = match(line, '\C'.a:regex)
let col = offset + 1
while offset > -1 && s:IsInStringOrComment(a:lnum, col)
let offset = match(line, '\C'.a:regex, offset + 1)
let col = offset + 1
endwhile
if offset > -1
return col
else
return 0
endif
endfunction endfunction
function s:MatchLast(lnum, regex) " Locates the containing class/module's definition line, ignoring nested classes
let line = getline(a:lnum) " along the way.
let col = match(line, '.*\zs' . a:regex) "
while col != -1 && s:IsInStringOrComment(a:lnum, col) function! s:FindContainingClass()
let line = strpart(line, 0, col) let saved_position = getpos('.')
let col = match(line, '.*' . a:regex)
endwhile while searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
return col + 1 \ 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 endfunction
" 3. GetRubyIndent Function {{{1 " 3. GetRubyIndent Function {{{1
@ -320,6 +402,13 @@ function GetRubyIndent(...)
" 3.1. Setup {{{2 " 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 " For the current line, use the first argument if given, else v:lnum
let clnum = a:0 ? a:1 : v:lnum let clnum = a:0 ? a:1 : v:lnum
@ -333,6 +422,24 @@ function GetRubyIndent(...)
let line = getline(clnum) let line = getline(clnum)
let ind = -1 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 " 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 " 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. " 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 searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
if line[col-1]==')' && col('.') != col('$') - 1 if line[col-1]==')' && col('.') != col('$') - 1
let ind = virtcol('.') - 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('.'))) let ind = indent(s:GetMSL(line('.')))
endif endif
endif endif
@ -366,10 +475,17 @@ function GetRubyIndent(...)
if strpart(line, 0, col('.') - 1) =~ '=\s*$' && if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do' \ strpart(line, col('.') - 1, 2) !~ 'do'
" assignment to case/begin/etc, on the same line, hanging indent
let ind = virtcol('.') - 1 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*\(#.*\)\=$' 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('.')) let ind = indent(line('.'))
else else
" align to the MSL
let ind = indent(msl) let ind = indent(msl)
endif endif
endif endif
@ -389,6 +505,11 @@ function GetRubyIndent(...)
return 0 return 0
endif 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 " 3.3. Work on the previous line. {{{2
" ------------------------------- " -------------------------------
@ -409,14 +530,50 @@ function GetRubyIndent(...)
let line = getline(lnum) let line = getline(lnum)
let ind = indent(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 the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex) 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 endif
" If the previous line ended with the "*" of a splat, add a level of indent " If the previous line ended with the "*" of a splat, add a level of indent
if line =~ s:splat_regex if line =~ s:splat_regex
return indent(lnum) + &sw return indent(lnum) + sw
endif endif
" If the previous line contained unclosed opening brackets and we are still " If the previous line contained unclosed opening brackets and we are still
@ -431,22 +588,22 @@ function GetRubyIndent(...)
if opening.pos != -1 if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$') if col('.') + 1 == col('$')
return ind + &sw return ind + sw
else else
return virtcol('.') return virtcol('.')
endif endif
else else
let nonspace = matchend(line, '\S', opening.pos + 1) - 1 let nonspace = matchend(line, '\S', opening.pos + 1) - 1
return nonspace > 0 ? nonspace : ind + &sw return nonspace > 0 ? nonspace : ind + sw
endif endif
elseif closing.pos != -1 elseif closing.pos != -1
call cursor(lnum, closing.pos + 1) call cursor(lnum, closing.pos + 1)
normal! % normal! %
if s:Match(line('.'), s:ruby_indent_keywords) if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + &sw return indent('.') + sw
else else
return indent('.') return indent(s:GetMSL(line('.')))
endif endif
else else
call cursor(clnum, vcol) call cursor(clnum, vcol)
@ -473,7 +630,7 @@ function GetRubyIndent(...)
let col = s:Match(lnum, s:ruby_indent_keywords) let col = s:Match(lnum, s:ruby_indent_keywords)
if col > 0 if col > 0
call cursor(lnum, col) 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 " 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 " fails, we know that something is lacking an end and thus we indent a
" level " level
@ -490,10 +647,14 @@ function GetRubyIndent(...)
let p_lnum = lnum let p_lnum = lnum
let lnum = s:GetMSL(lnum) let lnum = s:GetMSL(lnum)
" If the previous line wasn't a MSL and is continuation return its indent. " If the previous line wasn't a MSL.
" TODO: the || s:IsInString() thing worries me a bit.
if p_lnum != lnum 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 return ind
endif endif
endif endif
@ -506,9 +667,9 @@ function GetRubyIndent(...)
" TODO: this does not take into account contrived things such as " TODO: this does not take into account contrived things such as
" module Foo; class Bar; end " module Foo; class Bar; end
if s:Match(lnum, s:ruby_indent_keywords) 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) if s:Match(lnum, s:end_end_regex)
let ind = ind - &sw let ind = ind - sw
endif endif
return ind return ind
endif endif
@ -517,7 +678,7 @@ function GetRubyIndent(...)
" closing bracket, indent one extra level. " closing bracket, indent one extra level.
if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)') if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)')
if lnum == p_lnum if lnum == p_lnum
let ind = msl_ind + &sw let ind = msl_ind + sw
else else
let ind = msl_ind let ind = msl_ind
endif endif

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Sass " Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30 " Last Change: 2016 Aug 29
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -29,9 +29,7 @@ function! GetSassIndent()
let indent = indent(lnum) let indent = indent(lnum)
let cindent = indent(v:lnum) let cindent = indent(v:lnum)
if line !~ s:property && line !~ s:extend && cline =~ s:property if line !~ s:property && line !~ s:extend && cline =~ s:property
return indent + &sw return indent + (exists('*shiftwidth') ? shiftwidth() : &sw)
"elseif line =~ s:property && cline !~ s:property
"return indent - &sw
else else
return -1 return -1
endif endif

View File

@ -3,11 +3,8 @@
" Maintainer: Clemens Kirchgatterer <clemens@1541.org> " Maintainer: Clemens Kirchgatterer <clemens@1541.org>
" Last Change: 2014 Jan 05 " Last Change: 2014 Jan 05
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -138,29 +135,21 @@ syn match a65End excludenl /end$/ contained
syn match a65Continue "\\$" contained syn match a65Continue "\\$" contained
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 a65Section Special
HiLink a65Address Special HiLink a65Address Special
HiLink a65Comment Comment HiLink a65Comment Comment
HiLink a65PreProc PreProc HiLink a65PreProc PreProc
HiLink a65Number Number HiLink a65Number Number
HiLink a65String String HiLink a65String String
HiLink a65Type Statement HiLink a65Type Statement
HiLink a65Opcode Type HiLink a65Opcode Type
HiLink a65PC Error HiLink a65PC Error
HiLink a65Todo Todo HiLink a65Todo Todo
HiLink a65HiLo Number HiLink a65HiLo Number
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "a65" let b:current_syntax = "a65"

View File

@ -5,11 +5,8 @@
" Last Change: 2013 Jun 13 " Last Change: 2013 Jun 13
" Comment: Thanks to EPI-USE Labs for all your assistance. :) " Comment: Thanks to EPI-USE Labs for all your assistance. :)
" For version < 6.0: Clear all syntax items " quit when a syntax file was already loaded
" For version >= 6.0: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -43,11 +40,7 @@ syn match abapStringEscape contained "``"
syn match abapNumber "\-\=\<\d\+\>" syn match abapNumber "\-\=\<\d\+\>"
syn region abapHex matchgroup=abapHex start="X'" end="'" syn region abapHex matchgroup=abapHex start="X'" end="'"
if version >= 600 setlocal iskeyword=48-57,_,A-Z,a-z,/
setlocal iskeyword=48-57,_,A-Z,a-z,/
else
set iskeyword=48-57,_,A-Z,a-z,/
endif
syn match abapNamespace "\</\w\+/" syn match abapNamespace "\</\w\+/"
@ -175,38 +168,30 @@ syn keyword abapTodo contained TODO NOTE
syn match abapTodo "\#EC\W\+\w\+" syn match abapTodo "\#EC\W\+\w\+"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 abapError Error
HiLink abapComment Comment HiLink abapComment Comment
HiLink abapInclude Include HiLink abapInclude Include
HiLink abapStatement Statement HiLink abapStatement Statement
HiLink abapComplexStatement Statement HiLink abapComplexStatement Statement
HiLink abapSpecial Special HiLink abapSpecial Special
HiLink abapNamespace Special HiLink abapNamespace Special
HiLink abapSpecialTables Special HiLink abapSpecialTables Special
HiLink abapSymbolOperator abapOperator HiLink abapSymbolOperator abapOperator
HiLink abapOperator Operator HiLink abapOperator Operator
HiLink abapCharString String HiLink abapCharString String
HiLink abapString String HiLink abapString String
HiLink abapFloat Float HiLink abapFloat Float
HiLink abapTypes Type HiLink abapTypes Type
HiLink abapSymbol Structure HiLink abapSymbol Structure
HiLink abapStructure Structure HiLink abapStructure Structure
HiLink abapField Variable HiLink abapField Variable
HiLink abapNumber Number HiLink abapNumber Number
HiLink abapHex Number HiLink abapHex Number
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "abap" let b:current_syntax = "abap"

View File

@ -4,11 +4,8 @@
" Last Change: 2002 Feb 24 " Last Change: 2002 Feb 24
" Remark: Huge improvement in folding performance--see filetype plugin " Remark: Huge improvement in folding performance--see filetype plugin
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -25,24 +22,16 @@ syn match abaqusValue "=\s*[^,]*"lc=1 contained display
syn match abaqusBadLine "^\s\+\*.*" display syn match abaqusBadLine "^\s\+\*.*" display
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 " The default methods for highlighting. Can be overridden later
HiLink abaqusComment Comment HiLink abaqusComment Comment
HiLink abaqusKeyword Statement HiLink abaqusKeyword Statement
HiLink abaqusParameter Identifier HiLink abaqusParameter Identifier
HiLink abaqusValue Constant HiLink abaqusValue Constant
HiLink abaqusBadLine Error HiLink abaqusBadLine Error
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "abaqus" let b:current_syntax = "abaqus"

View File

@ -4,11 +4,8 @@
" URL: http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim " URL: http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim
" Last Change: 27th April 2001 " Last Change: 27th April 2001
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -36,28 +33,20 @@ syn match abcComment "%.*$"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 abcComment Comment
HiLink abcHeadField Type HiLink abcHeadField Type
HiLink abcBodyField Special HiLink abcBodyField Special
HiLink abcBar Statement HiLink abcBar Statement
HiLink abcTuple Statement HiLink abcTuple Statement
HiLink abcBroken Statement HiLink abcBroken Statement
HiLink abcTie Statement HiLink abcTie Statement
HiLink abcGuitarChord Identifier HiLink abcGuitarChord Identifier
HiLink abcNote Constant HiLink abcNote Constant
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "abc" let b:current_syntax = "abc"

View File

@ -3,11 +3,8 @@
" Maintainer: John Cook <johncook3@gmail.com> " Maintainer: John Cook <johncook3@gmail.com>
" Last Change: 2011 Dec 27 " Last Change: 2011 Dec 27
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -123,48 +120,40 @@ endif
syn sync minlines=1 syn sync minlines=1
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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. " The default highlighting.
HiLink abelHeader abelStatement HiLink abelHeader abelStatement
HiLink abelSection abelStatement HiLink abelSection abelStatement
HiLink abelDeclaration abelStatement HiLink abelDeclaration abelStatement
HiLink abelLogicalOperator abelOperator HiLink abelLogicalOperator abelOperator
HiLink abelRangeOperator abelOperator HiLink abelRangeOperator abelOperator
HiLink abelAlternateOperator abelOperator HiLink abelAlternateOperator abelOperator
HiLink abelArithmeticOperator abelOperator HiLink abelArithmeticOperator abelOperator
HiLink abelRelationalOperator abelOperator HiLink abelRelationalOperator abelOperator
HiLink abelAssignmentOperator abelOperator HiLink abelAssignmentOperator abelOperator
HiLink abelTruthTableOperator abelOperator HiLink abelTruthTableOperator abelOperator
HiLink abelSpecifier abelStatement HiLink abelSpecifier abelStatement
HiLink abelOperator abelStatement HiLink abelOperator abelStatement
HiLink abelStatement Statement HiLink abelStatement Statement
HiLink abelIdentifier Identifier HiLink abelIdentifier Identifier
HiLink abelTypeId abelType HiLink abelTypeId abelType
HiLink abelTypeIdChar abelType HiLink abelTypeIdChar abelType
HiLink abelType Type HiLink abelType Type
HiLink abelNumber abelString HiLink abelNumber abelString
HiLink abelString String HiLink abelString String
HiLink abelConstant Constant HiLink abelConstant Constant
HiLink abelComment Comment HiLink abelComment Comment
HiLink abelExtension abelSpecial HiLink abelExtension abelSpecial
HiLink abelSpecialChar abelSpecial HiLink abelSpecialChar abelSpecial
HiLink abelTypeIdEnd abelSpecial HiLink abelTypeIdEnd abelSpecial
HiLink abelSpecial Special HiLink abelSpecial Special
HiLink abelDirective PreProc HiLink abelDirective PreProc
HiLink abelTodo Todo HiLink abelTodo Todo
HiLink abelError Error HiLink abelError Error
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "abel" let b:current_syntax = "abel"

View File

@ -7,11 +7,8 @@
" Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm " Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm
" AceDB software is available from http://www.acedb.org " AceDB software is available from http://www.acedb.org
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -86,35 +83,27 @@ syn region acedbString start=/"/ end=/"/ skip=/\\"/ oneline
" Rest of syntax highlighting rules start here " Rest of syntax highlighting rules start here
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink acedbMagic Special HiLink acedbMagic Special
HiLink acedbHyb Special HiLink acedbHyb Special
HiLink acedbType Type HiLink acedbType Type
HiLink acedbOption Type HiLink acedbOption Type
HiLink acedbSubclass Type HiLink acedbSubclass Type
HiLink acedbSubtag Include HiLink acedbSubtag Include
HiLink acedbFlag Include HiLink acedbFlag Include
HiLink acedbTag Include HiLink acedbTag Include
HiLink acedbClass Todo HiLink acedbClass Todo
HiLink acedbHelp Todo HiLink acedbHelp Todo
HiLink acedbXref Identifier HiLink acedbXref Identifier
HiLink acedbModifier Label HiLink acedbModifier Label
HiLink acedbComment Comment HiLink acedbComment Comment
HiLink acedbBlock ModeMsg HiLink acedbBlock ModeMsg
HiLink acedbNumber Number HiLink acedbNumber Number
HiLink acedbString String HiLink acedbString String
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "acedb" let b:current_syntax = "acedb"

View File

@ -7,21 +7,14 @@
" Comment: Replaced sourcing c.vim file by ada.vim and rename lex* " Comment: Replaced sourcing c.vim file by ada.vim and rename lex*
" in aflex* " in aflex*
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the Ada syntax to start with " Read the Ada syntax to start with
if version < 600 runtime! syntax/ada.vim
so <sfile>:p:h/ada.vim unlet b:current_syntax
else
runtime! syntax/ada.vim
unlet b:current_syntax
endif
" --- AfLex stuff --- " --- AfLex stuff ---
@ -69,31 +62,22 @@ syn sync match aflexSyncPat groupthere aflexPatBlock "^<$"
syn sync match aflexSyncPat groupthere aflexPatBlock "^%%$" syn sync match aflexSyncPat groupthere aflexPatBlock "^%%$"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: 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
if version >= 508 || !exists("did_aflex_syntax_inits") HiLink aflexAbbrv SpecialChar
if version < 508 HiLink aflexAbbrvRegExp Macro
let did_aflex_syntax_inits = 1 HiLink aflexCFunctions Function
command -nargs=+ HiLink hi link <args> HiLink aflexMorePat SpecialChar
else HiLink aflexPat Function
command -nargs=+ HiLink hi def link <args> HiLink aflexPatComment Comment
endif HiLink aflexPatString Function
HiLink aflexSlashQuote aflexPat HiLink aflexPatTag Special
HiLink aflexBrace aflexPat HiLink aflexSep Delimiter
HiLink aflexAbbrvComment aflexPatComment delcommand HiLink
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
let b:current_syntax = "aflex" let b:current_syntax = "aflex"

View File

@ -3,11 +3,8 @@
" Maintainer: John Cook <john.cook@kla-tencor.com> " Maintainer: John Cook <john.cook@kla-tencor.com>
" Last Change: 2001 Apr 25 " Last Change: 2001 Apr 25
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -66,29 +63,21 @@ syn match ahdlSpecialChar "[\[\]().,;]"
syn sync minlines=1 syn sync minlines=1
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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. " The default highlighting.
HiLink ahdlNumber ahdlString HiLink ahdlNumber ahdlString
HiLink ahdlMegafunction ahdlIdentifier HiLink ahdlMegafunction ahdlIdentifier
HiLink ahdlSpecialChar SpecialChar HiLink ahdlSpecialChar SpecialChar
HiLink ahdlKeyword Statement HiLink ahdlKeyword Statement
HiLink ahdlString String HiLink ahdlString String
HiLink ahdlComment Comment HiLink ahdlComment Comment
HiLink ahdlIdentifier Identifier HiLink ahdlIdentifier Identifier
HiLink ahdlOperator Operator HiLink ahdlOperator Operator
HiLink ahdlTodo Todo HiLink ahdlTodo Todo
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "ahdl" let b:current_syntax = "ahdl"
" vim:ts=8 " vim:ts=8

View File

@ -5,11 +5,8 @@
" Version: 7 " Version: 7
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -72,29 +69,21 @@ syn match amiComment ";.*$" contains=amiCommentGroup
syn sync lines=50 syn sync lines=50
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 amiAlias Type
HiLink amiComment Comment HiLink amiComment Comment
HiLink amiDev Type HiLink amiDev Type
HiLink amiEcho String HiLink amiEcho String
HiLink amiElse Statement HiLink amiElse Statement
HiLink amiError Error HiLink amiError Error
HiLink amiKey Statement HiLink amiKey Statement
HiLink amiNumber Number HiLink amiNumber Number
HiLink amiString String HiLink amiString String
HiLink amiTest Special HiLink amiTest Special
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "amiga" let b:current_syntax = "amiga"

View File

@ -9,11 +9,8 @@
" of [], in order to avoid -read highlighted, " of [], in order to avoid -read highlighted,
" or [quote] strings highlighted " or [quote] strings highlighted
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif 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 syn region amlSkip matchgroup=amlOutput start="&type" end="$" contains=amlVar
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 amlComment Comment
HiLink amlNumber Number HiLink amlNumber Number
HiLink amlQuote String HiLink amlQuote String
HiLink amlVar Identifier HiLink amlVar Identifier
HiLink amlVar2 Identifier HiLink amlVar2 Identifier
HiLink amlFunction PreProc HiLink amlFunction PreProc
HiLink amlDir Statement HiLink amlDir Statement
HiLink amlDir2 Statement HiLink amlDir2 Statement
HiLink amlDirSym Statement HiLink amlDirSym Statement
HiLink amlOutput Statement HiLink amlOutput Statement
HiLink amlArcCmd ModeMsg HiLink amlArcCmd ModeMsg
HiLink amlFormedCmd amlArcCmd HiLink amlFormedCmd amlArcCmd
HiLink amlTabCmd amlArcCmd HiLink amlTabCmd amlArcCmd
HiLink amlInfoCmd amlArcCmd HiLink amlInfoCmd amlArcCmd
HiLink amlVtrCmd amlArcCmd HiLink amlVtrCmd amlArcCmd
HiLink amlFormed amlArcCmd HiLink amlFormed amlArcCmd
HiLink amlTab amlArcCmd HiLink amlTab amlArcCmd
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "aml" let b:current_syntax = "aml"

View File

@ -3,9 +3,8 @@
" Last Change: 2003 May 11 " Last Change: 2003 May 11
if version < 600 " quit when a syntax file was already loaded
syntax clear if exists("b:current_syntax")
elseif exists("b:current_syntax")
finish finish
endif endif
@ -115,33 +114,26 @@ syn keyword amplTodo contained TODO FIXME XXX
if version >= 508 || !exists("did_ampl_syntax_inits") command -nargs=+ HiLink hi def link <args>
if version < 508
let did_ampl_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. " The default methods for highlighting. Can be overridden later.
HiLink amplEntityKeyword Keyword HiLink amplEntityKeyword Keyword
HiLink amplType Type HiLink amplType Type
HiLink amplStatement Statement HiLink amplStatement Statement
HiLink amplOperators Operator HiLink amplOperators Operator
HiLink amplBasicOperators Operator HiLink amplBasicOperators Operator
HiLink amplConditional Conditional HiLink amplConditional Conditional
HiLink amplRepeat Repeat HiLink amplRepeat Repeat
HiLink amplStrings String HiLink amplStrings String
HiLink amplNumerics Number HiLink amplNumerics Number
HiLink amplSetFunction Function HiLink amplSetFunction Function
HiLink amplBuiltInFunction Function HiLink amplBuiltInFunction Function
HiLink amplRandomGenerator Function HiLink amplRandomGenerator Function
HiLink amplComment Comment HiLink amplComment Comment
HiLink amplDotSuffix Special HiLink amplDotSuffix Special
HiLink amplPiecewise Special HiLink amplPiecewise Special
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "ampl" let b:current_syntax = "ampl"

View File

@ -4,11 +4,8 @@
" LastChange: 02 May 2001 " LastChange: 02 May 2001
" Original: Comes from JavaCC.vim " Original: Comes from JavaCC.vim
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -18,12 +15,8 @@ endif
" Those files usually have the extension *.jj " Those files usually have the extension *.jj
" source the java.vim file " source the java.vim file
if version < 600 runtime! syntax/java.vim
so <sfile>:p:h/java.vim unlet b:current_syntax
else
runtime! syntax/java.vim
unlet b:current_syntax
endif
"remove catching errors caused by wrong parenthesis (does not work in antlr "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) "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 antlrActionToken TOKEN SKIP MORE SPECIAL_TOKEN
syn keyword antlrError DEBUG IGNORE_IN_BNF syn keyword antlrError DEBUG IGNORE_IN_BNF
if version >= 508 || !exists("did_antlr_syntax_inits") command -nargs=+ HiLink hi def link <args>
if version < 508 HiLink antlrSep Statement
let did_antlr_syntax_inits = 1 HiLink antlrPackages Statement
command -nargs=+ HiLink hi link <args> delcommand HiLink
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink antlrSep Statement
HiLink antlrPackages Statement
delcommand HiLink
endif
let b:current_syntax = "antlr" let b:current_syntax = "antlr"

View File

@ -9,13 +9,9 @@
" make it really linewise? " make it really linewise?
" + add `display' where appropriate " + add `display' where appropriate
" Setup " quit when a syntax file was already loaded
if version >= 600 if exists("b:current_syntax")
if exists("b:current_syntax")
finish finish
endif
else
syntax clear
endif endif
syn case ignore syn case ignore
@ -178,37 +174,30 @@ syn match apacheSection "<\/\=\(<IfVersion\)[^>]*>" contains=apacheAnything
syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP
" Define the default highlighting " Define the default highlighting
if version >= 508 || !exists("did_apache_syntax_inits") command -nargs=+ HiLink hi def link <args>
if version < 508
let did_apache_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink apacheAllowOverride apacheDeclaration HiLink apacheAllowOverride apacheDeclaration
HiLink apacheAllowOverrideValue apacheOption HiLink apacheAllowOverrideValue apacheOption
HiLink apacheAuthType apacheDeclaration HiLink apacheAuthType apacheDeclaration
HiLink apacheAuthTypeValue apacheOption HiLink apacheAuthTypeValue apacheOption
HiLink apacheOptionOption apacheOption HiLink apacheOptionOption apacheOption
HiLink apacheDeclaration Function HiLink apacheDeclaration Function
HiLink apacheAnything apacheOption HiLink apacheAnything apacheOption
HiLink apacheOption Number HiLink apacheOption Number
HiLink apacheComment Comment HiLink apacheComment Comment
HiLink apacheFixme Todo HiLink apacheFixme Todo
HiLink apacheLimitSectionKeyword apacheLimitSection HiLink apacheLimitSectionKeyword apacheLimitSection
HiLink apacheLimitSection apacheSection HiLink apacheLimitSection apacheSection
HiLink apacheSection Label HiLink apacheSection Label
HiLink apacheMethodOption Type HiLink apacheMethodOption Type
HiLink apacheAllowDeny Include HiLink apacheAllowDeny Include
HiLink apacheAllowDenyValue Identifier HiLink apacheAllowDenyValue Identifier
HiLink apacheOrder Special HiLink apacheOrder Special
HiLink apacheOrderValue String HiLink apacheOrderValue String
HiLink apacheString String HiLink apacheString String
HiLink apacheError Error HiLink apacheError Error
HiLink apacheUserID Number HiLink apacheUserID Number
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "apache" let b:current_syntax = "apache"

View File

@ -20,11 +20,8 @@
" </SubSection> " </SubSection>
" </Section> " </Section>
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -41,25 +38,17 @@ syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1
syn match apTagError contained /[^>]</ms=s+1 syn match apTagError contained /[^>]</ms=s+1
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink apComment Comment HiLink apComment Comment
HiLink apOption Keyword HiLink apOption Keyword
"HiLink apLastValue Identifier ugly? "HiLink apLastValue Identifier ugly?
HiLink apTag Special HiLink apTag Special
HiLink apTagOption Identifier HiLink apTagOption Identifier
HiLink apTagError Error HiLink apTagError Error
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "apachestyle" let b:current_syntax = "apachestyle"
" vim: ts=8 " vim: ts=8

View File

@ -3,12 +3,9 @@
" Maintainer: Yann Amar <quidame@poivron.org> " Maintainer: Yann Amar <quidame@poivron.org>
" Last Change: 2015 Dec 22 " Last Change: 2015 Dec 22
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x and 7.x: Quit when a syntax file was already loaded
if !exists("main_syntax") if !exists("main_syntax")
if version < 600 if exists("b:current_syntax")
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
let main_syntax = 'aptconf' let main_syntax = 'aptconf'

View File

@ -10,20 +10,13 @@
" Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback! " Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback!
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the C syntax to start with " Read the C syntax to start with
if version < 600 runtime! syntax/cpp.vim
so <sfile>:p:h/cpp.vim
else
runtime! syntax/cpp.vim
endif
syn keyword arduinoConstant HIGH LOW INPUT OUTPUT syn keyword arduinoConstant HIGH LOW INPUT OUTPUT
syn keyword arduinoConstant DEC BIN HEX OCT BYTE syn keyword arduinoConstant DEC BIN HEX OCT BYTE

View File

@ -7,11 +7,8 @@
" Thanks to Ori Avtalion for feedback on the comment markers! " Thanks to Ori Avtalion for feedback on the comment markers!
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.0 and later: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -103,37 +100,29 @@ syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*"
syn case match syn case match
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 " The default methods for highlighting. Can be overridden later
HiLink asmSection Special HiLink asmSection Special
HiLink asmLabel Label HiLink asmLabel Label
HiLink asmComment Comment HiLink asmComment Comment
HiLink asmTodo Todo HiLink asmTodo Todo
HiLink asmDirective Statement HiLink asmDirective Statement
HiLink asmInclude Include HiLink asmInclude Include
HiLink asmCond PreCondit HiLink asmCond PreCondit
HiLink asmMacro Macro HiLink asmMacro Macro
HiLink hexNumber Number HiLink hexNumber Number
HiLink decNumber Number HiLink decNumber Number
HiLink octNumber Number HiLink octNumber Number
HiLink binNumber Number HiLink binNumber Number
HiLink asmIdentifier Identifier HiLink asmIdentifier Identifier
HiLink asmType Type HiLink asmType Type
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "asm" let b:current_syntax = "asm"

View File

@ -8,11 +8,8 @@
" Feel free to contribute... " Feel free to contribute...
" "
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -328,63 +325,55 @@ syn match asm68kDirective "\<XREF\(\.S\)\=\s"
syn case match syn case match
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 " The default methods for highlighting. Can be overridden later
" Comment Constant Error Identifier PreProc Special Statement Todo Type " Comment Constant Error Identifier PreProc Special Statement Todo Type
" "
" Constant Boolean Character Number String " Constant Boolean Character Number String
" Identifier Function " Identifier Function
" PreProc Define Include Macro PreCondit " PreProc Define Include Macro PreCondit
" Special Debug Delimiter SpecialChar SpecialComment Tag " Special Debug Delimiter SpecialChar SpecialComment Tag
" Statement Conditional Exception Keyword Label Operator Repeat " Statement Conditional Exception Keyword Label Operator Repeat
" Type StorageClass Structure Typedef " Type StorageClass Structure Typedef
HiLink asm68kComment Comment HiLink asm68kComment Comment
HiLink asm68kTodo Todo HiLink asm68kTodo Todo
HiLink hexNumber Number " Constant HiLink hexNumber Number " Constant
HiLink octNumber Number " Constant HiLink octNumber Number " Constant
HiLink binNumber Number " Constant HiLink binNumber Number " Constant
HiLink decNumber Number " Constant HiLink decNumber Number " Constant
HiLink floatNumber Number " Constant HiLink floatNumber Number " Constant
HiLink floatExponent Number " Constant HiLink floatExponent Number " Constant
HiLink floatE SpecialChar " Statement HiLink floatE SpecialChar " Statement
"HiLink floatE Number " Constant "HiLink floatE Number " Constant
HiLink asm68kImmediate SpecialChar " Statement HiLink asm68kImmediate SpecialChar " Statement
"HiLink asm68kSymbol Constant "HiLink asm68kSymbol Constant
HiLink asm68kString String " Constant HiLink asm68kString String " Constant
HiLink asm68kCharError Error HiLink asm68kCharError Error
HiLink asm68kStringError Error HiLink asm68kStringError Error
HiLink asm68kReg Identifier HiLink asm68kReg Identifier
HiLink asm68kOperator Identifier HiLink asm68kOperator Identifier
HiLink asm68kInclude Include " PreProc HiLink asm68kInclude Include " PreProc
HiLink asm68kMacro Macro " PreProc HiLink asm68kMacro Macro " PreProc
HiLink asm68kMacroParam Keyword " Statement HiLink asm68kMacroParam Keyword " Statement
HiLink asm68kDirective Special HiLink asm68kDirective Special
HiLink asm68kPreCond Special HiLink asm68kPreCond Special
HiLink asm68kOpcode Statement HiLink asm68kOpcode Statement
HiLink asm68kCond Conditional " Statement HiLink asm68kCond Conditional " Statement
HiLink asm68kRepeat Repeat " Statement HiLink asm68kRepeat Repeat " Statement
HiLink asm68kLabel Type HiLink asm68kLabel Type
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "asm68k" let b:current_syntax = "asm68k"

View File

@ -3,11 +3,8 @@
" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com> " Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
" Last Change: 2002 Sep 19 " Last Change: 2002 Sep 19
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -52,33 +49,21 @@ syn case match
" Read the general asm syntax " Read the general asm syntax
if version < 600 runtime! syntax/asm.vim
source <sfile>:p:h/asm.vim
else
runtime! syntax/asm.vim
endif
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink asmOpcode Statement HiLink asmOpcode Statement
HiLink asmRegister Identifier HiLink asmRegister Identifier
" My default-color overrides: " My default-color overrides:
"hi asmOpcode ctermfg=yellow "hi asmOpcode ctermfg=yellow
"hi asmReg ctermfg=lightmagenta "hi asmReg ctermfg=lightmagenta
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "asmh8300" let b:current_syntax = "asmh8300"

View File

@ -4,11 +4,8 @@
" URL: http://www.fleiner.com/vim/syntax/asn.vim " URL: http://www.fleiner.com/vim/syntax/asn.vim
" Last Change: 2012 Oct 05 " Last Change: 2012 Oct 05
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -50,34 +47,26 @@ syn match asnBraces "[{}]"
syn sync ccomment asnComment syn sync ccomment asnComment
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
if version >= 508 || !exists("did_asn_syn_inits") HiLink asnDefinition Function
if version < 508 HiLink asnBraces Function
let did_asn_syn_inits = 1 HiLink asnStructure Statement
command -nargs=+ HiLink hi link <args> HiLink asnBoolValue Boolean
else HiLink asnSpecial Special
command -nargs=+ HiLink hi def link <args> HiLink asnString String
endif HiLink asnCharacter Character
HiLink asnDefinition Function HiLink asnSpecialCharacter asnSpecial
HiLink asnBraces Function HiLink asnNumber asnValue
HiLink asnStructure Statement HiLink asnComment Comment
HiLink asnBoolValue Boolean HiLink asnLineComment asnComment
HiLink asnSpecial Special HiLink asnType Type
HiLink asnString String HiLink asnTypeInfo PreProc
HiLink asnCharacter Character HiLink asnValue Number
HiLink asnSpecialCharacter asnSpecial HiLink asnExternal Include
HiLink asnNumber asnValue HiLink asnTagModifier Function
HiLink asnComment Comment HiLink asnFieldOption Type
HiLink asnLineComment asnComment delcommand HiLink
HiLink asnType Type
HiLink asnTypeInfo PreProc
HiLink asnValue Number
HiLink asnExternal Include
HiLink asnTagModifier Function
HiLink asnFieldOption Type
delcommand HiLink
endif
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save

View File

@ -4,11 +4,8 @@
" URL: http://nim.dhs.org/~edh/aspperl.vim " URL: http://nim.dhs.org/~edh/aspperl.vim
" Last Change: 2001 May 09 " Last Change: 2001 May 09
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -16,14 +13,9 @@ if !exists("main_syntax")
let main_syntax = 'perlscript' let main_syntax = 'perlscript'
endif endif
if version < 600 runtime! syntax/html.vim
so <sfile>:p:h/html.vim unlet b:current_syntax
syn include @AspPerlScript <sfile>:p:h/perl.vim syn include @AspPerlScript syntax/perl.vim
else
runtime! syntax/html.vim
unlet b:current_syntax
syn include @AspPerlScript syntax/perl.vim
endif
syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags

View File

@ -11,10 +11,8 @@
" Thanks to Dean Hall <hall@apt7.com> for testing the use of classes in " Thanks to Dean Hall <hall@apt7.com> for testing the use of classes in
" VBScripts which I've been too scared to do. " VBScripts which I've been too scared to do.
" Quit when a syntax file was already loaded " quit when a syntax file was already loaded
if version < 600 if exists("b:current_syntax")
syn clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -22,11 +20,7 @@ if !exists("main_syntax")
let main_syntax = 'aspvbs' let main_syntax = 'aspvbs'
endif endif
if version < 600 runtime! syntax/html.vim
source <sfile>:p:h/html.vim
else
runtime! syntax/html.vim
endif
unlet b:current_syntax unlet b:current_syntax
syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags
@ -163,31 +157,23 @@ syn sync match htmlHighlight grouphere htmlTag "%>"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 AspVBScript Special
HiLink AspVBSLineNumber Comment HiLink AspVBSLineNumber Comment
HiLink AspVBSNumber Number HiLink AspVBSNumber Number
HiLink AspVBSError Error HiLink AspVBSError Error
HiLink AspVBSStatement Statement HiLink AspVBSStatement Statement
HiLink AspVBSString String HiLink AspVBSString String
HiLink AspVBSComment Comment HiLink AspVBSComment Comment
HiLink AspVBSTodo Todo HiLink AspVBSTodo Todo
HiLink AspVBSFunction Identifier HiLink AspVBSFunction Identifier
HiLink AspVBSMethods PreProc HiLink AspVBSMethods PreProc
HiLink AspVBSEvents Special HiLink AspVBSEvents Special
HiLink AspVBSTypeSpecifier Type HiLink AspVBSTypeSpecifier Type
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "aspvbs" let b:current_syntax = "aspvbs"

View File

@ -5,10 +5,9 @@
" Updated for 1.2 by Tilghman Lesher (Corydon76) " Updated for 1.2 by Tilghman Lesher (Corydon76)
" Last Change: 2015 Feb 27 " Last Change: 2015 Feb 27
" version 0.4 " version 0.4
"
if version < 600 " quit when a syntax file was already loaded
syntax clear if exists("b:current_syntax")
elseif exists("b:current_syntax")
finish finish
endif 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 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. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
if version >= 508 || !exists("did_conf_syntax_inits")
if version < 508 HiLink asteriskComment Comment
let did_conf_syntax_inits = 1 HiLink asteriskExten String
command -nargs=+ HiLink hi link <args> HiLink asteriskContext Preproc
else HiLink asteriskPattern Type
command -nargs=+ HiLink hi def link <args> HiLink asteriskApp Statement
endif 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" let b:current_syntax = "asterisk"
" vim: ts=8 sw=2 " vim: ts=8 sw=2

View File

@ -3,10 +3,9 @@
" Maintainer: Tilghman Lesher (Corydon76) " Maintainer: Tilghman Lesher (Corydon76)
" Last Change: 2006 Mar 21 " Last Change: 2006 Mar 21
" version 0.2 " version 0.2
"
if version < 600 " quit when a syntax file was already loaded
syntax clear if exists("b:current_syntax")
elseif exists("b:current_syntax")
finish finish
endif endif
@ -33,28 +32,20 @@ syn match mailboxEmail ",\zs[^@=,]*@[[:alnum:]\-\.]\+\.[[:alpha
syn match comma "[,|]" contained syn match comma "[,|]" contained
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
: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 asteriskvmComment Comment
HiLink asteriskvmContext Identifier HiLink asteriskvmContext Identifier
HiLink asteriskvmZone Type HiLink asteriskvmZone Type
HiLink zoneName String HiLink zoneName String
HiLink zoneDef String HiLink zoneDef String
HiLink asteriskvmSetting Type HiLink asteriskvmSetting Type
HiLink asteriskvmSettingBool Type HiLink asteriskvmSettingBool Type
HiLink asteriskvmMailbox Statement HiLink asteriskvmMailbox Statement
HiLink mailboxEmail String HiLink mailboxEmail String
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "asteriskvm" let b:current_syntax = "asteriskvm"

View File

@ -3,11 +3,8 @@
" Maintainer: Inaki Saez <jisaez@sfe.indra.es> " Maintainer: Inaki Saez <jisaez@sfe.indra.es>
" Last Change: 2001 May 09 " Last Change: 2001 May 09
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -61,37 +58,29 @@ syn sync maxlines=100
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 atlasConditional Conditional
HiLink atlasRepeat Repeat HiLink atlasRepeat Repeat
HiLink atlasStatement Statement HiLink atlasStatement Statement
HiLink atlasNumber Number HiLink atlasNumber Number
HiLink atlasHexNumber Number HiLink atlasHexNumber Number
HiLink atlasOctalNumber Number HiLink atlasOctalNumber Number
HiLink atlasBinNumber Number HiLink atlasBinNumber Number
HiLink atlasDecimalNumber Float HiLink atlasDecimalNumber Float
HiLink atlasFormatString String HiLink atlasFormatString String
HiLink atlasString String HiLink atlasString String
HiLink atlasComment Comment HiLink atlasComment Comment
HiLink atlasComment2 Comment HiLink atlasComment2 Comment
HiLink atlasInclude Include HiLink atlasInclude Include
HiLink atlasDefine Macro HiLink atlasDefine Macro
HiLink atlasReserved PreCondit HiLink atlasReserved PreCondit
HiLink atlasStorageClass StorageClass HiLink atlasStorageClass StorageClass
HiLink atlasIdentifier NONE HiLink atlasIdentifier NONE
HiLink atlasSpecial Special HiLink atlasSpecial Special
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "atlas" let b:current_syntax = "atlas"

View File

@ -18,18 +18,12 @@
" EXTRA_SOURCES. " EXTRA_SOURCES.
" Standard syntax initialization " Standard syntax initialization
if version < 600 if exists("b:current_syntax")
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the Makefile syntax to start with " Read the Makefile syntax to start with
if version < 600 runtime! syntax/make.vim
source <sfile>:p:h/make.vim
else
runtime! syntax/make.vim
endif
syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" 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 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 syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink automakePrimary Statement HiLink automakePrimary Statement
HiLink automakeSecondary Type HiLink automakeSecondary Type
HiLink automakeExtra Special HiLink automakeExtra Special
HiLink automakeOptions Special HiLink automakeOptions Special
HiLink automakeClean Special HiLink automakeClean Special
HiLink automakeSubdirs Statement HiLink automakeSubdirs Statement
HiLink automakeConditional PreProc HiLink automakeConditional PreProc
HiLink automakeSubst PreProc HiLink automakeSubst PreProc
HiLink automakeComment1 makeComment HiLink automakeComment1 makeComment
HiLink automakeComment2 makeComment HiLink automakeComment2 makeComment
HiLink automakeMakeError makeError HiLink automakeMakeError makeError
HiLink automakeBadSubst makeError HiLink automakeBadSubst makeError
HiLink automakeMakeDString makeDString HiLink automakeMakeDString makeDString
HiLink automakeMakeSString makeSString HiLink automakeMakeSString makeSString
HiLink automakeMakeBString makeBString HiLink automakeMakeBString makeBString
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "automake" let b:current_syntax = "automake"

View File

@ -11,11 +11,8 @@
" I use some technologies to automatically load avenue scripts " I use some technologies to automatically load avenue scripts
" into ArcView. " into ArcView.
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -59,34 +56,26 @@ syn match aveTypos "=="
syn match aveTypos "!=" syn match aveTypos "!="
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting+yet
" For version 5.8 and later: only when an item doesn't have highlighting+yet command -nargs=+ HiLink hi def link <args>
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
HiLink aveStatement Statement HiLink aveStatement Statement
HiLink aveString String HiLink aveString String
HiLink aveNumber Number HiLink aveNumber Number
HiLink aveFixVariables Special HiLink aveFixVariables Special
HiLink aveVariables Identifier HiLink aveVariables Identifier
HiLink globalVariables Special HiLink globalVariables Special
HiLink aveConst Special HiLink aveConst Special
HiLink aveClassMethods Function HiLink aveClassMethods Function
HiLink aveOperator Operator HiLink aveOperator Operator
HiLink aveComment Comment HiLink aveComment Comment
HiLink aveTypos Error HiLink aveTypos Error
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "ave" let b:current_syntax = "ave"

View File

@ -6,21 +6,14 @@
" Comment: Replaced sourcing c.vim file by ada.vim and rename yacc* " Comment: Replaced sourcing c.vim file by ada.vim and rename yacc*
" in ayacc* " in ayacc*
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the Ada syntax to start with " Read the Ada syntax to start with
if version < 600 runtime! syntax/ada.vim
so <sfile>:p:h/ada.vim unlet b:current_syntax
else
runtime! syntax/ada.vim
unlet b:current_syntax
endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
@ -54,35 +47,28 @@ syn match ayaccSep "^[ \t]*%}"
syn match ayaccCurlyError "[{}]" syn match ayaccCurlyError "[{}]"
syn region ayaccAction matchgroup=ayaccCurly start="{" end="}" contains=ALLBUT,@ayaccActionGroup syn region ayaccAction matchgroup=ayaccCurly start="{" end="}" contains=ALLBUT,@ayaccActionGroup
if version >= 508 || !exists("did_ayacc_syntax_inits") command -nargs=+ HiLink hi def link <args>
if version < 508
let did_ayacc_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" Internal ayacc highlighting links " Internal ayacc highlighting links
HiLink ayaccBrkt ayaccStmt HiLink ayaccBrkt ayaccStmt
HiLink ayaccKey ayaccStmt HiLink ayaccKey ayaccStmt
HiLink ayaccOper ayaccStmt HiLink ayaccOper ayaccStmt
HiLink ayaccUnionStart ayaccKey HiLink ayaccUnionStart ayaccKey
" External ayacc highlighting links " External ayacc highlighting links
HiLink ayaccCurly Delimiter HiLink ayaccCurly Delimiter
HiLink ayaccCurlyError Error HiLink ayaccCurlyError Error
HiLink ayaccDefinition Function HiLink ayaccDefinition Function
HiLink ayaccDelim Function HiLink ayaccDelim Function
HiLink ayaccKeyActn Special HiLink ayaccKeyActn Special
HiLink ayaccSectionSep Todo HiLink ayaccSectionSep Todo
HiLink ayaccSep Delimiter HiLink ayaccSep Delimiter
HiLink ayaccStmt Statement HiLink ayaccStmt Statement
HiLink ayaccType Type HiLink ayaccType Type
" since Bram doesn't like my Delimiter :| " since Bram doesn't like my Delimiter :|
HiLink Delimiter Type HiLink Delimiter Type
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "ayacc" let b:current_syntax = "ayacc"

View File

@ -5,11 +5,8 @@
" LastChange: 8 Dec 2007 " LastChange: 8 Dec 2007
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -69,58 +66,50 @@ syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error
syn sync ccomment bComment minlines=10 syn sync ccomment bComment minlines=10
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_b_syntax_inits") command -nargs=+ HiLink hi def link <args>
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 " The default methods for highlighting. Can be overridden later
HiLink bLabel Label HiLink bLabel Label
HiLink bUserLabel Label HiLink bUserLabel Label
HiLink bConditional Conditional HiLink bConditional Conditional
HiLink bRepeat Repeat HiLink bRepeat Repeat
HiLink bLogic Special HiLink bLogic Special
HiLink bCharacter Character HiLink bCharacter Character
HiLink bSpecialCharacter bSpecial HiLink bSpecialCharacter bSpecial
HiLink bNumber Number HiLink bNumber Number
HiLink bFloat Float HiLink bFloat Float
HiLink bOctalError bError HiLink bOctalError bError
HiLink bParenError bError HiLink bParenError bError
" HiLink bInParen bError " HiLink bInParen bError
HiLink bCommentError bError HiLink bCommentError bError
HiLink bBoolean Identifier HiLink bBoolean Identifier
HiLink bConstant Identifier HiLink bConstant Identifier
HiLink bGuard Identifier HiLink bGuard Identifier
HiLink bOperator Operator HiLink bOperator Operator
HiLink bKeywords Operator HiLink bKeywords Operator
HiLink bOps Identifier HiLink bOps Identifier
HiLink bStructure Structure HiLink bStructure Structure
HiLink bStorageClass StorageClass HiLink bStorageClass StorageClass
HiLink bInclude Include HiLink bInclude Include
HiLink bPreProc PreProc HiLink bPreProc PreProc
HiLink bDefine Macro HiLink bDefine Macro
HiLink bIncluded bString HiLink bIncluded bString
HiLink bError Error HiLink bError Error
HiLink bStatement Statement HiLink bStatement Statement
HiLink bPreCondit PreCondit HiLink bPreCondit PreCondit
HiLink bType Type HiLink bType Type
HiLink bCommentError bError HiLink bCommentError bError
HiLink bCommentString bString HiLink bCommentString bString
HiLink bComment2String bString HiLink bComment2String bString
HiLink bCommentSkip bComment HiLink bCommentSkip bComment
HiLink bString String HiLink bString String
HiLink bComment Comment HiLink bComment Comment
HiLink bSpecial SpecialChar HiLink bSpecial SpecialChar
HiLink bTodo Todo HiLink bTodo Todo
"hi link bIdentifier Identifier "hi link bIdentifier Identifier
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "b" let b:current_syntax = "b"

View File

@ -4,15 +4,8 @@
" Originally owned by: Erwin Smit / Her van de Vliert " Originally owned by: Erwin Smit / Her van de Vliert
" Last change: v1.17 2006/04/26 10:40:18 " Last change: v1.17 2006/04/26 10:40:18
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
"
if version < 600
syntax clear
if exists("baan_fold")
unlet baan_fold
endif
elseif exists("b:current_syntax")
finish finish
endif endif
@ -1894,40 +1887,32 @@ syn keyword baanBshell bclm.productidlicensed
syn keyword baanBshell bclm.set.desktop syn keyword baanBshell bclm.set.desktop
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink baanConditional Conditional HiLink baanConditional Conditional
HiLink baan3gl Statement HiLink baan3gl Statement
HiLink baan3glpre PreProc HiLink baan3glpre PreProc
HiLink baan4gl Statement HiLink baan4gl Statement
HiLink baan4glh Statement HiLink baan4glh Statement
HiLink baansql Statement HiLink baansql Statement
HiLink baansqlh Statement HiLink baansqlh Statement
HiLink baanDalHook Statement HiLink baanDalHook Statement
HiLink baanNumber Number HiLink baanNumber Number
HiLink baanString String HiLink baanString String
HiLink baanOpenStringError Error HiLink baanOpenStringError Error
HiLink baanConstant Constant HiLink baanConstant Constant
HiLink baanComment Comment HiLink baanComment Comment
HiLink baanCommenth Comment HiLink baanCommenth Comment
HiLink baanUncommented Comment HiLink baanUncommented Comment
HiLink baanDLLUsage Comment HiLink baanDLLUsage Comment
HiLink baanFunUsage Comment HiLink baanFunUsage Comment
HiLink baanIdentifier Normal HiLink baanIdentifier Normal
HiLink baanBshell Function HiLink baanBshell Function
HiLink baanType Type HiLink baanType Type
HiLink baanStorageClass StorageClass HiLink baanStorageClass StorageClass
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "baan" let b:current_syntax = "baan"

View File

@ -8,11 +8,8 @@
" This syntax file not a complete implementation yet. Send suggestions to the " This syntax file not a complete implementation yet. Send suggestions to the
" maintainer. " maintainer.
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -143,34 +140,26 @@ syn match basicFilenumber "#\d\+"
syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR" syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink basicLabel Label HiLink basicLabel Label
HiLink basicConditional Conditional HiLink basicConditional Conditional
HiLink basicRepeat Repeat HiLink basicRepeat Repeat
HiLink basicLineNumber Comment HiLink basicLineNumber Comment
HiLink basicNumber Number HiLink basicNumber Number
HiLink basicError Error HiLink basicError Error
HiLink basicStatement Statement HiLink basicStatement Statement
HiLink basicString String HiLink basicString String
HiLink basicComment Comment HiLink basicComment Comment
HiLink basicSpecial Special HiLink basicSpecial Special
HiLink basicTodo Todo HiLink basicTodo Todo
HiLink basicFunction Identifier HiLink basicFunction Identifier
HiLink basicTypeSpecifier Type HiLink basicTypeSpecifier Type
HiLink basicFilenumber basicTypeSpecifier HiLink basicFilenumber basicTypeSpecifier
"hi basicMathsOperator term=bold cterm=bold gui=bold "hi basicMathsOperator term=bold cterm=bold gui=bold
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "basic" let b:current_syntax = "basic"

View File

@ -5,11 +5,8 @@
" (Dominique Pelle added @Spell) " (Dominique Pelle added @Spell)
" Available on: www.gjh.sk/~vlado/bc.vim " Available on: www.gjh.sk/~vlado/bc.vim
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -53,27 +50,19 @@ syn match bcParenError ")"
syn case match syn case match
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 bcKeyword Statement
HiLink bcType Type HiLink bcType Type
HiLink bcConstant Constant HiLink bcConstant Constant
HiLink bcNumber Number HiLink bcNumber Number
HiLink bcComment Comment HiLink bcComment Comment
HiLink bcString String HiLink bcString String
HiLink bcSpecialChar SpecialChar HiLink bcSpecialChar SpecialChar
HiLink bcParenError Error HiLink bcParenError Error
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "bc" let b:current_syntax = "bc"
" vim: ts=8 " vim: ts=8

View File

@ -8,11 +8,8 @@
" Initialization " Initialization
" ============== " ==============
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif 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 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 " 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: " an error, so we explicitly distinguish versions with and without folding functionality:
if version < 600 syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment
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 bibComment2 start=/@Comment\s*[{(]/ end=/^\s*[})]/me=e-1 contains=@bibCommentContents nextgroup=bibEntry syn region bibComment2 start=/@Comment\s*[{(]/ end=/^\s*[})]/me=e-1 contains=@bibCommentContents nextgroup=bibEntry
" Synchronization " Synchronization
@ -107,25 +100,18 @@ syn sync minlines=50
" Highlighting defaults " Highlighting defaults
" ===================== " =====================
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
if version >= 508 || !exists("did_bib_syn_inits")
if version < 508 HiLink bibType Identifier
let did_bib_syn_inits = 1 HiLink bibEntryKw Statement
command -nargs=+ HiLink hi link <args> HiLink bibNSEntryKw PreProc
else HiLink bibKey Special
command -nargs=+ HiLink hi def link <args> HiLink bibVariable Constant
endif HiLink bibUnescapedSpecial Error
HiLink bibType Identifier HiLink bibComment Comment
HiLink bibEntryKw Statement HiLink bibComment2 Comment
HiLink bibNSEntryKw PreProc delcommand HiLink
HiLink bibKey Special
HiLink bibVariable Constant
HiLink bibUnescapedSpecial Error
HiLink bibComment Comment
HiLink bibComment2 Comment
delcommand HiLink
endif
let b:current_syntax = "bib" let b:current_syntax = "bib"

View File

@ -9,11 +9,8 @@
" "
" $Id: bindzone.vim 12 2011-07-16 21:09:57Z julian $ " $Id: bindzone.vim 12 2011-07-16 21:09:57Z julian $
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -70,40 +67,32 @@ syn region zoneParen contained start="(" end=")" contains=zoneSerial,
syn match zoneComment /;.*/ syn match zoneComment /;.*/
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 zoneDirective Macro
HiLink zoneUnknown Error HiLink zoneUnknown Error
HiLink zoneOrigin Statement HiLink zoneOrigin Statement
HiLink zoneOwnerName Statement HiLink zoneOwnerName Statement
HiLink zoneDomain Identifier HiLink zoneDomain Identifier
HiLink zoneSpecial Special HiLink zoneSpecial Special
HiLink zoneTTL Constant HiLink zoneTTL Constant
HiLink zoneClass Include HiLink zoneClass Include
HiLink zoneRRType Type HiLink zoneRRType Type
HiLink zoneIPAddr Number HiLink zoneIPAddr Number
HiLink zoneIP6Addr Number HiLink zoneIP6Addr Number
HiLink zoneText String HiLink zoneText String
HiLink zoneNumber Number HiLink zoneNumber Number
HiLink zoneSerial Special HiLink zoneSerial Special
HiLink zoneErrParen Error HiLink zoneErrParen Error
HiLink zoneComment Comment HiLink zoneComment Comment
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "bindzone" let b:current_syntax = "bindzone"

View File

@ -3,11 +3,8 @@
" Maintainer: Rafal M. Sulejman <unefunge@friko2.onet.pl> " Maintainer: Rafal M. Sulejman <unefunge@friko2.onet.pl>
" Last change: 2011 Dec 28 by Thilo Six " Last change: 2011 Dec 28 by Thilo Six
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -28,22 +25,14 @@ syn match blankNumber "\[[0-9]\+\]"
syn case match syn case match
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 blankInstruction Statement
HiLink blankNumber Number HiLink blankNumber Number
HiLink blankString String HiLink blankString String
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "blank" let b:current_syntax = "blank"

View File

@ -4,21 +4,12 @@
" Filenames: *.bst " Filenames: *.bst
" $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $ " $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
if version < 600 setlocal iskeyword=48-57,#,$,',.,A-Z,a-z
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
syn case ignore syn case ignore
@ -62,27 +53,19 @@ syn keyword bstField title type
syn keyword bstField volume year syn keyword bstField volume year
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink bstComment Comment HiLink bstComment Comment
HiLink bstString String HiLink bstString String
HiLink bstCommand PreProc HiLink bstCommand PreProc
HiLink bstBuiltIn Statement HiLink bstBuiltIn Statement
HiLink bstField Special HiLink bstField Special
HiLink bstNumber Number HiLink bstNumber Number
HiLink bstType Type HiLink bstType Type
HiLink bstIdentifier Identifier HiLink bstIdentifier Identifier
HiLink bstError Error HiLink bstError Error
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "bst" let b:current_syntax = "bst"

View File

@ -11,11 +11,8 @@
"//- After unary operators like "defined" can assume token type. "//- After unary operators like "defined" can assume token type.
"// Should there be more of these? "// Should there be more of these?
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -184,45 +181,37 @@ syn keyword btmCommand unlock unset ver verify vol
syn keyword btmCommand vscrput y syn keyword btmCommand vscrput y
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 btmLabel Special
HiLink btmLabelMark Special HiLink btmLabelMark Special
HiLink btmCmdDivider Special HiLink btmCmdDivider Special
HiLink btmConditional btmStatement HiLink btmConditional btmStatement
HiLink btmDotBoolOp btmStatement HiLink btmDotBoolOp btmStatement
HiLink btmRepeat btmStatement HiLink btmRepeat btmStatement
HiLink btmEchoCommand btmStatement HiLink btmEchoCommand btmStatement
HiLink btmEchoParam btmStatement HiLink btmEchoParam btmStatement
HiLink btmStatement Statement HiLink btmStatement Statement
HiLink btmTodo Todo HiLink btmTodo Todo
HiLink btmString String HiLink btmString String
HiLink btmNumber Number HiLink btmNumber Number
HiLink btmComment Comment HiLink btmComment Comment
HiLink btmArgument Identifier HiLink btmArgument Identifier
HiLink btmVariable Identifier HiLink btmVariable Identifier
HiLink btmEcho String HiLink btmEcho String
HiLink btmBIFMatch btmStatement HiLink btmBIFMatch btmStatement
HiLink btmBuiltInFunc btmStatement HiLink btmBuiltInFunc btmStatement
HiLink btmBuiltInVar btmStatement HiLink btmBuiltInVar btmStatement
HiLink btmSpecialVar btmStatement HiLink btmSpecialVar btmStatement
HiLink btmCommand btmStatement HiLink btmCommand btmStatement
"optional highlighting "optional highlighting
"HiLink btmShowTab Error "HiLink btmShowTab Error
"HiLink btmShowTabc Error "HiLink btmShowTabc Error
"hiLink btmIdentifier Identifier "hiLink btmIdentifier Identifier
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "btm" let b:current_syntax = "btm"

View File

@ -11,11 +11,8 @@
" Gioele Barabucci " Gioele Barabucci
" for idea of diff highlighting " for idea of diff highlighting
" For version 5.x: Clear all syntax items. " quit when a syntax file was already loaded.
" For version 6.x: Quit when a syntax file was already loaded. if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif 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 syn sync match bzrSync grouphere bzrRegion "^-\{14} This line and the following will be ignored -\{14}$"me=s-1
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already. " Only when an item doesn't have highlighting yet.
" For version 5.8 and later: only when an item doesn't have highlighting yet. command -nargs=+ HiLink hi def link <args>
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 bzrRemoved Constant
HiLink bzrAdded Identifier HiLink bzrAdded Identifier
HiLink bzrModified Special HiLink bzrModified Special
HiLink bzrRenamed Special HiLink bzrRenamed Special
HiLink bzrUnchanged Special HiLink bzrUnchanged Special
HiLink bzrUnknown Special HiLink bzrUnknown Special
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "bzr" let b:current_syntax = "bzr"

View File

@ -18,11 +18,8 @@
" v1.0: Cabal syntax in vimball format " v1.0: Cabal syntax in vimball format
" (thanks to Magnus Therning) " (thanks to Magnus Therning)
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -105,27 +102,19 @@ syn match cabalStatement "\ctype"
syn match cabalStatement "\cversion" syn match cabalStatement "\cversion"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink cabalVersion Number HiLink cabalVersion Number
HiLink cabalTruth Boolean HiLink cabalTruth Boolean
HiLink cabalComment Comment HiLink cabalComment Comment
HiLink cabalStatement Statement HiLink cabalStatement Statement
HiLink cabalCategory Type HiLink cabalCategory Type
HiLink cabalFunction Function HiLink cabalFunction Function
HiLink cabalConditional Conditional HiLink cabalConditional Conditional
HiLink cabalOperator Operator HiLink cabalOperator Operator
HiLink cabalCompiler Constant HiLink cabalCompiler Constant
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cabal" let b:current_syntax = "cabal"

Binary file not shown.

View File

@ -3,11 +3,8 @@
" Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru) " Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru)
" Last change: 2012 Aug 11 " Last change: 2012 Aug 11
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists ("b:current_syntax")
if version < 600
syntax clear
elseif exists ("b:current_syntax")
finish finish
endif endif
@ -36,25 +33,18 @@ syn match CfgComment ";.*"
syn match CfgComment "\/\/.*" syn match CfgComment "\/\/.*"
" Define the default hightlighting. " Define the default hightlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
if version >= 508 || !exists("did_cfg_syn_inits") HiLink CfgOnOff Label
if version < 508 HiLink CfgComment Comment
let did_cfg_syn_inits = 1 HiLink CfgSection Type
command -nargs=+ HiLink hi link <args> HiLink CfgString String
else HiLink CfgParams Keyword
command -nargs=+ HiLink hi def link <args> HiLink CfgValues Constant
endif HiLink CfgDirectory Directory
HiLink CfgOnOff Label HiLink UncPath Directory
HiLink CfgComment Comment
HiLink CfgSection Type delcommand HiLink
HiLink CfgString String
HiLink CfgParams Keyword
HiLink CfgValues Constant
HiLink CfgDirectory Directory
HiLink UncPath Directory
delcommand HiLink
endif
let b:current_syntax = "cfg" let b:current_syntax = "cfg"
" vim:ts=8 " vim:ts=8

View File

@ -8,21 +8,14 @@
" Ch is a C/C++ interpreter with many high level extensions " Ch is a C/C++ interpreter with many high level extensions
" "
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the C syntax to start with " Read the C syntax to start with
if version < 600 runtime! syntax/c.vim
so <sfile>:p:h/c.vim unlet b:current_syntax
else
runtime! syntax/c.vim
unlet b:current_syntax
endif
" Ch extentions " Ch extentions
@ -33,20 +26,14 @@ syn keyword chStructure class
syn keyword chType string_t array syn keyword chType string_t array
" Default highlighting " Default highlighting
if version >= 508 || !exists("did_ch_syntax_inits") command -nargs=+ HiLink hi def link <args>
if version < 508
let did_ch_syntax_inits = 1 HiLink chAccess chStatement
command -nargs=+ HiLink hi link <args> HiLink chExceptions Exception
else HiLink chStatement Statement
command -nargs=+ HiLink hi def link <args> HiLink chType Type
endif HiLink chStructure Structure
HiLink chAccess chStatement delcommand HiLink
HiLink chExceptions Exception
HiLink chStatement Statement
HiLink chType Type
HiLink chStructure Structure
delcommand HiLink
endif
let b:current_syntax = "ch" let b:current_syntax = "ch"

View File

@ -7,11 +7,8 @@
" in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and " in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and
" "cweb.vim" respectively. " "cweb.vim" respectively.
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syn clear
elseif exists("b:current_syntax")
finish finish
endif 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 syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 changeFromMaterial String
HiLink changeToMaterial Statement HiLink changeToMaterial Statement
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "change" let b:current_syntax = "change"

View File

@ -4,11 +4,8 @@
" Maintainer: Corinna Vinschen <vinschen@redhat.com> " Maintainer: Corinna Vinschen <vinschen@redhat.com>
" Last Change: June 1, 2003 " Last Change: June 1, 2003
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -28,17 +25,12 @@ endif
syn match changelogText "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError syn match changelogText "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError
syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail
if version < 600 syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend
syn region changelogFiles start="^\s\+[+*]\s" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend
syn region changelogFiles start="^\s\+[([]" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend syn match changelogFuncs contained "(.\{-})" extend
syn match changelogColon contained ":\s" syn match changelogFuncs contained "\[.\{-}]" extend
else syn match changelogColon contained ":"
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 match changelogBullet contained "^\s\+[+*]\s" contains=changelogError syn match changelogBullet contained "^\s\+[+*]\s" contains=changelogError
syn match changelogMail contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>" 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 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]\+" syn match changelogNumber contained "[.-]*[0-9]\+"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 changelogText Normal
HiLink changelogBullet Type HiLink changelogBullet Type
HiLink changelogColon Type HiLink changelogColon Type
HiLink changelogFiles Comment HiLink changelogFiles Comment
if version >= 600 HiLink changelogFuncs Comment
HiLink changelogFuncs Comment HiLink changelogHeader Statement
endif HiLink changelogMail Special
HiLink changelogHeader Statement HiLink changelogNumber Number
HiLink changelogMail Special HiLink changelogMonth Number
HiLink changelogNumber Number HiLink changelogDay Number
HiLink changelogMonth Number HiLink changelogError Folded
HiLink changelogDay Number
HiLink changelogError Folded
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "changelog" let b:current_syntax = "changelog"

View File

@ -9,10 +9,6 @@
let b:hs_chs=1 let b:hs_chs=1
" Include standard Haskell highlighting " Include standard Haskell highlighting
if version < 600 runtime! syntax/haskell.vim
source <sfile>:p:h/haskell.vim
else
runtime! syntax/haskell.vim
endif
" vim: ts=8 " vim: ts=8

View File

@ -8,11 +8,8 @@
" PSP-style tags: <% .. %> (obsoleted feature) " PSP-style tags: <% .. %> (obsoleted feature)
" doc-strings and header comments (rarely used feature) " doc-strings and header comments (rarely used feature)
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -36,25 +33,17 @@ syn match cheetahComment "##.*$" display
syn region cheetahMultiLineComment start="#\*" end="\*#" syn region cheetahMultiLineComment start="#\*" end="\*#"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 cheetahPlaceHolder Identifier
HiLink cheetahDirective PreCondit HiLink cheetahDirective PreCondit
HiLink cheetahKeyword Define HiLink cheetahKeyword Define
HiLink cheetahContinuation Special HiLink cheetahContinuation Special
HiLink cheetahComment Comment HiLink cheetahComment Comment
HiLink cheetahMultiLineComment Comment HiLink cheetahMultiLineComment Comment
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cheetah" let b:current_syntax = "cheetah"

View File

@ -11,11 +11,8 @@
" & Communications LTd.) " & Communications LTd.)
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -124,67 +121,59 @@ endif
exec "syn sync ccomment chillComment minlines=" . chill_minlines exec "syn sync ccomment chillComment minlines=" . chill_minlines
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 chillLabel Label
HiLink chillUserLabel Label HiLink chillUserLabel Label
HiLink chillConditional Conditional HiLink chillConditional Conditional
" hi chillConditional term=bold ctermfg=red guifg=red gui=bold " hi chillConditional term=bold ctermfg=red guifg=red gui=bold
HiLink chillRepeat Repeat HiLink chillRepeat Repeat
HiLink chillProcess Repeat HiLink chillProcess Repeat
HiLink chillSignal Repeat HiLink chillSignal Repeat
HiLink chillCharacter Character HiLink chillCharacter Character
HiLink chillSpecialCharacter chillSpecial HiLink chillSpecialCharacter chillSpecial
HiLink chillNumber Number HiLink chillNumber Number
HiLink chillFloat Float HiLink chillFloat Float
HiLink chillOctalError chillError HiLink chillOctalError chillError
HiLink chillParenError chillError HiLink chillParenError chillError
HiLink chillInParen chillError HiLink chillInParen chillError
HiLink chillCommentError chillError HiLink chillCommentError chillError
HiLink chillSpaceError chillError HiLink chillSpaceError chillError
HiLink chillOperator Operator HiLink chillOperator Operator
HiLink chillStructure Structure HiLink chillStructure Structure
HiLink chillBlock Operator HiLink chillBlock Operator
HiLink chillScope Operator HiLink chillScope Operator
"hi chillEDML term=underline ctermfg=DarkRed guifg=Red "hi chillEDML term=underline ctermfg=DarkRed guifg=Red
HiLink chillEDML PreProc HiLink chillEDML PreProc
"hi chillBoolConst term=bold ctermfg=brown guifg=brown "hi chillBoolConst term=bold ctermfg=brown guifg=brown
HiLink chillBoolConst Constant HiLink chillBoolConst Constant
"hi chillLogical term=bold ctermfg=brown guifg=brown "hi chillLogical term=bold ctermfg=brown guifg=brown
HiLink chillLogical Constant HiLink chillLogical Constant
HiLink chillStorageClass StorageClass HiLink chillStorageClass StorageClass
HiLink chillInclude Include HiLink chillInclude Include
HiLink chillPreProc PreProc HiLink chillPreProc PreProc
HiLink chillDefine Macro HiLink chillDefine Macro
HiLink chillIncluded chillString HiLink chillIncluded chillString
HiLink chillError Error HiLink chillError Error
HiLink chillStatement Statement HiLink chillStatement Statement
HiLink chillPreCondit PreCondit HiLink chillPreCondit PreCondit
HiLink chillType Type HiLink chillType Type
HiLink chillCommentError chillError HiLink chillCommentError chillError
HiLink chillCommentString chillString HiLink chillCommentString chillString
HiLink chillComment2String chillString HiLink chillComment2String chillString
HiLink chillCommentSkip chillComment HiLink chillCommentSkip chillComment
HiLink chillString String HiLink chillString String
HiLink chillComment Comment HiLink chillComment Comment
" hi chillComment term=None ctermfg=lightblue guifg=lightblue " hi chillComment term=None ctermfg=lightblue guifg=lightblue
HiLink chillSpecial SpecialChar HiLink chillSpecial SpecialChar
HiLink chillTodo Todo HiLink chillTodo Todo
HiLink chillBlock Statement HiLink chillBlock Statement
"HiLink chillIdentifier Identifier "HiLink chillIdentifier Identifier
HiLink chillBracket Delimiter HiLink chillBracket Delimiter
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "chill" let b:current_syntax = "chill"

View File

@ -10,19 +10,12 @@
" Version: 6 " Version: 6
" Last Change: Mar 06 2013 " Last Change: Mar 06 2013
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
if version >= 600 setlocal iskeyword=@,48-57,_,-
setlocal iskeyword=@,48-57,_,-
else
set iskeyword=@,48-57,_,-
endif
syn case ignore 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 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. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 clifError Error
HiLink clSpaceError Error HiLink clSpaceError Error
HiLink clWhile Repeat HiLink clWhile Repeat
HiLink clConditional Conditional HiLink clConditional Conditional
HiLink clDebug Debug HiLink clDebug Debug
HiLink clNeedsWork Todo HiLink clNeedsWork Todo
HiLink clTodo Todo HiLink clTodo Todo
HiLink clComment Comment HiLink clComment Comment
HiLink clProcedure Procedure HiLink clProcedure Procedure
HiLink clBreak Procedure HiLink clBreak Procedure
HiLink clInclude Include HiLink clInclude Include
HiLink clSetOption Statement HiLink clSetOption Statement
HiLink clSet Identifier HiLink clSet Identifier
HiLink clPreProc PreProc HiLink clPreProc PreProc
HiLink clOperator Operator HiLink clOperator Operator
HiLink clNumber Number HiLink clNumber Number
HiLink clString String HiLink clString String
HiLink clQuote Delimiter HiLink clQuote Delimiter
HiLink clReserved Identifier HiLink clReserved Identifier
HiLink clFunction Function HiLink clFunction Function
HiLink clStatement Statement HiLink clStatement Statement
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cl" let b:current_syntax = "cl"

View File

@ -4,11 +4,8 @@
" Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl>
" Last Change: 2013 Oct 15 by Jurriën Stutterheim " Last Change: 2013 Oct 15 by Jurriën Stutterheim
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -52,15 +49,8 @@ syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(in
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
" Comments " Comments
HiLink cleanComment Comment HiLink cleanComment Comment
@ -93,8 +83,7 @@ if version >= 508 || !exists("did_clean_syntax_init")
" Todo " Todo
HiLink cleanTodo Todo HiLink cleanTodo Todo
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "clean" let b:current_syntax = "clean"

View File

@ -4,11 +4,8 @@
" Some things based on c.vim by Bram Moolenaar and pascal.vim by Mario Eusebio " Some things based on c.vim by Bram Moolenaar and pascal.vim by Mario Eusebio
" Last Change: 2011 Dec 29 by Thilo Six " Last Change: 2011 Dec 29 by Thilo Six
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -114,32 +111,24 @@ syntax match clipperComment "^\*.*"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 clipperConditional Conditional
HiLink clipperRepeat Repeat HiLink clipperRepeat Repeat
HiLink clipperNumber Number HiLink clipperNumber Number
HiLink clipperInclude Include HiLink clipperInclude Include
HiLink clipperComment Comment HiLink clipperComment Comment
HiLink clipperOperator Operator HiLink clipperOperator Operator
HiLink clipperStorageClass StorageClass HiLink clipperStorageClass StorageClass
HiLink clipperStatement Statement HiLink clipperStatement Statement
HiLink clipperString String HiLink clipperString String
HiLink clipperFunction Function HiLink clipperFunction Function
HiLink clipperLineContinuation Special HiLink clipperLineContinuation Special
HiLink clipperDelimiters Delimiter HiLink clipperDelimiters Delimiter
HiLink clipperUserVariable Identifier HiLink clipperUserVariable Identifier
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "clipper" let b:current_syntax = "clipper"

View File

@ -12,11 +12,8 @@
" http://www.cmake.org/HTML/Copyright.html " http://www.cmake.org/HTML/Copyright.html
" This implies that distribution with Vim is allowed " This implies that distribution with Vim is allowed
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
let s:keepcpo= &cpo let s:keepcpo= &cpo
@ -52,32 +49,24 @@ syn keyword cmakeTodo
\ contained \ contained
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink cmakeStatement Statement HiLink cmakeStatement Statement
HiLink cmakeComment Comment HiLink cmakeComment Comment
HiLink cmakeString String HiLink cmakeString String
HiLink cmakeVariableValue Type HiLink cmakeVariableValue Type
HiLink cmakeRegistry Underlined HiLink cmakeRegistry Underlined
HiLink cmakeArguments Identifier HiLink cmakeArguments Identifier
HiLink cmakeArgument Constant HiLink cmakeArgument Constant
HiLink cmakeEnvironment Special HiLink cmakeEnvironment Special
HiLink cmakeOperators Operator HiLink cmakeOperators Operator
HiLink cmakeMacro PreProc HiLink cmakeMacro PreProc
HiLink cmakeError Error HiLink cmakeError Error
HiLink cmakeTodo TODO HiLink cmakeTodo TODO
HiLink cmakeEscaped Special HiLink cmakeEscaped Special
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cmake" let b:current_syntax = "cmake"

View File

@ -6,20 +6,13 @@
" James Mitchell <james_mitchell@acm.org>) " James Mitchell <james_mitchell@acm.org>)
" Last Change: 2015 Feb 13 " Last Change: 2015 Feb 13
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" MOST important - else most of the keywords wont work! " MOST important - else most of the keywords wont work!
if version < 600 setlocal isk=@,48-57,-
set isk=@,48-57,-
else
setlocal isk=@,48-57,-
endif
syn case ignore syn case ignore
@ -157,52 +150,44 @@ else
endif endif
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 cobolBAD Error
HiLink cobolBadID Error HiLink cobolBadID Error
HiLink cobolBadLine Error HiLink cobolBadLine Error
if exists("g:cobol_legacy_code") if exists("g:cobol_legacy_code")
HiLink cobolMarker Comment HiLink cobolMarker Comment
else else
HiLink cobolMarker Error 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
endif 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" let b:current_syntax = "cobol"

View File

@ -5,9 +5,8 @@
" Remark: Coco/R syntax partially implemented. " Remark: Coco/R syntax partially implemented.
" License: Vim license " License: Vim license
if version < 600 " quit when a syntax file was already loaded
syntax clear if exists("b:current_syntax")
elseif exists("b:current_syntax")
finish finish
endif endif

View File

@ -11,11 +11,8 @@
" script, so I wrote this quick and dirty patch. " script, so I wrote this quick and dirty patch.
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif 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 syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 configdelimiter Delimiter
HiLink configoperator Operator HiLink configoperator Operator
HiLink configcomment Comment HiLink configcomment Comment
HiLink configDnl Comment HiLink configDnl Comment
HiLink configfunction Function HiLink configfunction Function
HiLink confignumber Number HiLink confignumber Number
HiLink configkeyword Keyword HiLink configkeyword Keyword
HiLink configspecial Special HiLink configspecial Special
HiLink configstring String HiLink configstring String
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "config" let b:current_syntax = "config"

View File

@ -4,21 +4,14 @@
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2016 Jul 07 " Last Change: 2016 Jul 07
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the C syntax to start with " Read the C syntax to start with
if version < 600 runtime! syntax/c.vim
so <sfile>:p:h/c.vim unlet b:current_syntax
else
runtime! syntax/c.vim
unlet b:current_syntax
endif
" C++ extensions " C++ extensions
syn keyword cppStatement new delete this friend using syn keyword cppStatement new delete this friend using
@ -60,29 +53,22 @@ endif
syn match cppMinMax "[<>]?" syn match cppMinMax "[<>]?"
" Default highlighting " Default highlighting
if version >= 508 || !exists("did_cpp_syntax_inits") command -nargs=+ HiLink hi def link <args>
if version < 508 HiLink cppAccess cppStatement
let did_cpp_syntax_inits = 1 HiLink cppCast cppStatement
command -nargs=+ HiLink hi link <args> HiLink cppExceptions Exception
else HiLink cppOperator Operator
command -nargs=+ HiLink hi def link <args> HiLink cppStatement Statement
endif HiLink cppModifier Type
HiLink cppAccess cppStatement HiLink cppType Type
HiLink cppCast cppStatement HiLink cppStorageClass StorageClass
HiLink cppExceptions Exception HiLink cppStructure Structure
HiLink cppOperator Operator HiLink cppBoolean Boolean
HiLink cppStatement Statement HiLink cppConstant Constant
HiLink cppModifier Type HiLink cppRawStringDelimiter Delimiter
HiLink cppType Type HiLink cppRawString String
HiLink cppStorageClass StorageClass HiLink cppNumber Number
HiLink cppStructure Structure delcommand HiLink
HiLink cppBoolean Boolean
HiLink cppConstant Constant
HiLink cppRawStringDelimiter Delimiter
HiLink cppRawString String
HiLink cppNumber Number
delcommand HiLink
endif
let b:current_syntax = "cpp" let b:current_syntax = "cpp"

View File

@ -10,11 +10,8 @@
" crontab line format: " crontab line format:
" Minutes Hours Days Months Days_of_Week Commands # comments " Minutes Hours Days Months Days_of_Week Commands # comments
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -39,41 +36,33 @@ syntax match crontabCmnt "^\s*#.*" contains=@Spell
syntax match crontabPercent "[^\\]%.*"lc=1 contained syntax match crontabPercent "[^\\]%.*"lc=1 contained
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 crontabMin Number
HiLink crontabHr PreProc HiLink crontabHr PreProc
HiLink crontabDay Type HiLink crontabDay Type
HiLink crontabMnth Number HiLink crontabMnth Number
HiLink crontabMnth12 Number HiLink crontabMnth12 Number
HiLink crontabMnthS Number HiLink crontabMnthS Number
HiLink crontabMnthN Number HiLink crontabMnthN Number
HiLink crontabDow PreProc HiLink crontabDow PreProc
HiLink crontabDow7 PreProc HiLink crontabDow7 PreProc
HiLink crontabDowS PreProc HiLink crontabDowS PreProc
HiLink crontabDowN PreProc HiLink crontabDowN PreProc
HiLink crontabNick Special HiLink crontabNick Special
HiLink crontabVar Identifier HiLink crontabVar Identifier
HiLink crontabPercent Special HiLink crontabPercent Special
" comment out next line for to suppress unix commands coloring. " comment out next line for to suppress unix commands coloring.
HiLink crontabCmd Statement HiLink crontabCmd Statement
HiLink crontabCmnt Comment HiLink crontabCmnt Comment
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "crontab" let b:current_syntax = "crontab"

View File

@ -3,11 +3,8 @@
" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> " Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net>
" Last change: 2011 Dec 25 by Thilo Six " Last change: 2011 Dec 25 by Thilo Six
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -145,7 +142,7 @@ sy match cscBPMacro contained "!"
sy match cscBPW "!\s*\a*" contains=cscBPmacro sy match cscBPW "!\s*\a*" contains=cscBPmacro
" when wanted, highlighting lhs members or erros in asignments (may lag the editing) " 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 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 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 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 exec "sy sync ccomment cscComment minlines=" . csc_minlines
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue
HiLink cscNumber Number HiLink cscNumber Number
HiLink cscOctal Number HiLink cscOctal Number
HiLink cscFloat Float HiLink cscFloat Float
HiLink cscParenE Error HiLink cscParenE Error
HiLink cscCommentE Error HiLink cscCommentE Error
HiLink cscSpaceE Error HiLink cscSpaceE Error
HiLink cscError Error HiLink cscError Error
HiLink cscString String HiLink cscString String
HiLink cscComment Comment HiLink cscComment Comment
HiLink cscTodo Todo HiLink cscTodo Todo
HiLink cscStatement Statement HiLink cscStatement Statement
HiLink cscIfError Error HiLink cscIfError Error
HiLink cscEqError Error HiLink cscEqError Error
HiLink cscFunction Statement HiLink cscFunction Statement
HiLink cscCondition Statement HiLink cscCondition Statement
HiLink cscWarn WarningMsg HiLink cscWarn WarningMsg
HiLink cscComE Error HiLink cscComE Error
HiLink cscCom Statement HiLink cscCom Statement
HiLink cscComW WarningMsg HiLink cscComW WarningMsg
HiLink cscBPMacro Identifier HiLink cscBPMacro Identifier
HiLink cscBPW WarningMsg HiLink cscBPW WarningMsg
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "csc" let b:current_syntax = "csc"

View File

@ -5,11 +5,8 @@
" Version: 11 " Version: 11
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -100,60 +97,47 @@ syn match cshNumber "-\=\<\d\+\>"
"syn match cshIdentifier "\<[a-zA-Z._][a-zA-Z0-9._]*\>" "syn match cshIdentifier "\<[a-zA-Z._][a-zA-Z0-9._]*\>"
" Shell Input Redirection (Here Documents) " Shell Input Redirection (Here Documents)
if version < 600 syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**\z(\h\w*\)\**" matchgroup=cshRedir end="^\z1$"
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
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 cshArgv cshVariables
HiLink cshBckQuote cshCommand HiLink cshBckQuote cshCommand
HiLink cshDblQuote cshString HiLink cshDblQuote cshString
HiLink cshExtVar cshVariables HiLink cshExtVar cshVariables
HiLink cshHereDoc cshString HiLink cshHereDoc cshString
HiLink cshNoEndlineBQ cshNoEndline HiLink cshNoEndlineBQ cshNoEndline
HiLink cshNoEndlineDQ cshNoEndline HiLink cshNoEndlineDQ cshNoEndline
HiLink cshNoEndlineSQ cshNoEndline HiLink cshNoEndlineSQ cshNoEndline
HiLink cshQtyWord cshVariables HiLink cshQtyWord cshVariables
HiLink cshRedir cshOperator HiLink cshRedir cshOperator
HiLink cshSelector cshVariables HiLink cshSelector cshVariables
HiLink cshSetStmt cshStatement HiLink cshSetStmt cshStatement
HiLink cshSetVariables cshVariables HiLink cshSetVariables cshVariables
HiLink cshSnglQuote cshString HiLink cshSnglQuote cshString
HiLink cshSubst cshVariables HiLink cshSubst cshVariables
HiLink cshCommand Statement HiLink cshCommand Statement
HiLink cshComment Comment HiLink cshComment Comment
HiLink cshConditional Conditional HiLink cshConditional Conditional
HiLink cshIdentifier Error HiLink cshIdentifier Error
HiLink cshModifier Special HiLink cshModifier Special
HiLink cshNoEndline Error HiLink cshNoEndline Error
HiLink cshNumber Number HiLink cshNumber Number
HiLink cshOperator Operator HiLink cshOperator Operator
HiLink cshRedir Statement HiLink cshRedir Statement
HiLink cshRepeat Repeat HiLink cshRepeat Repeat
HiLink cshShellVariables Special HiLink cshShellVariables Special
HiLink cshSpecial Special HiLink cshSpecial Special
HiLink cshStatement Statement HiLink cshStatement Statement
HiLink cshString String HiLink cshString String
HiLink cshSubstError Error HiLink cshSubstError Error
HiLink cshTodo Todo HiLink cshTodo Todo
HiLink cshVariables Type HiLink cshVariables Type
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "csh" let b:current_syntax = "csh"

View File

@ -15,11 +15,8 @@
" - The additional syntax for the RT-Tester (pseudo-comments) " - The additional syntax for the RT-Tester (pseudo-comments)
" should be optional. " should be optional.
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -149,46 +146,38 @@ syn match cspSdlRttComment "pragma\s\+SDL_MATCH\s\+" nextgroup=cspRttPragmaSdlAr
syn sync lines=250 syn sync lines=250
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 " The default methods for highlighting. Can be overridden later
" (For vim version <=5.7, the command groups are defined in " (For vim version <=5.7, the command groups are defined in
" $VIMRUNTIME/syntax/synload.vim ) " $VIMRUNTIME/syntax/synload.vim )
HiLink cspComment Comment HiLink cspComment Comment
HiLink cspNumber Number HiLink cspNumber Number
HiLink cspConditional Conditional HiLink cspConditional Conditional
HiLink cspOperator Delimiter HiLink cspOperator Delimiter
HiLink cspKeyword Keyword HiLink cspKeyword Keyword
HiLink cspReserved SpecialChar HiLink cspReserved SpecialChar
HiLink cspInclude Error HiLink cspInclude Error
HiLink cspIncludeKeyword Include HiLink cspIncludeKeyword Include
HiLink cspIncludeArg Include HiLink cspIncludeArg Include
HiLink cspAssert PreCondit HiLink cspAssert PreCondit
HiLink cspType Type HiLink cspType Type
HiLink cspProcess Function HiLink cspProcess Function
HiLink cspTodo Todo HiLink cspTodo Todo
HiLink cspOldRttComment Define HiLink cspOldRttComment Define
HiLink cspRttPragmaKeyword Define HiLink cspRttPragmaKeyword Define
HiLink cspSdlRttComment Define HiLink cspSdlRttComment Define
HiLink cspRttPragmaArg Define HiLink cspRttPragmaArg Define
HiLink cspRttPragmaSdlArg Define HiLink cspRttPragmaSdlArg Define
HiLink cspRttPragmaSdlName Default HiLink cspRttPragmaSdlName Default
HiLink cspRttPragmaSdlTailArg Define HiLink cspRttPragmaSdlTailArg Define
HiLink cspRttPragmaSdlTransName Default HiLink cspRttPragmaSdlTransName Default
HiLink cspRttPragmaSdlTransTailArg Define HiLink cspRttPragmaSdlTransTailArg Define
HiLink cspReservedIdentifier Error HiLink cspReservedIdentifier Error
" (Currently unused vim method: Debug) " (Currently unused vim method: Debug)
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "csp" let b:current_syntax = "csp"

View File

@ -8,12 +8,9 @@
" URL: https://github.com/JulesWang/css.vim " URL: https://github.com/JulesWang/css.vim
" Last Change: 2015 Apr.17 " Last Change: 2015 Apr.17
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded
if !exists("main_syntax") if !exists("main_syntax")
if version < 600 if exists("b:current_syntax")
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
let main_syntax = 'css' let main_syntax = 'css'
@ -516,139 +513,131 @@ if main_syntax == "css"
endif endif
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 cssComment Comment
HiLink cssVendor Comment HiLink cssVendor Comment
HiLink cssHacks Comment HiLink cssHacks Comment
HiLink cssTagName Statement HiLink cssTagName Statement
HiLink cssDeprecated Error HiLink cssDeprecated Error
HiLink cssSelectorOp Special HiLink cssSelectorOp Special
HiLink cssSelectorOp2 Special HiLink cssSelectorOp2 Special
HiLink cssAttrComma Special HiLink cssAttrComma Special
HiLink cssAnimationProp cssProp HiLink cssAnimationProp cssProp
HiLink cssBackgroundProp cssProp HiLink cssBackgroundProp cssProp
HiLink cssBorderProp cssProp HiLink cssBorderProp cssProp
HiLink cssBoxProp cssProp HiLink cssBoxProp cssProp
HiLink cssColorProp cssProp HiLink cssColorProp cssProp
HiLink cssContentForPagedMediaProp cssProp HiLink cssContentForPagedMediaProp cssProp
HiLink cssDimensionProp cssProp HiLink cssDimensionProp cssProp
HiLink cssFlexibleBoxProp cssProp HiLink cssFlexibleBoxProp cssProp
HiLink cssFontProp cssProp HiLink cssFontProp cssProp
HiLink cssGeneratedContentProp cssProp HiLink cssGeneratedContentProp cssProp
HiLink cssGridProp cssProp HiLink cssGridProp cssProp
HiLink cssHyerlinkProp cssProp HiLink cssHyerlinkProp cssProp
HiLink cssLineboxProp cssProp HiLink cssLineboxProp cssProp
HiLink cssListProp cssProp HiLink cssListProp cssProp
HiLink cssMarqueeProp cssProp HiLink cssMarqueeProp cssProp
HiLink cssMultiColumnProp cssProp HiLink cssMultiColumnProp cssProp
HiLink cssPagedMediaProp cssProp HiLink cssPagedMediaProp cssProp
HiLink cssPositioningProp cssProp HiLink cssPositioningProp cssProp
HiLink cssPrintProp cssProp HiLink cssPrintProp cssProp
HiLink cssRubyProp cssProp HiLink cssRubyProp cssProp
HiLink cssSpeechProp cssProp HiLink cssSpeechProp cssProp
HiLink cssTableProp cssProp HiLink cssTableProp cssProp
HiLink cssTextProp cssProp HiLink cssTextProp cssProp
HiLink cssTransformProp cssProp HiLink cssTransformProp cssProp
HiLink cssTransitionProp cssProp HiLink cssTransitionProp cssProp
HiLink cssUIProp cssProp HiLink cssUIProp cssProp
HiLink cssIEUIProp cssProp HiLink cssIEUIProp cssProp
HiLink cssAuralProp cssProp HiLink cssAuralProp cssProp
HiLink cssRenderProp cssProp HiLink cssRenderProp cssProp
HiLink cssMobileTextProp cssProp HiLink cssMobileTextProp cssProp
HiLink cssAnimationAttr cssAttr HiLink cssAnimationAttr cssAttr
HiLink cssBackgroundAttr cssAttr HiLink cssBackgroundAttr cssAttr
HiLink cssBorderAttr cssAttr HiLink cssBorderAttr cssAttr
HiLink cssBoxAttr cssAttr HiLink cssBoxAttr cssAttr
HiLink cssContentForPagedMediaAttr cssAttr HiLink cssContentForPagedMediaAttr cssAttr
HiLink cssDimensionAttr cssAttr HiLink cssDimensionAttr cssAttr
HiLink cssFlexibleBoxAttr cssAttr HiLink cssFlexibleBoxAttr cssAttr
HiLink cssFontAttr cssAttr HiLink cssFontAttr cssAttr
HiLink cssGeneratedContentAttr cssAttr HiLink cssGeneratedContentAttr cssAttr
HiLink cssGridAttr cssAttr HiLink cssGridAttr cssAttr
HiLink cssHyerlinkAttr cssAttr HiLink cssHyerlinkAttr cssAttr
HiLink cssLineboxAttr cssAttr HiLink cssLineboxAttr cssAttr
HiLink cssListAttr cssAttr HiLink cssListAttr cssAttr
HiLink cssMarginAttr cssAttr HiLink cssMarginAttr cssAttr
HiLink cssMarqueeAttr cssAttr HiLink cssMarqueeAttr cssAttr
HiLink cssMultiColumnAttr cssAttr HiLink cssMultiColumnAttr cssAttr
HiLink cssPaddingAttr cssAttr HiLink cssPaddingAttr cssAttr
HiLink cssPagedMediaAttr cssAttr HiLink cssPagedMediaAttr cssAttr
HiLink cssPositioningAttr cssAttr HiLink cssPositioningAttr cssAttr
HiLink cssGradientAttr cssAttr HiLink cssGradientAttr cssAttr
HiLink cssPrintAttr cssAttr HiLink cssPrintAttr cssAttr
HiLink cssRubyAttr cssAttr HiLink cssRubyAttr cssAttr
HiLink cssSpeechAttr cssAttr HiLink cssSpeechAttr cssAttr
HiLink cssTableAttr cssAttr HiLink cssTableAttr cssAttr
HiLink cssTextAttr cssAttr HiLink cssTextAttr cssAttr
HiLink cssTransformAttr cssAttr HiLink cssTransformAttr cssAttr
HiLink cssTransitionAttr cssAttr HiLink cssTransitionAttr cssAttr
HiLink cssUIAttr cssAttr HiLink cssUIAttr cssAttr
HiLink cssIEUIAttr cssAttr HiLink cssIEUIAttr cssAttr
HiLink cssAuralAttr cssAttr HiLink cssAuralAttr cssAttr
HiLink cssRenderAttr cssAttr HiLink cssRenderAttr cssAttr
HiLink cssCommonAttr cssAttr HiLink cssCommonAttr cssAttr
HiLink cssPseudoClassId PreProc HiLink cssPseudoClassId PreProc
HiLink cssPseudoClassLang Constant HiLink cssPseudoClassLang Constant
HiLink cssValueLength Number HiLink cssValueLength Number
HiLink cssValueInteger Number HiLink cssValueInteger Number
HiLink cssValueNumber Number HiLink cssValueNumber Number
HiLink cssValueAngle Number HiLink cssValueAngle Number
HiLink cssValueTime Number HiLink cssValueTime Number
HiLink cssValueFrequency Number HiLink cssValueFrequency Number
HiLink cssFunction Constant HiLink cssFunction Constant
HiLink cssURL String HiLink cssURL String
HiLink cssFunctionName Function HiLink cssFunctionName Function
HiLink cssFunctionComma Function HiLink cssFunctionComma Function
HiLink cssColor Constant HiLink cssColor Constant
HiLink cssIdentifier Function HiLink cssIdentifier Function
HiLink cssInclude Include HiLink cssInclude Include
HiLink cssIncludeKeyword atKeyword HiLink cssIncludeKeyword atKeyword
HiLink cssImportant Special HiLink cssImportant Special
HiLink cssBraces Function HiLink cssBraces Function
HiLink cssBraceError Error HiLink cssBraceError Error
HiLink cssError Error HiLink cssError Error
HiLink cssUnicodeEscape Special HiLink cssUnicodeEscape Special
HiLink cssStringQQ String HiLink cssStringQQ String
HiLink cssStringQ String HiLink cssStringQ String
HiLink cssAttributeSelector String HiLink cssAttributeSelector String
HiLink cssMedia atKeyword HiLink cssMedia atKeyword
HiLink cssMediaType Special HiLink cssMediaType Special
HiLink cssMediaComma Normal HiLink cssMediaComma Normal
HiLink cssMediaKeyword Statement HiLink cssMediaKeyword Statement
HiLink cssMediaProp cssProp HiLink cssMediaProp cssProp
HiLink cssMediaAttr cssAttr HiLink cssMediaAttr cssAttr
HiLink cssPage atKeyword HiLink cssPage atKeyword
HiLink cssPagePseudo PreProc HiLink cssPagePseudo PreProc
HiLink cssPageMargin atKeyword HiLink cssPageMargin atKeyword
HiLink cssPageProp cssProp HiLink cssPageProp cssProp
HiLink cssKeyFrame atKeyword HiLink cssKeyFrame atKeyword
HiLink cssKeyFrameSelector Constant HiLink cssKeyFrameSelector Constant
HiLink cssFontDescriptor Special HiLink cssFontDescriptor Special
HiLink cssFontDescriptorFunction Constant HiLink cssFontDescriptorFunction Constant
HiLink cssFontDescriptorProp cssProp HiLink cssFontDescriptorProp cssProp
HiLink cssFontDescriptorAttr cssAttr HiLink cssFontDescriptorAttr cssAttr
HiLink cssUnicodeRange Constant HiLink cssUnicodeRange Constant
HiLink cssClassName Function HiLink cssClassName Function
HiLink cssClassNameDot Function HiLink cssClassNameDot Function
HiLink cssProp StorageClass HiLink cssProp StorageClass
HiLink cssAttr Constant HiLink cssAttr Constant
HiLink cssUnitDecorators Number HiLink cssUnitDecorators Number
HiLink cssNoise Noise HiLink cssNoise Noise
HiLink atKeyword PreProc HiLink atKeyword PreProc
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "css" let b:current_syntax = "css"

View File

@ -4,11 +4,8 @@
" Last Change: 2002 Apr 13 " Last Change: 2002 Apr 13
" Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14 " Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -142,48 +139,40 @@ syn match ctermCharacter "'[^\\]'"
syn match ctermSpecialCharacter "'\\.'" syn match ctermSpecialCharacter "'\\.'"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 ctermStatement Statement
HiLink ctermFunction Statement HiLink ctermFunction Statement
HiLink ctermStrFunction Statement HiLink ctermStrFunction Statement
HiLink ctermIntFunction Statement HiLink ctermIntFunction Statement
HiLink ctermLabel Statement HiLink ctermLabel Statement
HiLink ctermConditional Statement HiLink ctermConditional Statement
HiLink ctermRepeat Statement HiLink ctermRepeat Statement
HiLink ctermLibFunc UserDefFunc HiLink ctermLibFunc UserDefFunc
HiLink ctermType Type HiLink ctermType Type
HiLink ctermFuncArg PreCondit HiLink ctermFuncArg PreCondit
HiLink ctermPreVarRO PreCondit HiLink ctermPreVarRO PreCondit
HiLink ctermPreVarRW PreConditBold HiLink ctermPreVarRW PreConditBold
HiLink ctermVar Type HiLink ctermVar Type
HiLink ctermComment Comment HiLink ctermComment Comment
HiLink ctermCharacter SpecialChar HiLink ctermCharacter SpecialChar
HiLink ctermSpecial Special HiLink ctermSpecial Special
HiLink ctermSpecialCharacter SpecialChar HiLink ctermSpecialCharacter SpecialChar
HiLink ctermSymbols Special HiLink ctermSymbols Special
HiLink ctermString String HiLink ctermString String
HiLink ctermTodo Todo HiLink ctermTodo Todo
HiLink ctermOperator Statement HiLink ctermOperator Statement
HiLink ctermNumber Number HiLink ctermNumber Number
" redefine the colors " redefine the colors
"hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold "hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold
"hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline "hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cterm" let b:current_syntax = "cterm"

View File

@ -3,20 +3,13 @@
" Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net> " Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net>
" Last Change: 2007 Oct 13 " Last Change: 2007 Oct 13
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the C syntax to start with " Read the C syntax to start with
if version < 600 runtime! syntax/c.vim
source <sfile>:p:h/c.vim
else
runtime! syntax/c.vim
endif
" CUDA extentions " CUDA extentions
syn keyword cudaStorageClass __device__ __global__ __host__ syn keyword cudaStorageClass __device__ __global__ __host__

View File

@ -3,11 +3,8 @@
" Maintainer: John Cook <johncook3@gmail.com> " Maintainer: John Cook <johncook3@gmail.com>
" Last Change: 2011 Dec 27 " Last Change: 2011 Dec 27
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -95,39 +92,31 @@ syn region cuplComment start=+/\*+ end=+\*/+ contains=cuplNumber,cuplTodo
syn sync minlines=1 syn sync minlines=1
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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. " The default highlighting.
HiLink cuplHeader cuplStatement HiLink cuplHeader cuplStatement
HiLink cuplLogicalOperator cuplOperator HiLink cuplLogicalOperator cuplOperator
HiLink cuplRangeOperator cuplOperator HiLink cuplRangeOperator cuplOperator
HiLink cuplArithmeticOperator cuplOperator HiLink cuplArithmeticOperator cuplOperator
HiLink cuplAssignmentOperator cuplOperator HiLink cuplAssignmentOperator cuplOperator
HiLink cuplEqualityOperator cuplOperator HiLink cuplEqualityOperator cuplOperator
HiLink cuplTruthTableOperator cuplOperator HiLink cuplTruthTableOperator cuplOperator
HiLink cuplOperator cuplStatement HiLink cuplOperator cuplStatement
HiLink cuplFunction cuplStatement HiLink cuplFunction cuplStatement
HiLink cuplStatement Statement HiLink cuplStatement Statement
HiLink cuplNumberRange cuplNumber HiLink cuplNumberRange cuplNumber
HiLink cuplNumber cuplString HiLink cuplNumber cuplString
HiLink cuplString String HiLink cuplString String
HiLink cuplComment Comment HiLink cuplComment Comment
HiLink cuplExtension cuplSpecial HiLink cuplExtension cuplSpecial
HiLink cuplSpecialChar cuplSpecial HiLink cuplSpecialChar cuplSpecial
HiLink cuplSpecial Special HiLink cuplSpecial Special
HiLink cuplDirective PreProc HiLink cuplDirective PreProc
HiLink cuplTodo Todo HiLink cuplTodo Todo
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cupl" let b:current_syntax = "cupl"

View File

@ -3,21 +3,14 @@
" Maintainer: John Cook <john.cook@kla-tencor.com> " Maintainer: John Cook <john.cook@kla-tencor.com>
" Last Change: 2001 Apr 25 " Last Change: 2001 Apr 25
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the CUPL syntax to start with " Read the CUPL syntax to start with
if version < 600 runtime! syntax/cupl.vim
source <sfile>:p:h/cupl.vim unlet b:current_syntax
else
runtime! syntax/cupl.vim
unlet b:current_syntax
endif
" omit definition-specific stuff " omit definition-specific stuff
syn clear cuplStatement syn clear cuplStatement
@ -53,28 +46,20 @@ syn match cuplsimOutput +"\x\+"+
syn sync minlines=1 syn sync minlines=1
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
" append to the highlighting links in cupl.vim " append to the highlighting links in cupl.vim
" The default highlighting. " The default highlighting.
HiLink cuplsimOrder cuplStatement HiLink cuplsimOrder cuplStatement
HiLink cuplsimBase cuplStatement HiLink cuplsimBase cuplStatement
HiLink cuplsimBaseType cuplStatement HiLink cuplsimBaseType cuplStatement
HiLink cuplsimVectors cuplStatement HiLink cuplsimVectors cuplStatement
HiLink cuplsimStimulus cuplNumber HiLink cuplsimStimulus cuplNumber
HiLink cuplsimOutput cuplNumber HiLink cuplsimOutput cuplNumber
HiLink cuplsimOrderFormat cuplNumber HiLink cuplsimOrderFormat cuplNumber
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cuplsim" let b:current_syntax = "cuplsim"
" vim:ts=8 " vim:ts=8

View File

@ -4,11 +4,8 @@
" URL: http://www.zotikos.com/downloads/cvs.vim " URL: http://www.zotikos.com/downloads/cvs.vim
" Last Change: Sat Nov 24 23:25:11 CET 2001 " Last Change: Sat Nov 24 23:25:11 CET 2001
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -20,24 +17,16 @@ syn region cvsCom start="Committing in" end="$" contains=cvsDir contained extend
syn match cvsDir contained "\S\+$" syn match cvsDir contained "\S\+$"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink cvsLine Comment HiLink cvsLine Comment
HiLink cvsDir cvsFile HiLink cvsDir cvsFile
HiLink cvsFile Constant HiLink cvsFile Constant
HiLink cvsFiles cvsCom HiLink cvsFiles cvsCom
HiLink cvsTag cvsCom HiLink cvsTag cvsCom
HiLink cvsCom Statement HiLink cvsCom Statement
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cvs" let b:current_syntax = "cvs"

View File

@ -13,11 +13,8 @@
" TODO: names, and leaves C/C++ comments as such. (On the other hand, " 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.) " TODO: switching to TeX mode in C/C++ comments might be colour overkill.)
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -25,12 +22,8 @@ endif
" level in the CWEB syntax, e.g., in the preamble. In general, a CWEB source " 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 " code can be seen as a normal TeX document with some C/C++ material
" interspersed in certain defined regions. " interspersed in certain defined regions.
if version < 600 runtime! syntax/tex.vim
source <sfile>:p:h/tex.vim unlet b:current_syntax
else
runtime! syntax/tex.vim
unlet b:current_syntax
endif
" Read the C/C++ syntax too; C/C++ syntax items are treated as such in the " 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. " 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 "@@" syntax match webIgnoredStuff "@@"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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 HiLink webRestrictedTeX String
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cweb" let b:current_syntax = "cweb"

View File

@ -15,22 +15,15 @@
" Remove any old syntax stuff hanging around " Remove any old syntax stuff hanging around
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the C++ syntax to start with - this includes the C syntax " Read the C++ syntax to start with - this includes the C syntax
if version < 600 runtime! syntax/cpp.vim
source <sfile>:p:h/cpp.vim
else
runtime! syntax/cpp.vim
endif
unlet b:current_syntax unlet b:current_syntax
" Cynlib extensions " Cynlib extensions
@ -69,23 +62,15 @@ syn match cynlibOperator "<<="
syn keyword cynlibType In Out InST OutST Int Uint Const Cynclock syn keyword cynlibType In Out InST OutST Int Uint Const Cynclock
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink cynlibOperator Operator HiLink cynlibOperator Operator
HiLink cynlibMacro Statement HiLink cynlibMacro Statement
HiLink cynlibFunction Statement HiLink cynlibFunction Statement
HiLink cynlibppMacro Statement HiLink cynlibppMacro Statement
HiLink cynlibType Type HiLink cynlibType Type
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cynlib" let b:current_syntax = "cynlib"

View File

@ -19,21 +19,13 @@
" Remove any old syntax stuff hanging around " quit when a syntax file was already loaded
" For version 5.x: Clear all syntax items if exists("b:current_syntax")
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
" Read the Cynlib syntax to start with - this includes the C++ syntax " Read the Cynlib syntax to start with - this includes the C++ syntax
if version < 600 runtime! syntax/cynlib.vim
source <sfile>:p:h/cynlib.vim
else
runtime! syntax/cynlib.vim
endif
unlet b:current_syntax unlet b:current_syntax
@ -49,20 +41,12 @@ syn keyword cynppMacro Thread EndThread
syn keyword cynppMacro Instantiate syn keyword cynppMacro Instantiate
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink cLabel Label HiLink cLabel Label
HiLink cynppMacro Statement HiLink cynppMacro Statement
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "cynpp" let b:current_syntax = "cynpp"

View File

@ -8,9 +8,8 @@
" "
" http://dstools.sourceforge.net/DataScriptLanguageOverview.html " http://dstools.sourceforge.net/DataScriptLanguageOverview.html
if version < 600 " quit when a syntax file was already loaded
syntax clear if exists("b:current_syntax")
elseif exists("b:current_syntax")
finish finish
endif endif
let s:keepcpo= &cpo let s:keepcpo= &cpo

View File

@ -3,11 +3,8 @@
" Maintainer: Christopher Shinn <christopher@lucent.com> " Maintainer: Christopher Shinn <christopher@lucent.com>
" Last Change: 2003 Apr 25 " Last Change: 2003 Apr 25
" For version 5.x: Clear all syntax items " quit when a syntax file was already loaded
" For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -40,25 +37,17 @@ syn keyword dcdSpecial PRV1 PRV2 PRV3 PRV4 PRV5 PRV6 PRV7 PRV8
syn region dcdComment start="\*" end="\;" syn region dcdComment start="\*" end="\;"
" Define the default highlighting. " Define the default highlighting.
" For version 5.7 and earlier: only when not done already " Only when an item doesn't have highlighting yet
" For version 5.8 and later: only when an item doesn't have highlighting yet command -nargs=+ HiLink hi def link <args>
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
HiLink dcdFunction Identifier HiLink dcdFunction Identifier
HiLink dcdLabel Constant HiLink dcdLabel Constant
HiLink dcdConditional Conditional HiLink dcdConditional Conditional
HiLink dcdDisplay Type HiLink dcdDisplay Type
HiLink dcdStatement Statement HiLink dcdStatement Statement
HiLink dcdSpecial Special HiLink dcdSpecial Special
HiLink dcdComment Comment HiLink dcdComment Comment
delcommand HiLink delcommand HiLink
endif
let b:current_syntax = "dcd" let b:current_syntax = "dcd"

Some files were not shown because too many files have changed in this diff Show More