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

View File

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

View File

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

View File

@ -27,7 +27,11 @@ CompilerSet errorformat=
\%\\s%#[%f:%l:\ %#%m,
\%\\s%#%f:%l:\ %#%m,
\%\\s%#%f:%l:,
\%m\ [%f:%l]:
\%m\ [%f:%l]:,
\%+Erake\ aborted!,
\%+EDon't\ know\ how\ to\ build\ task\ %.%#,
\%+Einvalid\ option:%.%#,
\%+Irake\ %\\S%\\+%\\s%\\+#\ %.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

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

View File

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

View File

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

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.
set display=truncate
" Show a few lines of context around the cursor.
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching when it's possible to timeout.

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
@ -643,13 +643,17 @@ It's possible to form a variable name with curly braces, see
Expression syntax summary, from least to most significant:
|expr1| expr2 ? expr1 : expr1 if-then-else
|expr1| expr2
expr2 ? expr1 : expr1 if-then-else
|expr2| expr3 || expr3 .. logical OR
|expr2| expr3
expr3 || expr3 .. logical OR
|expr3| expr4 && expr4 .. logical AND
|expr3| expr4
expr4 && expr4 .. logical AND
|expr4| expr5 == expr5 equal
|expr4| expr5
expr5 == expr5 equal
expr5 != expr5 not equal
expr5 > expr5 greater than
expr5 >= expr5 greater than or equal
@ -666,19 +670,23 @@ Expression syntax summary, from least to most significant:
expr5 is expr5 same |List| instance
expr5 isnot expr5 different |List| instance
|expr5| expr6 + expr6 .. number addition or list concatenation
|expr5| expr6
expr6 + expr6 .. number addition or list concatenation
expr6 - expr6 .. number subtraction
expr6 . expr6 .. string concatenation
|expr6| expr7 * expr7 .. number multiplication
|expr6| expr7
expr7 * expr7 .. number multiplication
expr7 / expr7 .. number division
expr7 % expr7 .. number modulo
|expr7| ! expr7 logical NOT
|expr7| expr8
! expr7 logical NOT
- expr7 unary minus
+ expr7 unary plus
|expr8| expr8[expr1] byte of a String or item of a |List|
|expr8| expr9
expr8[expr1] byte of a String or item of a |List|
expr8[expr1 : expr1] substring of a String or sublist of a |List|
expr8.name entry in a |Dictionary|
expr8(expr1, ...) function call with |Funcref| variable

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
@ -144,29 +144,8 @@ the console.
5. Running under Windows 3.1 *win32-win3.1*
*win32s* *windows-3.1*
There is a special version of Gvim that runs under Windows 3.1 and 3.11. You
need the gvim.exe that was compiled with Visual C++ 4.1.
To run the Win32 version under Windows 3.1, you need to install Win32s. You
might have it already from another Win32 application which you have installed.
If Vim doesn't seem to be running properly, get the latest version: 1.30c.
You can find it at:
http://support.microsoft.com/download/support/mslfiles/pw1118.exe
(Microsoft moved it again, we don't know where it is now :-( ).
The reason for having two versions of gvim.exe is that the Win32s version was
compiled with VC++ 4.1. This is the last version of VC++ that supports Win32s
programs. VC++ 5.0 is better, so that one was used for the Win32 version.
Apart from that, there is no difference between the programs. If you are in a
mixed environment, you can use the gvim.exe for Win32s on both.
The Win32s version works the same way as the Win32 version under 95/NT. When
running under Win32s the following differences apply:
- You cannot use long file names, because Windows 3.1 doesn't support them!
- When executing an external command, it doesn't return an exit code. After
doing ":make" you have to do ":cn" yourself.
There was a special version of Gvim that runs under Windows 3.1 and 3.11.
Support was removed in patch 7.4.1363.
==============================================================================
6. Win32 mini FAQ *win32-faq*

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
@ -37,6 +37,25 @@ not be repeated below, unless there is extra information.
Make ":filter" work with more commands.
Search for: msg_putchar('\n')
Try building with $SHADOWDIR
Test_sign_completion() fails on MS-Windows (console and GUI) Completion
doesn't have both tb_paste.xpm and tb_print.xpm but "tb_p". Different default
options?
Test_nb_basic() fails on MS-Windows GUI. line 12: Expected 2 but got 1.
line 13: Expected 20 but got 1.
Figure out building with Ruby on MS-Windows.
:cexpr doesn't trigger QuickFixCmdPost. (Mathias Stearn, 2016 Aug 29, #1021)
Needs documentation. (Yegappan)
Patch to convert test_marks to new style. (Yegappan, 2016 Aug 28, 2 msg)
Patch to make it possible to define a test but skip it, by throwing an
exception. (Christian Brabandt, 2016 Aug 30)
+channel:
- Implement |job-term| ?
- Channel test fails with Motif. Sometimes kills the X11 server.
@ -186,6 +205,9 @@ Ramel Eshed: system() is much slower than job_start(), why? (Aug 26)
Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
What does it change?
Patch to make gd and gD work better for non-K&R code and with comments.
(Anton Lindqvist, 2016 Aug 29)
When generating the Unicode tables with runtime/tools/unicode.vim the
emoji_width table has only one entry.

View File

@ -211,7 +211,7 @@ Ex commands: ~
|:cfdo| execute command in each file in error list
|:chistory| display quickfix list stack
|:clearjumps| clear the jump list
:filter only output lines that (do not) match a pattern
|:filter| only output lines that (do not) match a pattern
|:helpclose| close one help window
|:lbottom| scroll to the bottom of the location window
|:ldo| execute command in valid location list entries
@ -12742,8 +12742,8 @@ Files: src/fileio.c, src/window.c, src/vim.h,
src/testdir/test_autocmd.vim, runtime/doc/autocmd.txt
Patch 7.4.2078
Problem: Running checks in po diretory fails.
Solution: Add colors used in syntax.c to the builtiin color table.
Problem: Running checks in po directory fails.
Solution: Add colors used in syntax.c to the builtin color table.
Files: src/term.c
Patch 7.4.2079

View File

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

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 b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$')
endif
if b:eruby_subtype == 'rhtml'
let b:eruby_subtype = 'html'

View File

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

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30
" Last Change: 2016 Aug 29
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@ -11,15 +11,10 @@ endif
runtime! ftplugin/git.vim
let b:did_ftplugin = 1
setlocal nomodeline tabstop=8 formatoptions-=croq formatoptions+=tl
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions<'
if &textwidth == 0
" make sure that log messages play nice with git-log on standard terminals
setlocal textwidth=72
let b:undo_ftplugin .= "|setl tw<"
endif
setlocal comments=:# commentstring=#\ %s
setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<'
if exists("g:no_gitcommit_commands") || v:version < 700
finish
@ -31,6 +26,8 @@ endif
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
let b:undo_ftplugin = b:undo_ftplugin . "|delc DiffGitCached"
function! s:diffcomplete(A,L,P)
let args = ""
if a:P <= match(a:L." -- "," -- ")+3

View File

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

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 Jun 01
" Last Change: 2016 Aug 29
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Markdown
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30
" Last Change: 2016 Aug 29
if exists("b:did_ftplugin")
finish
@ -11,7 +11,7 @@ runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
@ -19,4 +19,32 @@ else
let b:undo_ftplugin = "setl cms< com< fo< flp<"
endif
function! MarkdownFold()
let line = getline(v:lnum)
" Regular headers
let depth = match(line, '\(^#\+\)\@<=\( .*$\)\@=')
if depth > 0
return ">" . depth
endif
" Setext style headings
let nextline = getline(v:lnum + 1)
if (line =~ '^.\+$') && (nextline =~ '^=\+$')
return ">1"
endif
if (line =~ '^.\+$') && (nextline =~ '^-\+$')
return ">2"
endif
return "="
endfunction
if has("folding") && exists("g:markdown_folding")
setlocal foldexpr=MarkdownFold()
setlocal foldmethod=expr
let b:undo_ftplugin .= " foldexpr< foldmethod<"
endif
" vim:set sw=2:

View File

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

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 Jul 26
" Last Change: 2016 Aug 29
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -9,8 +9,9 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<"
let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<"
setlocal comments=://
setlocal commentstring=//\ %s
setlocal define=^\\s*\\%(@mixin\\\|=\\)
setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','')

View File

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

View File

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

View File

@ -19,6 +19,9 @@ else
endif
unlet! b:did_indent
" Force HTML indent to not keep state.
let b:html_indent_usestate = 0
if &l:indentexpr == ''
if &l:cindent
let &l:indentexpr = 'cindent(v:lnum)'
@ -38,7 +41,18 @@ if exists("*GetErubyIndent")
finish
endif
" this file uses line continuations
let s:cpo_sav = &cpo
set cpo&vim
function! GetErubyIndent(...)
" The value of a single shift-width
if exists('*shiftwidth')
let sw = shiftwidth()
else
let sw = &sw
endif
if a:0 && a:1 == '.'
let v:lnum = line('.')
elseif a:0 && a:1 =~ '^\d'
@ -52,31 +66,44 @@ function! GetErubyIndent(...)
let ind = GetRubyIndent(v:lnum)
else
exe "let ind = ".b:eruby_subtype_indentexpr
" Workaround for Andy Wokula's HTML indent. This should be removed after
" some time, since the newest version is fixed in a different way.
if b:eruby_subtype_indentexpr =~# '^HtmlIndent('
\ && exists('b:indent')
\ && type(b:indent) == type({})
\ && has_key(b:indent, 'lnum')
" Force HTML indent to not keep state
let b:indent.lnum = -1
endif
endif
let lnum = prevnonblank(v:lnum-1)
let line = getline(lnum)
let cline = getline(v:lnum)
if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
let ind = ind - sw
endif
if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
let ind = ind - sw
endif
if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*[-=]\=%>'
let ind = ind + &sw
let ind = ind + sw
elseif line =~# '<%[-=]\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>'
let ind = ind + &sw
let ind = ind + sw
endif
if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>'
let ind = ind + &sw
let ind = ind + sw
endif
if line !~# '^\s*<%' && line =~# '%>\s*$'
let ind = ind - &sw
if line !~# '^\s*<%' && line =~# '%>\s*$' && line !~# '^\s*end\>'
let ind = ind - sw
endif
if cline =~# '^\s*[-=]\=%>\s*$'
let ind = ind - &sw
let ind = ind - sw
endif
return ind
endfunction
let &cpo = s:cpo_sav
unlet! s:cpo_sav
" vim:set sw=2 sts=2 ts=8 noet:

View File

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

View File

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

View File

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

View File

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

View File

@ -13,12 +13,23 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
if !exists('g:ruby_indent_access_modifier_style')
" Possible values: "normal", "indent", "outdent"
let g:ruby_indent_access_modifier_style = 'normal'
endif
if !exists('g:ruby_indent_block_style')
" Possible values: "expression", "do"
let g:ruby_indent_block_style = 'expression'
endif
setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetRubyIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,.
setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end
setlocal indentkeys+==private,=protected,=public
" Only define the function once.
if exists("*GetRubyIndent")
@ -34,7 +45,7 @@ set cpo&vim
" Regex of syntax group names that are or delimit strings/symbols or are comments.
let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' .
\ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' .
\ '\|Interpolation\|NoInterpolation\|Comment\|Documentation\)\>'
\ '\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings.
let s:syng_string =
@ -49,9 +60,10 @@ let s:skip_expr =
\ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"
" Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' .
\ '\|rescue\):\@!\>' .
let s:ruby_indent_keywords =
\ '^\s*\zs\<\%(module\|class\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' .
\ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' .
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
@ -64,7 +76,8 @@ let s:ruby_deindent_keywords =
" TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex =
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
\ '\<\%(module\|class\|if\|for\|while\|until\|case\|unless\|begin' .
\ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' .
\ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
" Regex that defines the middle-match for the 'end' keyword.
@ -82,16 +95,35 @@ let s:end_skip_expr = s:skip_expr .
let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:continuation_regex =
\ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines continuable keywords
let s:continuable_regex =
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|unless\):\@!\>'
" Regex that defines bracket continuations
let s:bracket_continuation_regex = '%\@<!\%([({[]\)\s*\%(#.*\)\=$'
" Regex that defines dot continuations
let s:dot_continuation_regex = '%\@<!\.\s*\%(#.*\)\=$'
" Regex that defines backslash continuations
let s:backslash_continuation_regex = '%\@<!\\\s*$'
" Regex that defines end of bracket continuation followed by another continuation
let s:bracket_switch_continuation_regex = '^\([^(]\+\zs).\+\)\+'.s:continuation_regex
" Regex that defines the first part of a splat pattern
let s:splat_regex = '[[,(]\s*\*\s*\%(#.*\)\=$'
" Regex that describes all indent access modifiers
let s:access_modifier_regex = '\C^\s*\%(public\|protected\|private\)\s*\%(#.*\)\=$'
" Regex that describes the indent access modifiers (excludes public)
let s:indent_access_modifier_regex = '\C^\s*\%(protected\|private\)\s*\%(#.*\)\=$'
" Regex that defines blocks.
"
" Note that there's a slight problem with this regex and s:continuation_regex.
@ -102,10 +134,13 @@ let s:splat_regex = '[[,(]\s*\*\s*\%(#.*\)\=$'
" The reason is that the pipe matches a hanging "|" operator.
"
let s:block_regex =
\ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|\s*(*\s*\%([*@&]\=\h\w*,\=\s*\)\%(,\s*(*\s*[*@&]\=\h\w*\s*)*\s*\)*|\)\=\s*\%(#.*\)\=$'
\ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|[^|]*|\)\=\s*\%(#.*\)\=$'
let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex
" Regex that describes a leading operator (only a method call's dot for now)
let s:leading_operator_regex = '^\s*[.]'
" 2. Auxiliary Functions {{{1
" ======================
@ -165,7 +200,21 @@ function s:GetMSL(lnum)
" Otherwise, terminate search as we have found our MSL already.
let line = getline(lnum)
if s:Match(lnum, s:splat_regex)
if !s:Match(msl, s:backslash_continuation_regex) &&
\ s:Match(lnum, s:backslash_continuation_regex)
" If the current line doesn't end in a backslash, but the previous one
" does, look for that line's msl
"
" Example:
" foo = "bar" \
" "baz"
"
let msl = lnum
elseif s:Match(msl, s:leading_operator_regex)
" If the current line starts with a leading operator, keep its indent
" and keep looking for an MSL.
let msl = lnum
elseif s:Match(lnum, s:splat_regex)
" If the above line looks like the "*" of a splat, use the current one's
" indentation.
"
@ -175,7 +224,7 @@ function s:GetMSL(lnum)
" something
"
return msl
elseif s:Match(line, s:non_bracket_continuation_regex) &&
elseif s:Match(lnum, s:non_bracket_continuation_regex) &&
\ s:Match(msl, s:non_bracket_continuation_regex)
" If the current line is a non-bracket continuation and so is the
" previous one, keep its indent and continue looking for an MSL.
@ -186,6 +235,18 @@ function s:GetMSL(lnum)
" three
"
let msl = lnum
elseif s:Match(lnum, s:dot_continuation_regex) &&
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
" If the current line is a bracket continuation or a block-starter, but
" the previous is a dot, keep going to see if the previous line is the
" start of another continuation.
"
" Example:
" parent.
" method_call {
" three
"
let msl = lnum
elseif s:Match(lnum, s:non_bracket_continuation_regex) &&
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
" If the current line is a bracket continuation or a block-starter, but
@ -299,18 +360,39 @@ function s:ExtraBrackets(lnum)
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), '\C'.a:regex) + 1
return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0
let line = getline(a:lnum)
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
function s:MatchLast(lnum, regex)
let line = getline(a:lnum)
let col = match(line, '.*\zs' . a:regex)
while col != -1 && s:IsInStringOrComment(a:lnum, col)
let line = strpart(line, 0, col)
let col = match(line, '.*' . a:regex)
endwhile
return col + 1
" Locates the containing class/module's definition line, ignoring nested classes
" along the way.
"
function! s:FindContainingClass()
let saved_position = getpos('.')
while searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
if expand('<cword>') =~# '\<class\|module\>'
let found_lnum = line('.')
call setpos('.', saved_position)
return found_lnum
endif
endif
call setpos('.', saved_position)
return 0
endfunction
" 3. GetRubyIndent Function {{{1
@ -320,6 +402,13 @@ function GetRubyIndent(...)
" 3.1. Setup {{{2
" ----------
" The value of a single shift-width
if exists('*shiftwidth')
let sw = shiftwidth()
else
let sw = &sw
endif
" For the current line, use the first argument if given, else v:lnum
let clnum = a:0 ? a:1 : v:lnum
@ -333,6 +422,24 @@ function GetRubyIndent(...)
let line = getline(clnum)
let ind = -1
" If this line is an access modifier keyword, align according to the closest
" class declaration.
if g:ruby_indent_access_modifier_style == 'indent'
if s:Match(clnum, s:access_modifier_regex)
let class_line = s:FindContainingClass()
if class_line > 0
return indent(class_line) + sw
endif
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
if s:Match(clnum, s:access_modifier_regex)
let class_line = s:FindContainingClass()
if class_line > 0
return indent(class_line)
endif
endif
endif
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
@ -343,7 +450,9 @@ function GetRubyIndent(...)
if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
if line[col-1]==')' && col('.') != col('$') - 1
let ind = virtcol('.') - 1
else
elseif g:ruby_indent_block_style == 'do'
let ind = indent(line('.'))
else " g:ruby_indent_block_style == 'expression'
let ind = indent(s:GetMSL(line('.')))
endif
endif
@ -366,10 +475,17 @@ function GetRubyIndent(...)
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
" assignment to case/begin/etc, on the same line, hanging indent
let ind = virtcol('.') - 1
elseif g:ruby_indent_block_style == 'do'
" align to line of the "do", not to the MSL
let ind = indent(line('.'))
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the MSL, align to the starting line,
" not to the MSL
let ind = indent(line('.'))
else
" align to the MSL
let ind = indent(msl)
endif
endif
@ -389,6 +505,11 @@ function GetRubyIndent(...)
return 0
endif
" If the current line starts with a leading operator, add a level of indent.
if s:Match(clnum, s:leading_operator_regex)
return indent(s:GetMSL(clnum)) + sw
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
@ -409,14 +530,50 @@ function GetRubyIndent(...)
let line = getline(lnum)
let ind = indent(lnum)
if g:ruby_indent_access_modifier_style == 'indent'
" If the previous line was a private/protected keyword, add a
" level of indent.
if s:Match(lnum, s:indent_access_modifier_regex)
return indent(lnum) + sw
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
" If the previous line was a private/protected/public keyword, add
" a level of indent, since the keyword has been out-dented.
if s:Match(lnum, s:access_modifier_regex)
return indent(lnum) + sw
endif
endif
if s:Match(lnum, s:continuable_regex) && s:Match(lnum, s:continuation_regex)
return indent(s:GetMSL(lnum)) + sw + sw
endif
" If the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex)
return indent(s:GetMSL(lnum)) + &sw
let msl = s:GetMSL(lnum)
if g:ruby_indent_block_style == 'do'
" don't align to the msl, align to the "do"
let ind = indent(lnum) + sw
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the msl, align to the starting line,
" not to the msl
let ind = indent(lnum) + sw
else
let ind = indent(msl) + sw
endif
return ind
endif
" If the previous line started with a leading operator, use its MSL's level
" of indent
if s:Match(lnum, s:leading_operator_regex)
return indent(s:GetMSL(lnum))
endif
" If the previous line ended with the "*" of a splat, add a level of indent
if line =~ s:splat_regex
return indent(lnum) + &sw
return indent(lnum) + sw
endif
" If the previous line contained unclosed opening brackets and we are still
@ -431,22 +588,22 @@ function GetRubyIndent(...)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + &sw
return ind + sw
else
return virtcol('.')
endif
else
let nonspace = matchend(line, '\S', opening.pos + 1) - 1
return nonspace > 0 ? nonspace : ind + &sw
return nonspace > 0 ? nonspace : ind + sw
endif
elseif closing.pos != -1
call cursor(lnum, closing.pos + 1)
normal! %
if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + &sw
return indent('.') + sw
else
return indent('.')
return indent(s:GetMSL(line('.')))
endif
else
call cursor(clnum, vcol)
@ -473,7 +630,7 @@ function GetRubyIndent(...)
let col = s:Match(lnum, s:ruby_indent_keywords)
if col > 0
call cursor(lnum, col)
let ind = virtcol('.') - 1 + &sw
let ind = virtcol('.') - 1 + sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
@ -490,10 +647,14 @@ function GetRubyIndent(...)
let p_lnum = lnum
let lnum = s:GetMSL(lnum)
" If the previous line wasn't a MSL and is continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
" If the previous line wasn't a MSL.
if p_lnum != lnum
if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line))
" If previous line ends bracket and begins non-bracket continuation decrease indent by 1.
if s:Match(p_lnum, s:bracket_switch_continuation_regex)
return ind - 1
" If previous line is a continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
elseif s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line))
return ind
endif
endif
@ -506,9 +667,9 @@ function GetRubyIndent(...)
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
if s:Match(lnum, s:ruby_indent_keywords)
let ind = msl_ind + &sw
let ind = msl_ind + sw
if s:Match(lnum, s:end_end_regex)
let ind = ind - &sw
let ind = ind - sw
endif
return ind
endif
@ -517,7 +678,7 @@ function GetRubyIndent(...)
" closing bracket, indent one extra level.
if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)')
if lnum == p_lnum
let ind = msl_ind + &sw
let ind = msl_ind + sw
else
let ind = msl_ind
endif

View File

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

View File

@ -3,11 +3,8 @@
" Maintainer: Clemens Kirchgatterer <clemens@1541.org>
" Last Change: 2014 Jan 05
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -138,15 +135,8 @@ syn match a65End excludenl /end$/ contained
syn match a65Continue "\\$" contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_a65_syntax_inits")
if version < 508
let did_a65_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink a65Section Special
HiLink a65Address Special
@ -161,6 +151,5 @@ if version >= 508 || !exists("did_a65_syntax_inits")
HiLink a65HiLo Number
delcommand HiLink
endif
let b:current_syntax = "a65"

View File

@ -5,11 +5,8 @@
" Last Change: 2013 Jun 13
" Comment: Thanks to EPI-USE Labs for all your assistance. :)
" For version < 6.0: Clear all syntax items
" For version >= 6.0: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -43,11 +40,7 @@ syn match abapStringEscape contained "``"
syn match abapNumber "\-\=\<\d\+\>"
syn region abapHex matchgroup=abapHex start="X'" end="'"
if version >= 600
setlocal iskeyword=48-57,_,A-Z,a-z,/
else
set iskeyword=48-57,_,A-Z,a-z,/
endif
syn match abapNamespace "\</\w\+/"
@ -175,15 +168,8 @@ syn keyword abapTodo contained TODO NOTE
syn match abapTodo "\#EC\W\+\w\+"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_abap_syntax_inits")
if version < 508
let did_abap_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink abapError Error
HiLink abapComment Comment
@ -206,7 +192,6 @@ if version >= 508 || !exists("did_abap_syntax_inits")
HiLink abapHex Number
delcommand HiLink
endif
let b:current_syntax = "abap"

View File

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

View File

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

View File

@ -3,11 +3,8 @@
" Maintainer: John Cook <johncook3@gmail.com>
" Last Change: 2011 Dec 27
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -123,15 +120,8 @@ endif
syn sync minlines=1
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_abel_syn_inits")
if version < 508
let did_abel_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
" The default highlighting.
HiLink abelHeader abelStatement
@ -164,7 +154,6 @@ if version >= 508 || !exists("did_abel_syn_inits")
HiLink abelError Error
delcommand HiLink
endif
let b:current_syntax = "abel"

View File

@ -7,11 +7,8 @@
" Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm
" AceDB software is available from http://www.acedb.org
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -86,15 +83,8 @@ syn region acedbString start=/"/ end=/"/ skip=/\\"/ oneline
" Rest of syntax highlighting rules start here
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_acedb_syn_inits")
if version < 508
let did_acedb_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink acedbMagic Special
HiLink acedbHyb Special
@ -114,7 +104,6 @@ if version >= 508 || !exists("did_acedb_syn_inits")
HiLink acedbString String
delcommand HiLink
endif
let b:current_syntax = "acedb"

View File

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

View File

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

View File

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

View File

@ -9,11 +9,8 @@
" of [], in order to avoid -read highlighted,
" or [quote] strings highlighted
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -123,15 +120,8 @@ syn region amlSkip matchgroup=amlOutput start="&typ" end="$" contains=amlVar
syn region amlSkip matchgroup=amlOutput start="&type" end="$" contains=amlVar
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_aml_syntax_inits")
if version < 508
let did_aml_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink amlComment Comment
HiLink amlNumber Number
@ -152,6 +142,5 @@ if version >= 508 || !exists("did_aml_syntax_inits")
HiLink amlTab amlArcCmd
delcommand HiLink
endif
let b:current_syntax = "aml"

View File

@ -3,9 +3,8 @@
" Last Change: 2003 May 11
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -115,13 +114,7 @@ syn keyword amplTodo contained TODO FIXME XXX
if version >= 508 || !exists("did_ampl_syntax_inits")
if version < 508
let did_ampl_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later.
HiLink amplEntityKeyword Keyword
@ -141,7 +134,6 @@ if version >= 508 || !exists("did_ampl_syntax_inits")
HiLink amplPiecewise Special
delcommand HiLink
endif
let b:current_syntax = "ampl"

View File

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

View File

@ -9,14 +9,10 @@
" make it really linewise?
" + add `display' where appropriate
" Setup
if version >= 600
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
else
syntax clear
endif
syn case ignore
@ -178,13 +174,7 @@ syn match apacheSection "<\/\=\(<IfVersion\)[^>]*>" contains=apacheAnything
syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP
" Define the default highlighting
if version >= 508 || !exists("did_apache_syntax_inits")
if version < 508
let did_apache_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink apacheAllowOverride apacheDeclaration
HiLink apacheAllowOverrideValue apacheOption
@ -209,6 +199,5 @@ if version >= 508 || !exists("did_apache_syntax_inits")
HiLink apacheUserID Number
delcommand HiLink
endif
let b:current_syntax = "apache"

View File

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

View File

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

View File

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

View File

@ -7,11 +7,8 @@
" Thanks to Ori Avtalion for feedback on the comment markers!
" For version 5.x: Clear all syntax items
" For version 6.0 and later: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -103,15 +100,8 @@ syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*"
syn case match
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_asm_syntax_inits")
if version < 508
let did_asm_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later
HiLink asmSection Special
@ -133,7 +123,6 @@ if version >= 508 || !exists("did_asm_syntax_inits")
HiLink asmType Type
delcommand HiLink
endif
let b:current_syntax = "asm"

View File

@ -8,11 +8,8 @@
" Feel free to contribute...
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -328,15 +325,8 @@ syn match asm68kDirective "\<XREF\(\.S\)\=\s"
syn case match
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_asm68k_syntax_inits")
if version < 508
let did_asm68k_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later
" Comment Constant Error Identifier PreProc Special Statement Todo Type
@ -384,7 +374,6 @@ if version >= 508 || !exists("did_asm68k_syntax_inits")
HiLink asm68kLabel Type
delcommand HiLink
endif
let b:current_syntax = "asm68k"

View File

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

View File

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

View File

@ -4,11 +4,8 @@
" URL: http://nim.dhs.org/~edh/aspperl.vim
" Last Change: 2001 May 09
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -16,14 +13,9 @@ if !exists("main_syntax")
let main_syntax = 'perlscript'
endif
if version < 600
so <sfile>:p:h/html.vim
syn include @AspPerlScript <sfile>:p:h/perl.vim
else
runtime! syntax/html.vim
unlet b:current_syntax
syn include @AspPerlScript syntax/perl.vim
endif
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
" VBScripts which I've been too scared to do.
" Quit when a syntax file was already loaded
if version < 600
syn clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -22,11 +20,7 @@ if !exists("main_syntax")
let main_syntax = 'aspvbs'
endif
if version < 600
source <sfile>:p:h/html.vim
else
runtime! syntax/html.vim
endif
unlet b:current_syntax
syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags
@ -163,15 +157,8 @@ syn sync match htmlHighlight grouphere htmlTag "%>"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_aspvbs_syn_inits")
if version < 508
let did_aspvbs_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
"HiLink AspVBScript Special
HiLink AspVBSLineNumber Comment
@ -187,7 +174,6 @@ if version >= 508 || !exists("did_aspvbs_syn_inits")
HiLink AspVBSTypeSpecifier Type
delcommand HiLink
endif
let b:current_syntax = "aspvbs"

View File

@ -5,10 +5,9 @@
" Updated for 1.2 by Tilghman Lesher (Corydon76)
" Last Change: 2015 Feb 27
" version 0.4
"
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -57,15 +56,8 @@ syn match asteriskSetting "^port\s*=\s*\d\{1,5}\s*$" contains=aste
syn match asteriskSetting "^host\s*=\s*\(dynamic\|\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\|\([[:alnum:]][[:alnum:]\-\.]*\.[[:alpha:]]{2,10}\)\)" contains=asteriskIP,asteriskHostname
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_conf_syntax_inits")
if version < 508
let did_conf_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink asteriskComment Comment
HiLink asteriskExten String
@ -92,7 +84,7 @@ if version >= 508 || !exists("did_conf_syntax_inits")
HiLink asteriskSetting Statement
HiLink asteriskError Error
delcommand HiLink
endif
let b:current_syntax = "asterisk"
" vim: ts=8 sw=2

View File

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

View File

@ -3,11 +3,8 @@
" Maintainer: Inaki Saez <jisaez@sfe.indra.es>
" Last Change: 2001 May 09
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -61,15 +58,8 @@ syn sync maxlines=100
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_atlas_syntax_inits")
if version < 508
let did_atlas_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink atlasConditional Conditional
HiLink atlasRepeat Repeat
@ -91,7 +81,6 @@ if version >= 508 || !exists("did_atlas_syntax_inits")
HiLink atlasSpecial Special
delcommand HiLink
endif
let b:current_syntax = "atlas"

View File

@ -18,18 +18,12 @@
" EXTRA_SOURCES.
" Standard syntax initialization
if version < 600
syntax clear
elseif exists("b:current_syntax")
if exists("b:current_syntax")
finish
endif
" Read the Makefile syntax to start with
if version < 600
source <sfile>:p:h/make.vim
else
runtime! syntax/make.vim
endif
syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\=="
syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1
@ -59,15 +53,8 @@ syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIde
syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_automake_syntax_inits")
if version < 508
let did_automake_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink automakePrimary Statement
HiLink automakeSecondary Type
@ -86,7 +73,6 @@ if version >= 508 || !exists("did_automake_syntax_inits")
HiLink automakeMakeBString makeBString
delcommand HiLink
endif
let b:current_syntax = "automake"

View File

@ -11,11 +11,8 @@
" I use some technologies to automatically load avenue scripts
" into ArcView.
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -59,15 +56,8 @@ syn match aveTypos "=="
syn match aveTypos "!="
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting+yet
if version >= 508 || !exists("did_ave_syn_inits")
if version < 508
let did_ave_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting+yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink aveStatement Statement
@ -87,6 +77,5 @@ if version >= 508 || !exists("did_ave_syn_inits")
HiLink aveTypos Error
delcommand HiLink
endif
let b:current_syntax = "ave"

View File

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

View File

@ -5,11 +5,8 @@
" LastChange: 8 Dec 2007
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -69,16 +66,9 @@ syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error
syn sync ccomment bComment minlines=10
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
" Only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_b_syntax_inits")
if version < 508
let did_b_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later
HiLink bLabel Label
@ -120,7 +110,6 @@ if version >= 508 || !exists("did_b_syntax_inits")
HiLink bTodo Todo
"hi link bIdentifier Identifier
delcommand HiLink
endif
let b:current_syntax = "b"

View File

@ -4,15 +4,8 @@
" Originally owned by: Erwin Smit / Her van de Vliert
" Last change: v1.17 2006/04/26 10:40:18
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
"
if version < 600
syntax clear
if exists("baan_fold")
unlet baan_fold
endif
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -1894,15 +1887,8 @@ syn keyword baanBshell bclm.productidlicensed
syn keyword baanBshell bclm.set.desktop
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_baan_syn_inits")
if version < 508
let did_baan_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink baanConditional Conditional
HiLink baan3gl Statement
@ -1927,7 +1913,6 @@ if version >= 508 || !exists("did_baan_syn_inits")
HiLink baanStorageClass StorageClass
delcommand HiLink
endif
let b:current_syntax = "baan"

View File

@ -8,11 +8,8 @@
" This syntax file not a complete implementation yet. Send suggestions to the
" maintainer.
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -143,15 +140,8 @@ syn match basicFilenumber "#\d\+"
syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_basic_syntax_inits")
if version < 508
let did_basic_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink basicLabel Label
HiLink basicConditional Conditional
@ -170,7 +160,6 @@ if version >= 508 || !exists("did_basic_syntax_inits")
"hi basicMathsOperator term=bold cterm=bold gui=bold
delcommand HiLink
endif
let b:current_syntax = "basic"

View File

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

View File

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

View File

@ -9,11 +9,8 @@
"
" $Id: bindzone.vim 12 2011-07-16 21:09:57Z julian $
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -70,15 +67,8 @@ syn region zoneParen contained start="(" end=")" contains=zoneSerial,
syn match zoneComment /;.*/
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_bind_zone_syn_inits")
if version < 508
let did_bind_zone_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink zoneDirective Macro
@ -103,7 +93,6 @@ if version >= 508 || !exists("did_bind_zone_syn_inits")
HiLink zoneComment Comment
delcommand HiLink
endif
let b:current_syntax = "bindzone"

View File

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

View File

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

View File

@ -11,11 +11,8 @@
"//- After unary operators like "defined" can assume token type.
"// Should there be more of these?
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -184,15 +181,8 @@ syn keyword btmCommand unlock unset ver verify vol
syn keyword btmCommand vscrput y
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_btm_syntax_inits")
if version < 508
let did_btm_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink btmLabel Special
HiLink btmLabelMark Special
@ -222,7 +212,6 @@ if version >= 508 || !exists("did_btm_syntax_inits")
"hiLink btmIdentifier Identifier
delcommand HiLink
endif
let b:current_syntax = "btm"

View File

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

View File

@ -18,11 +18,8 @@
" v1.0: Cabal syntax in vimball format
" (thanks to Magnus Therning)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -105,15 +102,8 @@ syn match cabalStatement "\ctype"
syn match cabalStatement "\cversion"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cabal_syn_inits")
if version < 508
let did_cabal_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink cabalVersion Number
HiLink cabalTruth Boolean
@ -125,7 +115,6 @@ if version >= 508 || !exists("did_cabal_syn_inits")
HiLink cabalOperator Operator
HiLink cabalCompiler Constant
delcommand HiLink
endif
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)
" Last change: 2012 Aug 11
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists ("b:current_syntax")
" quit when a syntax file was already loaded
if exists ("b:current_syntax")
finish
endif
@ -36,15 +33,8 @@ syn match CfgComment ";.*"
syn match CfgComment "\/\/.*"
" Define the default hightlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cfg_syn_inits")
if version < 508
let did_cfg_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink CfgOnOff Label
HiLink CfgComment Comment
HiLink CfgSection Type
@ -55,6 +45,6 @@ if version >= 508 || !exists("did_cfg_syn_inits")
HiLink UncPath Directory
delcommand HiLink
endif
let b:current_syntax = "cfg"
" vim:ts=8

View File

@ -8,21 +8,14 @@
" Ch is a C/C++ interpreter with many high level extensions
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" Read the C syntax to start with
if version < 600
so <sfile>:p:h/c.vim
else
runtime! syntax/c.vim
unlet b:current_syntax
endif
" Ch extentions
@ -33,20 +26,14 @@ syn keyword chStructure class
syn keyword chType string_t array
" Default highlighting
if version >= 508 || !exists("did_ch_syntax_inits")
if version < 508
let did_ch_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink chAccess chStatement
HiLink chExceptions Exception
HiLink chStatement Statement
HiLink chType Type
HiLink chStructure Structure
delcommand HiLink
endif
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
" "cweb.vim" respectively.
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syn clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -21,21 +18,13 @@ syn region changeFromMaterial start="^@x.*$"ms=e+1 end="^@y.*$"me=s-1
syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_change_syntax_inits")
if version < 508
let did_change_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink changeFromMaterial String
HiLink changeToMaterial Statement
delcommand HiLink
endif
let b:current_syntax = "change"

View File

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

View File

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

View File

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

View File

@ -11,11 +11,8 @@
" & Communications LTd.)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -124,15 +121,8 @@ endif
exec "syn sync ccomment chillComment minlines=" . chill_minlines
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_ch_syntax_inits")
if version < 508
let did_ch_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink chillLabel Label
HiLink chillUserLabel Label
@ -184,7 +174,6 @@ if version >= 508 || !exists("did_ch_syntax_inits")
HiLink chillBracket Delimiter
delcommand HiLink
endif
let b:current_syntax = "chill"

View File

@ -10,19 +10,12 @@
" Version: 6
" Last Change: Mar 06 2013
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
if version >= 600
setlocal iskeyword=@,48-57,_,-
else
set iskeyword=@,48-57,_,-
endif
syn case ignore
@ -75,15 +68,8 @@ syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi
syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cl_syntax_inits")
if version < 508
let did_cl_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink clifError Error
HiLink clSpaceError Error
@ -108,7 +94,6 @@ if version >= 508 || !exists("did_cl_syntax_inits")
HiLink clStatement Statement
delcommand HiLink
endif
let b:current_syntax = "cl"

View File

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

View File

@ -12,11 +12,8 @@
" http://www.cmake.org/HTML/Copyright.html
" This implies that distribution with Vim is allowed
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let s:keepcpo= &cpo
@ -52,15 +49,8 @@ syn keyword cmakeTodo
\ contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cmake_syntax_inits")
if version < 508
let did_cmake_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink cmakeStatement Statement
HiLink cmakeComment Comment
@ -77,7 +67,6 @@ if version >= 508 || !exists("did_cmake_syntax_inits")
HiLink cmakeEscaped Special
delcommand HiLink
endif
let b:current_syntax = "cmake"

View File

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

View File

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

View File

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

View File

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

View File

@ -10,11 +10,8 @@
" crontab line format:
" Minutes Hours Days Months Days_of_Week Commands # comments
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -39,15 +36,8 @@ syntax match crontabCmnt "^\s*#.*" contains=@Spell
syntax match crontabPercent "[^\\]%.*"lc=1 contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_crontab_syn_inits")
if version < 508
let did_crontab_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink crontabMin Number
HiLink crontabHr PreProc
@ -73,7 +63,6 @@ if version >= 508 || !exists("did_crontab_syn_inits")
HiLink crontabCmnt Comment
delcommand HiLink
endif
let b:current_syntax = "crontab"

View File

@ -3,11 +3,8 @@
" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net>
" Last change: 2011 Dec 25 by Thilo Six
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -145,7 +142,7 @@ sy match cscBPMacro contained "!"
sy match cscBPW "!\s*\a*" contains=cscBPmacro
" when wanted, highlighting lhs members or erros in asignments (may lag the editing)
if version >= 600 && exists("csc_asignment")
if exists("csc_asignment")
sy match cscEqError '\("[^"]*"\s*\|[^][\t !%()*+,--/:;<=>{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)'
sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition
sy region cscFormulaIn matchgroup=cscVarName transparent start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\(->\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\)*\s*=\([^=]\@=\|$\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition contained
@ -158,15 +155,8 @@ endif
exec "sy sync ccomment cscComment minlines=" . csc_minlines
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_csc_syntax_inits")
if version < 508
let did_csc_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue
@ -195,7 +185,6 @@ if version >= 508 || !exists("did_csc_syntax_inits")
HiLink cscBPW WarningMsg
delcommand HiLink
endif
let b:current_syntax = "csc"

View File

@ -5,11 +5,8 @@
" Version: 11
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -100,23 +97,11 @@ syn match cshNumber "-\=\<\d\+\>"
"syn match cshIdentifier "\<[a-zA-Z._][a-zA-Z0-9._]*\>"
" Shell Input Redirection (Here Documents)
if version < 600
syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**END[a-zA-Z_0-9]*\**" matchgroup=cshRedir end="^END[a-zA-Z_0-9]*$"
syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**EOF\**" matchgroup=cshRedir end="^EOF$"
else
syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**\z(\h\w*\)\**" matchgroup=cshRedir end="^\z1$"
endif
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_csh_syntax_inits")
if version < 508
let did_csh_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink cshArgv cshVariables
HiLink cshBckQuote cshCommand
@ -153,7 +138,6 @@ if version >= 508 || !exists("did_csh_syntax_inits")
HiLink cshVariables Type
delcommand HiLink
endif
let b:current_syntax = "csh"

View File

@ -15,11 +15,8 @@
" - The additional syntax for the RT-Tester (pseudo-comments)
" should be optional.
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -149,15 +146,8 @@ syn match cspSdlRttComment "pragma\s\+SDL_MATCH\s\+" nextgroup=cspRttPragmaSdlAr
syn sync lines=250
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_csp_syn_inits")
if version < 508
let did_csp_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later
" (For vim version <=5.7, the command groups are defined in
@ -188,7 +178,6 @@ if version >= 508 || !exists("did_csp_syn_inits")
" (Currently unused vim method: Debug)
delcommand HiLink
endif
let b:current_syntax = "csp"

View File

@ -8,12 +8,9 @@
" URL: https://github.com/JulesWang/css.vim
" Last Change: 2015 Apr.17
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
" quit when a syntax file was already loaded
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
if exists("b:current_syntax")
finish
endif
let main_syntax = 'css'
@ -516,15 +513,8 @@ if main_syntax == "css"
endif
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_css_syn_inits")
if version < 508
let did_css_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink cssComment Comment
HiLink cssVendor Comment
@ -648,7 +638,6 @@ if version >= 508 || !exists("did_css_syn_inits")
HiLink cssNoise Noise
HiLink atKeyword PreProc
delcommand HiLink
endif
let b:current_syntax = "css"

View File

@ -4,11 +4,8 @@
" Last Change: 2002 Apr 13
" Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -142,15 +139,8 @@ syn match ctermCharacter "'[^\\]'"
syn match ctermSpecialCharacter "'\\.'"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cterm_syntax_inits")
if version < 508
let did_cterm_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink ctermStatement Statement
HiLink ctermFunction Statement
@ -183,7 +173,6 @@ if version >= 508 || !exists("did_cterm_syntax_inits")
"hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline
delcommand HiLink
endif
let b:current_syntax = "cterm"

View File

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

View File

@ -3,11 +3,8 @@
" Maintainer: John Cook <johncook3@gmail.com>
" Last Change: 2011 Dec 27
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -95,15 +92,8 @@ syn region cuplComment start=+/\*+ end=+\*/+ contains=cuplNumber,cuplTodo
syn sync minlines=1
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cupl_syn_inits")
if version < 508
let did_cupl_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
" The default highlighting.
HiLink cuplHeader cuplStatement
@ -127,7 +117,6 @@ if version >= 508 || !exists("did_cupl_syn_inits")
HiLink cuplTodo Todo
delcommand HiLink
endif
let b:current_syntax = "cupl"

View File

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

View File

@ -4,11 +4,8 @@
" URL: http://www.zotikos.com/downloads/cvs.vim
" Last Change: Sat Nov 24 23:25:11 CET 2001
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -20,15 +17,8 @@ syn region cvsCom start="Committing in" end="$" contains=cvsDir contained extend
syn match cvsDir contained "\S\+$"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cvs_syn_inits")
if version < 508
let did_cvs_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink cvsLine Comment
HiLink cvsDir cvsFile
@ -38,6 +28,5 @@ if version >= 508 || !exists("did_cvs_syn_inits")
HiLink cvsCom Statement
delcommand HiLink
endif
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: switching to TeX mode in C/C++ comments might be colour overkill.)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -25,12 +22,8 @@ endif
" level in the CWEB syntax, e.g., in the preamble. In general, a CWEB source
" code can be seen as a normal TeX document with some C/C++ material
" interspersed in certain defined regions.
if version < 600
source <sfile>:p:h/tex.vim
else
runtime! syntax/tex.vim
unlet b:current_syntax
endif
" Read the C/C++ syntax too; C/C++ syntax items are treated as such in the
" C/C++ section of a CWEB chunk or in inner C/C++ context in "|...|" groups.
@ -63,20 +56,12 @@ syntax region webRestrictedTeX start="@[\^\.:t=q]" end="@>" oneline
syntax match webIgnoredStuff "@@"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cweb_syntax_inits")
if version < 508
let did_cweb_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
endif
HiLink webRestrictedTeX String
delcommand HiLink
endif
let b:current_syntax = "cweb"

View File

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

View File

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

View File

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

View File

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

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