This commit is contained in:
Adam Stankiewicz
2014-01-24 18:06:22 +01:00
parent f211f02d1e
commit 9a2b4f5cd8
10 changed files with 87 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
au BufRead,BufNewFile *.ino,*.pde set filetype=arduino au BufRead,BufNewFile *.ino,*.pde set filetype=arduino
au BufNewFile,BufRead *.clj,*.cljs,*.edn setf clojure autocmd BufNewFile,BufRead *.clj,*.cljs,*.edn setlocal filetype=clojure
autocmd BufNewFile,BufRead *.coffee set filetype=coffee autocmd BufNewFile,BufRead *.coffee set filetype=coffee
autocmd BufNewFile,BufRead *Cakefile set filetype=coffee autocmd BufNewFile,BufRead *Cakefile set filetype=coffee
autocmd BufNewFile,BufRead *.coffeekup,*.ck set filetype=coffee autocmd BufNewFile,BufRead *.coffeekup,*.ck set filetype=coffee
@@ -108,7 +108,7 @@ au BufNewFile,BufRead *.jbuilder set filetype=ruby
au BufNewFile,BufRead Puppetfile set filetype=ruby au BufNewFile,BufRead Puppetfile set filetype=ruby
au BufNewFile,BufRead [Bb]uildfile set filetype=ruby au BufNewFile,BufRead [Bb]uildfile set filetype=ruby
au BufNewFile,BufRead Appraisals set filetype=ruby au BufNewFile,BufRead Appraisals set filetype=ruby
au BufRead,BufNewFile *.rs,*.rc set filetype=rust au BufRead,BufNewFile *.rs set filetype=rust
au BufRead,BufNewFile *.sbt set filetype=sbt au BufRead,BufNewFile *.sbt set filetype=sbt
fun! s:DetectScala() fun! s:DetectScala()
if getline(1) == '#!/usr/bin/env scala' if getline(1) == '#!/usr/bin/env scala'

View File

@@ -137,6 +137,7 @@ fu! <sid>Init(startline, endline) "{{{3
\ . "| unlet! b:csv_SplitWindow b:csv_headerline" \ . "| unlet! b:csv_SplitWindow b:csv_headerline"
\ . "| unlet! b:csv_thousands_sep b:csv_decimal_sep" \ . "| unlet! b:csv_thousands_sep b:csv_decimal_sep"
\. " | unlet! b:browsefilter b:csv_cmt" \. " | unlet! b:browsefilter b:csv_cmt"
\. " | unlet! b:csv_arrange_leftalign"
" Delete all functions " Delete all functions
" disabled currently, because otherwise when switching ft " disabled currently, because otherwise when switching ft
@@ -696,7 +697,11 @@ endfu
fu! <sid>UnArrangeCol(match) "{{{3 fu! <sid>UnArrangeCol(match) "{{{3
" Strip leading white space, also trims empty records: " Strip leading white space, also trims empty records:
return substitute(a:match, '^\s\+', '', '') if get(b:, 'csv_arrange_leftalign',0)
return substitute(a:match, '\s\+\ze'. b:delimiter. '\?$', '', '')
else
return substitute(a:match, '^\s\+', '', '')
endif
" only strip leading white space, if a non-white space follows: " only strip leading white space, if a non-white space follows:
"return substitute(a:match, '^\s\+\ze\S', '', '') "return substitute(a:match, '^\s\+\ze\S', '', '')
endfu endfu
@@ -744,9 +749,18 @@ fu! <sid>Columnize(field) "{{{3
let width=get(b:col_width, (s:columnize_count % s:max_cols), 20) let width=get(b:col_width, (s:columnize_count % s:max_cols), 20)
let s:columnize_count += 1 let s:columnize_count += 1
let has_delimiter = (a:field =~# b:delimiter.'$')
if v:version > 703 || v:version == 703 && has("patch713") if v:version > 703 || v:version == 703 && has("patch713")
" printf knows about %S (e.g. can handle char length " printf knows about %S (e.g. can handle char length
return printf("%*S", width+1 , a:field) if get(b:, 'csv_arrange_leftalign',0)
" left-align content
return printf("%-*S%s", width+1 ,
\ (has_delimiter ?
\ matchstr(a:field, '.*\%('.b:delimiter.'\)\@=') : a:field),
\ (has_delimiter ? b:delimiter : ''))
else
return printf("%*S", width+1 , a:field)
endif
else else
" printf only handles bytes " printf only handles bytes
if !exists("g:csv_no_multibyte") && if !exists("g:csv_no_multibyte") &&
@@ -768,7 +782,14 @@ fu! <sid>Columnize(field) "{{{3
" Column has correct length, don't use printf() " Column has correct length, don't use printf()
return a:field return a:field
else else
return printf("%*s", width , a:field) if get(b:, 'csv_arrange_leftalign',0)
" left-align content
return printf("%-*s%s", width,
\ (has_delimiter ? matchstr(a:field, '.*\%('.b:delimiter.'\)\@=') : a:field),
\ (has_delimiter ? b:delimiter : ''))
else
return printf("%*s", width , a:field)
endif
endif endif
endif endif
endfun endfun
@@ -1250,8 +1271,8 @@ fu! <sid>SumColumn(list) "{{{3
if empty(item) if empty(item)
continue continue
endif endif
let nr = matchstr(item, '\d\(.*\d\)\?$') let nr = matchstr(item, '-\?\d\(.*\d\)\?$')
let format1 = '^\d\+\zs\V' . s:nr_format[0] . '\m\ze\d' let format1 = '^-\?\d\+\zs\V' . s:nr_format[0] . '\m\ze\d'
let format2 = '\d\+\zs\V' . s:nr_format[1] . '\m\ze\d' let format2 = '\d\+\zs\V' . s:nr_format[1] . '\m\ze\d'
try try
let nr = substitute(nr, format1, '', '') let nr = substitute(nr, format1, '', '')
@@ -2379,7 +2400,7 @@ fu! csv#EvalColumn(nr, func, first, last) range "{{{3
endif endif
let save = winsaveview() let save = winsaveview()
call <sid>CheckHeaderLine() call <sid>CheckHeaderLine()
let nr = matchstr(a:nr, '^\d\+') let nr = matchstr(a:nr, '^\-\?\d\+')
let col = (empty(nr) ? <sid>WColumn() : nr) let col = (empty(nr) ? <sid>WColumn() : nr)
" don't take the header line into consideration " don't take the header line into consideration
let start = a:first - 1 + s:csv_fold_headerline let start = a:first - 1 + s:csv_fold_headerline

View File

@@ -325,7 +325,7 @@ function! LatexBox_Latexmk(force)
let g:latexmk_running_pids[basepath] = pid let g:latexmk_running_pids[basepath] = pid
else else
let pid = substitute(system('pgrep -f "perl.*' let pid = substitute(system('pgrep -f "perl.*'
\ . mainfile . '"'),'\D','','') \ . mainfile . '" | head -n 1'),'\D','','')
let g:latexmk_running_pids[basepath] = pid let g:latexmk_running_pids[basepath] = pid
endif endif
else else

View File

@@ -10,7 +10,7 @@ let b:did_indent = 1
setlocal nosmartindent setlocal nosmartindent
setlocal indentexpr=GetElixirIndent(v:lnum) setlocal indentexpr=GetElixirIndent()
setlocal indentkeys+==end,=else:,=match:,=elsif:,=catch:,=after:,=rescue: setlocal indentkeys+==end,=else:,=match:,=elsif:,=catch:,=after:,=rescue:
if exists("*GetElixirIndent") if exists("*GetElixirIndent")
@@ -31,7 +31,7 @@ let s:pipeline = '^\s*|>.*$'
let s:indent_keywords = '\<\%(' . s:block_start . '\|' . s:block_middle . '\)$' . '\|' . s:arrow let s:indent_keywords = '\<\%(' . s:block_start . '\|' . s:block_middle . '\)$' . '\|' . s:arrow
let s:deindent_keywords = '^\s*\<\%(' . s:block_end . '\|' . s:block_middle . '\)\>' . '\|' . s:arrow let s:deindent_keywords = '^\s*\<\%(' . s:block_end . '\|' . s:block_middle . '\)\>' . '\|' . s:arrow
function! GetElixirIndent(...) function! GetElixirIndent()
let lnum = prevnonblank(v:lnum - 1) let lnum = prevnonblank(v:lnum - 1)
let ind = indent(lnum) let ind = indent(lnum)
@@ -40,6 +40,14 @@ function! GetElixirIndent(...)
return 0 return 0
endif endif
" TODO: Remove these 2 lines
" I don't know why, but for the test on spec/indent/lists_spec.rb:24.
" Vim is making some mess on parsing the syntax of 'end', it is being
" recognized as 'elixirString' when should be recognized as 'elixirBlock'.
" This forces vim to sync the syntax.
call synID(v:lnum, 1, 1)
syntax sync fromstart
if synIDattr(synID(v:lnum, 1, 1), "name") !~ s:skip_syntax if synIDattr(synID(v:lnum, 1, 1), "name") !~ s:skip_syntax
let current_line = getline(v:lnum) let current_line = getline(v:lnum)
let last_line = getline(lnum) let last_line = getline(lnum)
@@ -61,7 +69,7 @@ function! GetElixirIndent(...)
if current_line =~ s:pipeline && if current_line =~ s:pipeline &&
\ last_line =~ '^[^=]\+=.\+$' \ last_line =~ '^[^=]\+=.\+$'
let b:old_ind = ind let b:old_ind = ind
let ind += round(match(last_line, '=') / &sw) * &sw let ind = float2nr(matchend(last_line, '=\s*[^ ]') / &sw) * &sw
endif endif
" if last line starts with pipeline " if last line starts with pipeline
@@ -78,6 +86,7 @@ function! GetElixirIndent(...)
\ '\<:\@<!' . s:block_end . '\>\zs', \ '\<:\@<!' . s:block_end . '\>\zs',
\ 'nbW', \ 'nbW',
\ s:block_skip ) \ s:block_skip )
let ind = indent(bslnum) let ind = indent(bslnum)
endif endif

File diff suppressed because one or more lines are too long

View File

@@ -91,6 +91,10 @@ syn region elixirSigil matchgroup=elixirDelimiter start="%[bcrw]<"
syn region elixirSigil matchgroup=elixirDelimiter start="%[bcrw]\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation syn region elixirSigil matchgroup=elixirDelimiter start="%[bcrw]\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirDelimiter start="%[bcrw](" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation syn region elixirSigil matchgroup=elixirDelimiter start="%[bcrw](" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
" Sigils surrounded with docString
syn region elixirSigil matchgroup=elixirDelimiter start=+%[BCRWbcrw]\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold
syn region elixirSigil matchgroup=elixirDelimiter start=+%[BCRWbcrw]\z('''\)+ end=+^\s*\zs\z1+ skip=+\\'+ fold
" Defines " Defines
syn keyword elixirDefine def nextgroup=elixirFunctionDeclaration skipwhite skipnl syn keyword elixirDefine def nextgroup=elixirFunctionDeclaration skipwhite skipnl
syn keyword elixirDefine def nextgroup=elixirFunctionDeclaration skipwhite skipnl syn keyword elixirDefine def nextgroup=elixirFunctionDeclaration skipwhite skipnl
@@ -149,7 +153,7 @@ hi def link elixirBoolean Boolean
hi def link elixirVariable Identifier hi def link elixirVariable Identifier
hi def link elixirUnusedVariable Comment hi def link elixirUnusedVariable Comment
hi def link elixirNumber Number hi def link elixirNumber Number
hi def link elixirDocString Comment hi def link elixirDocString String
hi def link elixirSymbolInterpolated elixirSymbol hi def link elixirSymbolInterpolated elixirSymbol
hi def link elixirRegex elixirString hi def link elixirRegex elixirString
hi def link elixirRegexEscape elixirSpecial hi def link elixirRegexEscape elixirSpecial

View File

@@ -400,7 +400,9 @@ if exists("php_parent_error_close")
endif endif
" Todo " Todo
syn keyword phpTodo todo fixme xxx note contained syn case match
syn keyword phpTodo TODO FIXME XXX NOTE contained
syn case ignore
" Comment " Comment
if exists("php_parent_error_open") if exists("php_parent_error_open")
@@ -415,14 +417,13 @@ syn match phpCommentStar contained "^\s*\*$"
if !exists("php_ignore_phpdoc") if !exists("php_ignore_phpdoc")
syn case ignore syn case ignore
syn region phpDocComment start="/\*\*" end="\*/" keepend contains=phpCommentTitle,phpDocTags,phpTodo syn region phpDocComment start="/\*\*" end="\*/" keepend contains=phpCommentTitle,phpDocTags,phpTodo,@Spell
syn region phpCommentTitle contained matchgroup=phpDocComment start="/\*\*" matchgroup=phpCommmentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=phpCommentStar,phpTodo,phpDocTags containedin=phpComment syn region phpCommentTitle contained matchgroup=phpDocComment start="/\*\*" matchgroup=phpCommmentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=phpCommentStar,phpTodo,phpDocTags,@Spell containedin=phpComment
syn region phpDocTags start="{@\(example\|id\|internal\|inheritdoc\|link\|source\|toc\|tutorial\)" end="}" containedin=phpComment syn region phpDocTags start="{@\(example\|id\|internal\|inheritdoc\|link\|source\|toc\|tutorial\)" end="}" containedin=phpComment
syn match phpDocTags "@\(abstract\|access\|author\|category\|copyright\|deprecated\|example\|final\|global\|ignore\|internal\|license\|link\|method\|name\|package\|param\|property\|return\|see\|since\|static\|staticvar\|subpackage\|todo\|tutorial\|uses\|var\|version\)\s\+\S\+.*" contains=phpDocParam containedin=phpComment syn match phpDocTags "@\(abstract\|access\|author\|category\|copyright\|deprecated\|example\|exception\|filesource\|final\|global\|id\|ignore\|inheritdoc\|internal\|license\|link\|magic\|method\|name\|package\|param\|property\|return\|see\|since\|source\|static\|staticvar\|subpackage\|throws\|toc\|todo\|tutorial\|uses\|var\|version\)\s\+\S\+.*" contains=phpDocParam containedin=phpComment
syn match phpDocParam "\s\S\+" contained contains=phpDocIdentifier syn match phpDocParam "\s\S\+" contained contains=phpDocIdentifier
syn match phpDocIdentifier contained "$\h\w*" syn match phpDocIdentifier contained "$\h\w*"
syn match phpDocTags "@filesource" containedin=phpComment
syn case match syn case match
endif endif
@@ -527,10 +528,7 @@ endif
" For version 5.8 and later: only when an item doesn't have highlighting yet " For version 5.8 and later: only when an item doesn't have highlighting yet
if !exists("did_php_syn_inits") if !exists("did_php_syn_inits")
hi def link phpCommentTitle SpecialComment
hi def link phpComment Comment hi def link phpComment Comment
hi def link phpDocComment Comment
hi def link phpCommentStar Comment
hi def link phpMagicConstants Constant hi def link phpMagicConstants Constant
hi def link phpServerVars Constant hi def link phpServerVars Constant
hi def link phpConstants Constant hi def link phpConstants Constant
@@ -548,21 +546,15 @@ if !exists("did_php_syn_inits")
hi def link phpException StorageClass hi def link phpException StorageClass
hi def link phpIdentifier Identifier hi def link phpIdentifier Identifier
hi def link phpIdentifierSimply Identifier hi def link phpIdentifierSimply Identifier
hi def link phpDocIdentifier Identifier
hi def link phpStatement Statement hi def link phpStatement Statement
hi def link phpStructure Statement hi def link phpStructure Statement
hi def link phpOperator Operator hi def link phpOperator Operator
hi def link phpVarSelector Operator hi def link phpMemberSelector Operator
hi def link phpInclude PreProc hi def link phpInclude PreProc
hi def link phpDefine PreProc hi def link phpDefine PreProc
hi def link phpKeyword Keyword hi def link phpKeyword Keyword
hi def link phpFCKeyword Keyword
hi def link phpSCKeyword Keyword
hi def link phpSuperglobals Type hi def link phpSuperglobals Type
hi def link phpType Type hi def link phpType Type
hi def link phpDocParam Type
hi def link phpMemberSelector Operator
hi def link phpDocTags Special
hi def link phpParent Special hi def link phpParent Special
hi def link phpSpecialChar SpecialChar hi def link phpSpecialChar SpecialChar
hi def link phpStrEsc SpecialChar hi def link phpStrEsc SpecialChar
@@ -570,6 +562,18 @@ if !exists("did_php_syn_inits")
hi def link phpOctalError Error hi def link phpOctalError Error
hi def link phpTodo Todo hi def link phpTodo Todo
hi def link phpCommentStar phpComment
hi def link phpDocComment phpComment
hi def link phpCommentTitle phpComment
hi def link phpDocTags phpComment
hi def link phpDocParam phpComment
hi def link phpDocIdentifier phpComment
hi def link phpFCKeyword phpKeyword
hi def link phpSCKeyword phpKeyword
hi def link phpVarSelector phpIdentifier
endif endif
let b:current_syntax = "php" let b:current_syntax = "php"

View File

@@ -121,7 +121,7 @@ syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!"
" Normal Regular Expression " Normal Regular Expression
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold
" Generalized Regular Expression " Generalized Regular Expression

View File

@@ -3,7 +3,7 @@
" Maintainer: Patrick Walton <pcwalton@mozilla.com> " Maintainer: Patrick Walton <pcwalton@mozilla.com>
" Maintainer: Ben Blum <bblum@cs.cmu.edu> " Maintainer: Ben Blum <bblum@cs.cmu.edu>
" Maintainer: Chris Morgan <me@chrismorgan.info> " Maintainer: Chris Morgan <me@chrismorgan.info>
" Last Change: 2013 Dec 10 " Last Change: 2014 Jan 4
if version < 600 if version < 600
syntax clear syntax clear
@@ -71,7 +71,7 @@ syn keyword rustTrait Bool
syn keyword rustTrait ToCStr syn keyword rustTrait ToCStr
syn keyword rustTrait Char syn keyword rustTrait Char
syn keyword rustTrait Clone DeepClone syn keyword rustTrait Clone DeepClone
syn keyword rustTrait Eq ApproxEq Ord TotalEq TotalOrd Ordering Equiv syn keyword rustTrait Eq Ord TotalEq TotalOrd Ordering Equiv
syn keyword rustEnumVariant Less Equal Greater syn keyword rustEnumVariant Less Equal Greater
syn keyword rustTrait Container Mutable Map MutableMap Set MutableSet syn keyword rustTrait Container Mutable Map MutableMap Set MutableSet
syn keyword rustTrait Default syn keyword rustTrait Default
@@ -83,8 +83,7 @@ syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
syn keyword rustTrait Times syn keyword rustTrait Times
syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
syn keyword rustTrait Bitwise BitCount Bounded syn keyword rustTrait Bitwise Bounded Integer Fractional Real RealExt
syn keyword rustTrait Integer Fractional Real RealExt
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
syn keyword rustTrait Orderable Signed Unsigned Round syn keyword rustTrait Orderable Signed Unsigned Round
syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
@@ -148,8 +147,8 @@ syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustFail
syn match rustSpecialError display contained /\\./ syn match rustSpecialError display contained /\\./
syn match rustSpecial display contained /\\\([nrt0\\'"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)/ syn match rustSpecial display contained /\\\([nrt0\\'"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)/
syn match rustStringContinuation display contained /\\\n\s*/ syn match rustStringContinuation display contained /\\\n\s*/
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustSpecial,rustSpecialError,rustStringContinuation syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustSpecial,rustSpecialError,rustStringContinuation,@Spell
syn region rustString start='r\z(#*\)"' end='"\z1' syn region rustString start='r\z(#*\)"' end='"\z1' contains=@Spell
syn region rustAttribute start="#\[" end="\]" contains=rustString,rustDeriving syn region rustAttribute start="#\[" end="\]" contains=rustString,rustDeriving
syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait
@@ -180,10 +179,10 @@ syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit
syn match rustCharacter /'\([^'\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'/ contains=rustSpecial,rustSpecialError syn match rustCharacter /'\([^'\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'/ contains=rustSpecial,rustSpecialError
syn cluster rustComment contains=rustCommentLine,rustCommentLineDoc,rustCommentBlock,rustCommentBlockDoc syn cluster rustComment contains=rustCommentLine,rustCommentLineDoc,rustCommentBlock,rustCommentBlockDoc
syn region rustCommentLine start="//" end="$" contains=rustTodo syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,@rustComment keepend extend syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,@rustComment,@Spell keepend extend
syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,@rustComment keepend extend syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,@rustComment,@Spell keepend extend
" FIXME: this is a really ugly and not fully correct implementation. Most " FIXME: this is a really ugly and not fully correct implementation. Most
" importantly, a case like ``/* */*`` should have the final ``*`` not being in " importantly, a case like ``/* */*`` should have the final ``*`` not being in
" a comment, but in practice at present it leaves comments open two levels " a comment, but in practice at present it leaves comments open two levels

View File

@@ -35,6 +35,7 @@ syn keyword slimDocType contained html 5 1.1 strict frameset mobile basic
syn match slimDocTypeKeyword "^\s*\(doctype\)\s\+" nextgroup=slimDocType syn match slimDocTypeKeyword "^\s*\(doctype\)\s\+" nextgroup=slimDocType
syn keyword slimTodo FIXME TODO NOTE OPTIMIZE XXX contained syn keyword slimTodo FIXME TODO NOTE OPTIMIZE XXX contained
syn keyword htmlTagName contained script
syn match slimTag "\w\+" contained contains=htmlTagName nextgroup=@slimComponent syn match slimTag "\w\+" contained contains=htmlTagName nextgroup=@slimComponent
syn match slimIdChar "#{\@!" contained nextgroup=slimId syn match slimIdChar "#{\@!" contained nextgroup=slimId