mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 03:53:52 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a97304cf6 | ||
|
|
d8eaa50aed | ||
|
|
8e26e6e963 |
@@ -26,7 +26,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
## Language packs
|
## Language packs
|
||||||
|
|
||||||
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent, ftdetect)
|
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent, ftdetect)
|
||||||
- [blade](https://github.com/xsbeats/vim-blade) (syntax, indent, ftdetect)
|
- [blade](https://github.com/xsbeats/vim-blade) (syntax, ftdetect)
|
||||||
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
|
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
|
||||||
- [c/c++](https://github.com/vim-jp/cpp-vim) (syntax)
|
- [c/c++](https://github.com/vim-jp/cpp-vim) (syntax)
|
||||||
- [c-extensions](https://github.com/kergoth/aftersyntaxc.vim) (syntax)
|
- [c-extensions](https://github.com/kergoth/aftersyntaxc.vim) (syntax)
|
||||||
@@ -82,11 +82,12 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, compiler, ftplugin, ftdetect)
|
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, compiler, ftplugin, ftdetect)
|
||||||
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
||||||
- [thrift](https://github.com/solarnz/thrift.vim) (syntax, ftdetect)
|
- [thrift](https://github.com/solarnz/thrift.vim) (syntax, ftdetect)
|
||||||
- [toml](https://github.com/cespare/vim-toml) (syntax, ftdetect)
|
- [toml](https://github.com/cespare/vim-toml) (syntax, ftplugin, ftdetect)
|
||||||
- [twig](https://github.com/beyondwords/vim-twig) (syntax, ftplugin, ftdetect)
|
- [twig](https://github.com/beyondwords/vim-twig) (syntax, ftplugin, ftdetect)
|
||||||
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
|
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
|
||||||
- [vala](https://github.com/tkztmk/vim-vala) (syntax, indent, ftdetect)
|
|
||||||
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
|
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
|
||||||
|
- [vala](https://github.com/tkztmk/vim-vala) (syntax, indent, ftdetect)
|
||||||
|
- [vm](https://github.com/lepture/vim-velocity) (syntax, indent, ftdetect)
|
||||||
- [css-color](https://github.com/ap/vim-css-color) (autoload, syntax)
|
- [css-color](https://github.com/ap/vim-css-color) (autoload, syntax)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
9
build
9
build
@@ -23,17 +23,18 @@ extract() {
|
|||||||
path="$(printf "$pack" | cut -d ':' -f 2)"
|
path="$(printf "$pack" | cut -d ':' -f 2)"
|
||||||
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
||||||
directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"
|
directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"
|
||||||
|
subtree="$(printf "$pack" | cut -d ':' -f 4)"
|
||||||
printf -- "- [$name](https://github.com/$path) ("
|
printf -- "- [$name](https://github.com/$path) ("
|
||||||
|
|
||||||
subdirs=""
|
subdirs=""
|
||||||
for subdir in ${!directories}; do
|
for subdir in ${!directories}; do
|
||||||
if [ -d "$dir/$subdir" ]; then
|
if [ -d "${dir}${subtree:-/}${subdir}" ]; then
|
||||||
base="$(basename "$subdir")"
|
base="$(basename "$subdir")"
|
||||||
if [[ "$subdirs" != *"$base"* ]]; then
|
if [[ "$subdirs" != *"$base"* ]]; then
|
||||||
subdirs="$subdirs, $base"
|
subdirs="$subdirs, $base"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
copy_dir "$dir" "$subdir"
|
copy_dir "${dir}${subtree}" "$subdir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -45,8 +46,9 @@ extract() {
|
|||||||
name="$(printf "$pack" | cut -d ':' -f 1)"
|
name="$(printf "$pack" | cut -d ':' -f 1)"
|
||||||
path="$(printf "$pack" | cut -d ':' -f 2)"
|
path="$(printf "$pack" | cut -d ':' -f 2)"
|
||||||
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
||||||
|
subtree="$(printf "$pack" | cut -d ':' -f 4)"
|
||||||
|
|
||||||
if [ -d "$dir/plugin" ]; then
|
if [ -d "$dir${subtree:-/}plugin" ]; then
|
||||||
printf "Possible error (plugin directory exists): $path\n"
|
printf "Possible error (plugin directory exists): $path\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -130,6 +132,7 @@ PACKS="
|
|||||||
xls:vim-scripts/XSLT-syntax
|
xls:vim-scripts/XSLT-syntax
|
||||||
yard:sheerun/vim-yardoc
|
yard:sheerun/vim-yardoc
|
||||||
vala:tkztmk/vim-vala
|
vala:tkztmk/vim-vala
|
||||||
|
vm:lepture/vim-velocity
|
||||||
css-color:ap/vim-css-color
|
css-color:ap/vim-css-color
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
@@ -207,3 +207,4 @@ autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
|
|||||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||||
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||||
au BufRead,BufNewFile *.vala,*.vapi setfiletype vala
|
au BufRead,BufNewFile *.vala,*.vapi setfiletype vala
|
||||||
|
au BufRead,BufNewFile *.vm set ft=velocity syntax=velocity
|
||||||
|
|||||||
@@ -1609,7 +1609,7 @@ fu! <sid>AnalyzeColumn(...) "{{{3
|
|||||||
let qty = len(data)
|
let qty = len(data)
|
||||||
let res = {}
|
let res = {}
|
||||||
for item in data
|
for item in data
|
||||||
if empty(item)
|
if empty(item) || item ==# b:delimiter
|
||||||
let item = 'NULL'
|
let item = 'NULL'
|
||||||
endif
|
endif
|
||||||
if !get(res, item)
|
if !get(res, item)
|
||||||
|
|||||||
5
indent/velocity.vim
Normal file
5
indent/velocity.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
runtime! indent/html.vim
|
||||||
@@ -10,7 +10,7 @@ endif
|
|||||||
syntax case ignore
|
syntax case ignore
|
||||||
|
|
||||||
syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/
|
syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/
|
||||||
syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s/
|
syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR|COPY)\s/
|
||||||
highlight link dockerfileKeyword Keyword
|
highlight link dockerfileKeyword Keyword
|
||||||
|
|
||||||
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
||||||
|
|||||||
@@ -39,11 +39,6 @@ endif
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
if exists('®expengine')
|
|
||||||
let s:regexpengine=®expengine
|
|
||||||
set regexpengine=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
" POD starts with ^=<word> and ends with ^=cut
|
" POD starts with ^=<word> and ends with ^=cut
|
||||||
|
|
||||||
if !exists("perl_include_pod") || perl_include_pod == 1
|
if !exists("perl_include_pod") || perl_include_pod == 1
|
||||||
@@ -360,15 +355,11 @@ syn keyword perlStatementPackage package contained
|
|||||||
" sub [name] [(prototype)] {
|
" sub [name] [(prototype)] {
|
||||||
"
|
"
|
||||||
syn match perlSubError "[^[:space:];{#]" contained
|
syn match perlSubError "[^[:space:];{#]" contained
|
||||||
if v:version == 701 && !has('patch221') " XXX I hope that's the right one
|
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
|
||||||
syn match perlSubAttributes ":" contained
|
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
|
||||||
else
|
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
|
||||||
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
|
syn match perlSubAttributes "" contained nextgroup=perlSubError
|
||||||
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
|
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
|
||||||
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
|
|
||||||
syn match perlSubAttributes "" contained nextgroup=perlSubError
|
|
||||||
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
|
|
||||||
endif
|
|
||||||
if !exists("perl_no_subprototype_error") " Set 1 if using signatures feature in perl5.19.9
|
if !exists("perl_no_subprototype_error") " Set 1 if using signatures feature in perl5.19.9
|
||||||
syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
|
syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
|
||||||
syn match perlSubPrototype +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
|
syn match perlSubPrototype +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
|
||||||
@@ -583,11 +574,6 @@ syn sync match perlSyncPOD grouphere NONE "^=cut"
|
|||||||
|
|
||||||
let b:current_syntax = "perl"
|
let b:current_syntax = "perl"
|
||||||
|
|
||||||
if exists('®expengine')
|
|
||||||
let ®expengine=s:regexpengine
|
|
||||||
unlet s:regexpengine
|
|
||||||
endif
|
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
|||||||
@@ -2245,8 +2245,6 @@ endif
|
|||||||
" know how to use them reliably)
|
" know how to use them reliably)
|
||||||
syn sync fromstart
|
syn sync fromstart
|
||||||
|
|
||||||
setlocal foldmethod=syntax
|
|
||||||
|
|
||||||
let b:current_syntax = "perl6"
|
let b:current_syntax = "perl6"
|
||||||
|
|
||||||
let &cpo = s:keepcpo
|
let &cpo = s:keepcpo
|
||||||
|
|||||||
@@ -130,8 +130,8 @@ syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][io
|
|||||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
||||||
|
|
||||||
" Normal String and Shell Command Output
|
" Normal String and Shell Command Output
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
||||||
|
|
||||||
" Generalized Single Quoted String, Symbol and Array of Strings
|
" Generalized Single Quoted String, Symbol and Array of Strings
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ syn keyword rustKeyword continue
|
|||||||
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
||||||
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
|
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
|
||||||
syn keyword rustKeyword for in if impl let
|
syn keyword rustKeyword for in if impl let
|
||||||
syn keyword rustKeyword loop once proc pub
|
syn keyword rustKeyword loop once pub
|
||||||
syn keyword rustKeyword return super
|
syn keyword rustKeyword return super
|
||||||
syn keyword rustKeyword unsafe virtual where while
|
syn keyword rustKeyword unsafe virtual where while
|
||||||
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
||||||
@@ -90,7 +90,7 @@ syn keyword rustTrait Clone
|
|||||||
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
||||||
syn keyword rustEnum Ordering Equiv
|
syn keyword rustEnum Ordering Equiv
|
||||||
syn keyword rustEnumVariant Less Equal Greater
|
syn keyword rustEnumVariant Less Equal Greater
|
||||||
syn keyword rustTrait FromIterator Extend ExactSize
|
syn keyword rustTrait FromIterator Extend ExactSizeIterator
|
||||||
syn keyword rustTrait Iterator DoubleEndedIterator
|
syn keyword rustTrait Iterator DoubleEndedIterator
|
||||||
syn keyword rustTrait RandomAccessIterator CloneableIterator
|
syn keyword rustTrait RandomAccessIterator CloneableIterator
|
||||||
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
|
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
|
||||||
@@ -151,6 +151,7 @@ syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic
|
|||||||
syn match rustEscapeError display contained /\\./
|
syn match rustEscapeError display contained /\\./
|
||||||
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
|
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
|
||||||
syn match rustEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{8}\)/
|
syn match rustEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{8}\)/
|
||||||
|
syn match rustEscapeUnicode display contained /\\u{\x\{1,6}}/
|
||||||
syn match rustStringContinuation display contained /\\\n\s*/
|
syn match rustStringContinuation display contained /\\\n\s*/
|
||||||
syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
||||||
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
||||||
@@ -187,7 +188,7 @@ syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
|||||||
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
|
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
|
||||||
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
||||||
syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
|
syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
|
||||||
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\|u{\x\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
||||||
|
|
||||||
syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
|
syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
|
||||||
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
|
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
|
||||||
|
|||||||
97
syntax/tap.vim
Normal file
97
syntax/tap.vim
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Verbose TAP Output
|
||||||
|
" Maintainer: Rufus Cable <rufus@threebytesfull.com>
|
||||||
|
" Remark: Simple syntax highlighting for TAP output
|
||||||
|
" License:
|
||||||
|
" Copyright: (c) 2008-2013 Rufus Cable
|
||||||
|
" Last Change: {{LAST_CHANGE}}
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn match tapTestDiag /^ *#.*/ contains=tapTestTodo
|
||||||
|
syn match tapTestTime /^ *\[\d\d:\d\d:\d\d\].*/ contains=tapTestFile
|
||||||
|
syn match tapTestFile /\w\+\/[^. ]*/ contained
|
||||||
|
syn match tapTestFileWithDot /\w\+\/[^ ]*/ contained
|
||||||
|
|
||||||
|
syn match tapTestPlan /^ *\d\+\.\.\d\+$/
|
||||||
|
|
||||||
|
" tapTest is a line like 'ok 1', 'not ok 2', 'ok 3 - xxxx'
|
||||||
|
syn match tapTest /^ *\(not \)\?ok \d\+.*/ contains=tapTestStatusOK,tapTestStatusNotOK,tapTestLine
|
||||||
|
|
||||||
|
" tapTestLine is the line without the ok/not ok status - i.e. number and
|
||||||
|
" optional message
|
||||||
|
syn match tapTestLine /\d\+\( .*\|$\)/ contains=tapTestNumber,tapTestLoadMessage,tapTestTodo,tapTestSkip contained
|
||||||
|
|
||||||
|
" turn ok/not ok messages green/red respectively
|
||||||
|
syn match tapTestStatusOK /ok/ contained
|
||||||
|
syn match tapTestStatusNotOK /not ok/ contained
|
||||||
|
|
||||||
|
" highlight todo tests
|
||||||
|
syn match tapTestTodo /\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev
|
||||||
|
syn match tapTestTodoRev /\<TODO\>/ contained
|
||||||
|
|
||||||
|
" highlight skipped tests
|
||||||
|
syn match tapTestSkip /# skip .*$/ contained contains=tapTestSkipTag
|
||||||
|
syn match tapTestSkipTag /\(# \)\@<=skip\>/ contained
|
||||||
|
|
||||||
|
" look behind so "ok 123" and "not ok 124" match test number
|
||||||
|
syn match tapTestNumber /\(ok \)\@<=\d\d*/ contained
|
||||||
|
syn match tapTestLoadMessage /\*\*\*.*\*\*\*/ contained contains=tapTestThreeStars,tapTestFileWithDot
|
||||||
|
syn match tapTestThreeStars /\*\*\*/ contained
|
||||||
|
|
||||||
|
syn region tapTestRegion start=/^ *\(not \)\?ok.*$/me=e+1 end=/^\(\(not \)\?ok\|# Looks like you planned \|All tests successful\|Bailout called\)/me=s-1 fold transparent excludenl
|
||||||
|
syn region tapTestResultsOKRegion start=/^\(All tests successful\|Result: PASS\)/ end=/$/
|
||||||
|
syn region tapTestResultsNotOKRegion start=/^\(# Looks like you planned \|Bailout called\|# Looks like you failed \|Result: FAIL\)/ end=/$/
|
||||||
|
syn region tapTestResultsSummaryRegion start=/^Test Summary Report/ end=/^Files=.*$/ contains=tapTestResultsSummaryHeading,tapTestResultsSummaryNotOK
|
||||||
|
|
||||||
|
syn region tapTestResultsSummaryHeading start=/^Test Summary Report/ end=/^-\+$/ contained
|
||||||
|
syn region tapTestResultsSummaryNotOK start=/TODO passed:/ end=/$/ contained
|
||||||
|
|
||||||
|
syn region tapTestInstructionsRegion start=/\%1l/ end=/^$/
|
||||||
|
|
||||||
|
set foldtext=TAPTestLine_foldtext()
|
||||||
|
function! TAPTestLine_foldtext()
|
||||||
|
let line = getline(v:foldstart)
|
||||||
|
let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
|
||||||
|
return sub
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
set foldminlines=5
|
||||||
|
set foldcolumn=2
|
||||||
|
set foldenable
|
||||||
|
set foldmethod=syntax
|
||||||
|
syn sync fromstart
|
||||||
|
|
||||||
|
if !exists("did_tapverboseoutput_syntax_inits")
|
||||||
|
let did_tapverboseoutput_syntax_inits = 1
|
||||||
|
|
||||||
|
hi tapTestStatusOK term=bold ctermfg=green guifg=Green
|
||||||
|
hi tapTestStatusNotOK term=reverse ctermfg=black ctermbg=red guifg=Black guibg=Red
|
||||||
|
hi tapTestTodo term=bold ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black
|
||||||
|
hi tapTestTodoRev term=reverse ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow
|
||||||
|
hi tapTestSkip term=bold ctermfg=lightblue guifg=LightBlue
|
||||||
|
hi tapTestSkipTag term=reverse ctermfg=black ctermbg=lightblue guifg=Black guibg=LightBlue
|
||||||
|
hi tapTestTime term=bold ctermfg=blue guifg=Blue
|
||||||
|
hi tapTestFile term=reverse ctermfg=black ctermbg=yellow guibg=Black guifg=Yellow
|
||||||
|
hi tapTestLoadedFile term=bold ctermfg=black ctermbg=cyan guibg=Cyan guifg=Black
|
||||||
|
hi tapTestThreeStars term=reverse ctermfg=blue guifg=Blue
|
||||||
|
hi tapTestPlan term=bold ctermfg=yellow guifg=Yellow
|
||||||
|
|
||||||
|
hi link tapTestFileWithDot tapTestLoadedFile
|
||||||
|
hi link tapTestNumber Number
|
||||||
|
hi link tapTestDiag Comment
|
||||||
|
|
||||||
|
hi tapTestRegion ctermbg=green
|
||||||
|
|
||||||
|
hi tapTestResultsOKRegion ctermbg=green ctermfg=black
|
||||||
|
hi tapTestResultsNotOKRegion ctermbg=red ctermfg=black
|
||||||
|
|
||||||
|
hi tapTestResultsSummaryHeading ctermbg=blue ctermfg=white
|
||||||
|
hi tapTestResultsSummaryNotOK ctermbg=red ctermfg=black
|
||||||
|
|
||||||
|
hi tapTestInstructionsRegion ctermbg=lightmagenta ctermfg=black
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax="tapVerboseOutput"
|
||||||
67
syntax/velocity.vim
Normal file
67
syntax/velocity.vim
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Velocity HTML template
|
||||||
|
" Maintainer: Hsiaoming Young <http://lepture.com>
|
||||||
|
" Last Change: 2012 Jan 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")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists("main_syntax")
|
||||||
|
let main_syntax = 'html'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if version < 600
|
||||||
|
so <sfile>:p:h/html.vim
|
||||||
|
else
|
||||||
|
runtime! syntax/html.vim
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn keyword velocityTodo FIXME TODO contained
|
||||||
|
syn region velocitySpec start="@" end=" " oneline contained
|
||||||
|
syn region velocityComment start="#\*" end="\*#" contains=velocityTodo,velocitySpec
|
||||||
|
syn match velocityComment /##.*/ contains=velocityTodo,velocitySpec
|
||||||
|
syn region velocityString start='"' end='"' oneline display
|
||||||
|
syn region velocityString start="'" end="'" oneline display
|
||||||
|
syn match velocityNumber "[-+]\=\d\+\(\.\d*\)\=" display
|
||||||
|
syn region velocityList start='\[' end='\]' oneline contained contains=velocityString,velocityNumber
|
||||||
|
syn match velocityMath /=\|-\|+\|\/\|\*\|%/ contained
|
||||||
|
syn match velocityBlock /#[a-z]\{2,\}/ contains=velocityStatement
|
||||||
|
syn match velocityBlock /#[a-z]\{2,\}(.\+)/ contains=velocityStatement,velocityVar,velocityString,velocityNumber,velocityMath,velocityList
|
||||||
|
syn keyword velocityStatement in set if else elseif end foreach include parse macro cmsparse stop break evaluate define contained
|
||||||
|
|
||||||
|
syn match velocityVar /$!\?[a-zA-Z][a-zA-Z0-9_-]\+\(\.\?[a-zA-Z0-9]*\)\+/ contains=velocityFunction display containedin=ALL
|
||||||
|
syn match velocityVar /$!\?{[a-zA-Z][a-zA-Z0-9_-]\+}/ display containedin=ALL
|
||||||
|
syn match velocityFunction /[a-zA-Z][a-zA-Z0-9_-]\+\(\.[a-zA-Z][a-zA-Z0-9_-]\+\)\+([^)]*)/ contains=velocityString,velocityNumber,velocityList,velocityMath,velocityVar,velocityFunction display containedin=velocityBlock
|
||||||
|
|
||||||
|
" Define the default highlighting.
|
||||||
|
" For version 5.7 and earlier: only when not done already
|
||||||
|
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||||
|
if version >= 508 || !exists("did_velocity_syn_inits")
|
||||||
|
if version < 508
|
||||||
|
let did_velocity_syn_inits = 1
|
||||||
|
command -nargs=+ HiLink hi link <args>
|
||||||
|
else
|
||||||
|
command -nargs=+ HiLink hi def link <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
HiLink velocityString String
|
||||||
|
HiLink velocityNumber Number
|
||||||
|
HiLink velocityList Constant
|
||||||
|
HiLink velocityBlock PreProc
|
||||||
|
HiLink velocitySpec Special
|
||||||
|
HiLink velocityVar Identifier
|
||||||
|
HiLink velocityFunction Function
|
||||||
|
HiLink velocityStatement Statement
|
||||||
|
HiLink velocityComment Comment
|
||||||
|
HiLink velocityTodo Todo
|
||||||
|
|
||||||
|
delcommand HiLink
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax = "velocity"
|
||||||
Reference in New Issue
Block a user