This commit is contained in:
Adam Stankiewicz 2014-11-11 02:37:21 +01:00
parent bd35da8e9c
commit 617b01a5b6
43 changed files with 760 additions and 277 deletions

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL

View File

@ -1,10 +1,13 @@
" Vim syntax file " Vim syntax file
" Language: C Additions " Language: C Additions
" Maintainer: Jon Haggblad <jon@haeggblad.com> " Maintainer: Jon Haggblad <jon@haeggblad.com>
" Contributor: Mikhail Wolfson <mywolfson@gmail.com>
" URL: http://www.haeggblad.com " URL: http://www.haeggblad.com
" Last Change: 9 Aug 2014 " Last Change: 6 Sep 2014
" Version: 0.1 " Version: 0.3
" Changelog: " Changelog:
" 0.3 - integration of aftersyntaxc.vim
" 0.2 - Cleanup
" 0.1 - initial version. " 0.1 - initial version.
" "
" Syntax highlighting for functions in C. " Syntax highlighting for functions in C.
@ -13,15 +16,279 @@
" http://stackoverflow.com/questions/736701/class-function-names-highlighting-in-vim " http://stackoverflow.com/questions/736701/class-function-names-highlighting-in-vim
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
" Highlight Class and Function names. " Highlight function names.
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
syn match cCustomParen "(" contains=cParen contains=cCppParen syn match cCustomParen "(" contains=cParen contains=cCppParen
syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen
syn match cCustomScope "::"
syn match cCustomClass "\w\+\s*::" contains=cCustomScope
hi def link cCustomFunc Function hi def link cCustomFunc Function
" -----------------------------------------------------------------------------
" Source: aftersyntaxc.vim
" -----------------------------------------------------------------------------
" Common ANSI-standard functions
syn keyword cAnsiFunction MULU_ DIVU_ MODU_ MUL_ DIV_ MOD_
syn keyword cAnsiFunction main typeof
syn keyword cAnsiFunction open close read write lseek dup dup2
syn keyword cAnsiFunction fcntl ioctl
syn keyword cAnsiFunction wctrans towctrans towupper
syn keyword cAnsiFunction towlower wctype iswctype
syn keyword cAnsiFunction iswxdigit iswupper iswspace
syn keyword cAnsiFunction iswpunct iswprint iswlower
syn keyword cAnsiFunction iswgraph iswdigit iswcntrl
syn keyword cAnsiFunction iswalpha iswalnum wcsrtombs
syn keyword cAnsiFunction mbsrtowcs wcrtomb mbrtowc
syn keyword cAnsiFunction mbrlen mbsinit wctob
syn keyword cAnsiFunction btowc wcsfxtime wcsftime
syn keyword cAnsiFunction wmemset wmemmove wmemcpy
syn keyword cAnsiFunction wmemcmp wmemchr wcstok
syn keyword cAnsiFunction wcsstr wcsspn wcsrchr
syn keyword cAnsiFunction wcspbrk wcslen wcscspn
syn keyword cAnsiFunction wcschr wcsxfrm wcsncmp
syn keyword cAnsiFunction wcscoll wcscmp wcsncat
syn keyword cAnsiFunction wcscat wcsncpy wcscpy
syn keyword cAnsiFunction wcstoull wcstoul wcstoll
syn keyword cAnsiFunction wcstol wcstold wcstof
syn keyword cAnsiFunction wcstod ungetwc putwchar
syn keyword cAnsiFunction putwc getwchar getwc
syn keyword cAnsiFunction fwide fputws fputwc
syn keyword cAnsiFunction fgetws fgetwc wscanf
syn keyword cAnsiFunction wprintf vwscanf vwprintf
syn keyword cAnsiFunction vswscanf vswprintf vfwscanf
syn keyword cAnsiFunction vfwprintf swscanf swprintf
syn keyword cAnsiFunction fwscanf fwprintf zonetime
syn keyword cAnsiFunction strfxtime strftime localtime
syn keyword cAnsiFunction gmtime ctime asctime
syn keyword cAnsiFunction time mkxtime mktime
syn keyword cAnsiFunction difftime clock strlen
syn keyword cAnsiFunction strerror memset strtok
syn keyword cAnsiFunction strstr strspn strrchr
syn keyword cAnsiFunction strpbrk strcspn strchr
syn keyword cAnsiFunction memchr strxfrm strncmp
syn keyword cAnsiFunction strcoll strcmp memcmp
syn keyword cAnsiFunction strncat strcat strncpy
syn keyword cAnsiFunction strcpy memmove memcpy
syn keyword cAnsiFunction wcstombs mbstowcs wctomb
syn keyword cAnsiFunction mbtowc mblen lldiv
syn keyword cAnsiFunction ldiv div llabs
syn keyword cAnsiFunction labs abs qsort
syn keyword cAnsiFunction bsearch system getenv
syn keyword cAnsiFunction exit atexit abort
syn keyword cAnsiFunction realloc malloc free
syn keyword cAnsiFunction calloc srand rand
syn keyword cAnsiFunction strtoull strtoul strtoll
syn keyword cAnsiFunction strtol strtold strtof
syn keyword cAnsiFunction strtod atoll atol
syn keyword cAnsiFunction atoi atof perror
syn keyword cAnsiFunction ferror feof clearerr
syn keyword cAnsiFunction rewind ftell fsetpos
syn keyword cAnsiFunction fseek fgetpos fwrite
syn keyword cAnsiFunction fread ungetc puts
syn keyword cAnsiFunction putchar putc gets
syn keyword cAnsiFunction getchar getc fputs
syn keyword cAnsiFunction fputc fgets fgetc
syn keyword cAnsiFunction vsscanf vsprintf vsnprintf
syn keyword cAnsiFunction vscanf vprintf vfscanf
syn keyword cAnsiFunction vfprintf sscanf sprintf
syn keyword cAnsiFunction snprintf scanf printf
syn keyword cAnsiFunction fscanf fprintf setvbuf
syn keyword cAnsiFunction setbuf freopen fopen
syn keyword cAnsiFunction fflush fclose tmpnam
syn keyword cAnsiFunction tmpfile rename remove
syn keyword cAnsiFunction offsetof va_start va_end
syn keyword cAnsiFunction va_copy va_arg raise signal
syn keyword cAnsiFunction longjmp setjmp isunordered
syn keyword cAnsiFunction islessgreater islessequal isless
syn keyword cAnsiFunction isgreaterequal isgreater fmal
syn keyword cAnsiFunction fmaf fma fminl
syn keyword cAnsiFunction fminf fmin fmaxl
syn keyword cAnsiFunction fmaxf fmax fdiml
syn keyword cAnsiFunction fdimf fdim nextafterxl
syn keyword cAnsiFunction nextafterxf nextafterx nextafterl
syn keyword cAnsiFunction nextafterf nextafter nanl
syn keyword cAnsiFunction nanf nan copysignl
syn keyword cAnsiFunction copysignf copysign remquol
syn keyword cAnsiFunction remquof remquo remainderl
syn keyword cAnsiFunction remainderf remainder fmodl
syn keyword cAnsiFunction fmodf fmod truncl
syn keyword cAnsiFunction truncf trunc llroundl
syn keyword cAnsiFunction llroundf llround lroundl
syn keyword cAnsiFunction lroundf lround roundl
syn keyword cAnsiFunction roundf round llrintl
syn keyword cAnsiFunction llrintf llrint lrintl
syn keyword cAnsiFunction lrintf lrint rintl
syn keyword cAnsiFunction rintf rint nearbyintl
syn keyword cAnsiFunction nearbyintf nearbyint floorl
syn keyword cAnsiFunction floorf floor ceill
syn keyword cAnsiFunction ceilf ceil tgammal
syn keyword cAnsiFunction tgammaf tgamma lgammal
syn keyword cAnsiFunction lgammaf lgamma erfcl
syn keyword cAnsiFunction erfcf erfc erfl
syn keyword cAnsiFunction erff erf sqrtl
syn keyword cAnsiFunction sqrtf sqrt powl
syn keyword cAnsiFunction powf pow hypotl
syn keyword cAnsiFunction hypotf hypot fabsl
syn keyword cAnsiFunction fabsf fabs cbrtl
syn keyword cAnsiFunction cbrtf cbrt scalblnl
syn keyword cAnsiFunction scalblnf scalbln scalbnl
syn keyword cAnsiFunction scalbnf scalbn modfl
syn keyword cAnsiFunction modff modf logbl
syn keyword cAnsiFunction logbf logb log2l
syn keyword cAnsiFunction log2f log2 log1pl
syn keyword cAnsiFunction log1pf log1p log10l
syn keyword cAnsiFunction log10f log10 logl
syn keyword cAnsiFunction logf log ldexpl
syn keyword cAnsiFunction ldexpf ldexp ilogbl
syn keyword cAnsiFunction ilogbf ilogb frexpl
syn keyword cAnsiFunction frexpf frexp expm1l
syn keyword cAnsiFunction expm1f expm1 exp2l
syn keyword cAnsiFunction exp2f exp2 expl
syn keyword cAnsiFunction expf exp tanhl
syn keyword cAnsiFunction tanhf tanh sinhl
syn keyword cAnsiFunction sinhf sinh coshl
syn keyword cAnsiFunction coshf cosh atanhl
syn keyword cAnsiFunction atanhf atanh asinhl
syn keyword cAnsiFunction asinhf asinh acoshl
syn keyword cAnsiFunction acoshf acosh tanl
syn keyword cAnsiFunction tanf tan sinl
syn keyword cAnsiFunction sinf sin cosl
syn keyword cAnsiFunction cosf cos atan2l
syn keyword cAnsiFunction atan2f atan2 atanl
syn keyword cAnsiFunction atanf atan asinl
syn keyword cAnsiFunction asinf asin acosl
syn keyword cAnsiFunction acosf acos signbit
syn keyword cAnsiFunction isnormal isnan isinf
syn keyword cAnsiFunction isfinite fpclassify localeconv
syn keyword cAnsiFunction setlocale wcstoumax wcstoimax
syn keyword cAnsiFunction strtoumax strtoimax feupdateenv
syn keyword cAnsiFunction fesetenv feholdexcept fegetenv
syn keyword cAnsiFunction fesetround fegetround fetestexcept
syn keyword cAnsiFunction fesetexceptflag feraiseexcept fegetexceptflag
syn keyword cAnsiFunction feclearexcept toupper tolower
syn keyword cAnsiFunction isxdigit isupper isspace
syn keyword cAnsiFunction ispunct isprint islower
syn keyword cAnsiFunction isgraph isdigit iscntrl
syn keyword cAnsiFunction isalpha isalnum creall
syn keyword cAnsiFunction crealf creal cprojl
syn keyword cAnsiFunction cprojf cproj conjl
syn keyword cAnsiFunction conjf conj cimagl
syn keyword cAnsiFunction cimagf cimag cargl
syn keyword cAnsiFunction cargf carg csqrtl
syn keyword cAnsiFunction csqrtf csqrt cpowl
syn keyword cAnsiFunction cpowf cpow cabsl
syn keyword cAnsiFunction cabsf cabs clogl
syn keyword cAnsiFunction clogf clog cexpl
syn keyword cAnsiFunction cexpf cexp ctanhl
syn keyword cAnsiFunction ctanhf ctanh csinhl
syn keyword cAnsiFunction csinhf csinh ccoshl
syn keyword cAnsiFunction ccoshf ccosh catanhl
syn keyword cAnsiFunction catanhf catanh casinhl
syn keyword cAnsiFunction casinhf casinh cacoshl
syn keyword cAnsiFunction cacoshf cacosh ctanl
syn keyword cAnsiFunction ctanf ctan csinl
syn keyword cAnsiFunction csinf csin ccosl
syn keyword cAnsiFunction ccosf ccos catanl
syn keyword cAnsiFunction catanf catan casinl
syn keyword cAnsiFunction casinf casin cacosl
syn keyword cAnsiFunction cacosf cacos assert
syn keyword cAnsiFunction UINTMAX_C INTMAX_C UINT64_C
syn keyword cAnsiFunction UINT32_C UINT16_C UINT8_C
syn keyword cAnsiFunction INT64_C INT32_C INT16_C INT8_C
" Common ANSI-standard Names
syn keyword cAnsiName PRId8 PRIi16 PRIo32 PRIu64
syn keyword cAnsiName PRId16 PRIi32 PRIo64 PRIuLEAST8
syn keyword cAnsiName PRId32 PRIi64 PRIoLEAST8 PRIuLEAST16
syn keyword cAnsiName PRId64 PRIiLEAST8 PRIoLEAST16 PRIuLEAST32
syn keyword cAnsiName PRIdLEAST8 PRIiLEAST16 PRIoLEAST32 PRIuLEAST64
syn keyword cAnsiName PRIdLEAST16 PRIiLEAST32 PRIoLEAST64 PRIuFAST8
syn keyword cAnsiName PRIdLEAST32 PRIiLEAST64 PRIoFAST8 PRIuFAST16
syn keyword cAnsiName PRIdLEAST64 PRIiFAST8 PRIoFAST16 PRIuFAST32
syn keyword cAnsiName PRIdFAST8 PRIiFAST16 PRIoFAST32 PRIuFAST64
syn keyword cAnsiName PRIdFAST16 PRIiFAST32 PRIoFAST64 PRIuMAX
syn keyword cAnsiName PRIdFAST32 PRIiFAST64 PRIoMAX PRIuPTR
syn keyword cAnsiName PRIdFAST64 PRIiMAX PRIoPTR PRIx8
syn keyword cAnsiName PRIdMAX PRIiPTR PRIu8 PRIx16
syn keyword cAnsiName PRIdPTR PRIo8 PRIu16 PRIx32
syn keyword cAnsiName PRIi8 PRIo16 PRIu32 PRIx64
syn keyword cAnsiName PRIxLEAST8 SCNd8 SCNiFAST32 SCNuLEAST32
syn keyword cAnsiName PRIxLEAST16 SCNd16 SCNiFAST64 SCNuLEAST64
syn keyword cAnsiName PRIxLEAST32 SCNd32 SCNiMAX SCNuFAST8
syn keyword cAnsiName PRIxLEAST64 SCNd64 SCNiPTR SCNuFAST16
syn keyword cAnsiName PRIxFAST8 SCNdLEAST8 SCNo8 SCNuFAST32
syn keyword cAnsiName PRIxFAST16 SCNdLEAST16 SCNo16 SCNuFAST64
syn keyword cAnsiName PRIxFAST32 SCNdLEAST32 SCNo32 SCNuMAX
syn keyword cAnsiName PRIxFAST64 SCNdLEAST64 SCNo64 SCNuPTR
syn keyword cAnsiName PRIxMAX SCNdFAST8 SCNoLEAST8 SCNx8
syn keyword cAnsiName PRIxPTR SCNdFAST16 SCNoLEAST16 SCNx16
syn keyword cAnsiName PRIX8 SCNdFAST32 SCNoLEAST32 SCNx32
syn keyword cAnsiName PRIX16 SCNdFAST64 SCNoLEAST64 SCNx64
syn keyword cAnsiName PRIX32 SCNdMAX SCNoFAST8 SCNxLEAST8
syn keyword cAnsiName PRIX64 SCNdPTR SCNoFAST16 SCNxLEAST16
syn keyword cAnsiName PRIXLEAST8 SCNi8 SCNoFAST32 SCNxLEAST32
syn keyword cAnsiName PRIXLEAST16 SCNi16 SCNoFAST64 SCNxLEAST64
syn keyword cAnsiName PRIXLEAST32 SCNi32 SCNoMAX SCNxFAST8
syn keyword cAnsiName PRIXLEAST64 SCNi64 SCNoPTR SCNxFAST16
syn keyword cAnsiName PRIXFAST8 SCNiLEAST8 SCNu8 SCNxFAST32
syn keyword cAnsiName PRIXFAST16 SCNiLEAST16 SCNu16 SCNxFAST64
syn keyword cAnsiName PRIXFAST32 SCNiLEAST32 SCNu32 SCNxMAX
syn keyword cAnsiName PRIXFAST64 SCNiLEAST64 SCNu64 SCNxPTR
syn keyword cAnsiName PRIXMAX SCNiFAST8 SCNuLEAST8
syn keyword cAnsiName PRIXPTR SCNiFAST16 SCNuLEAST16
syn keyword cAnsiName errno environ
syn keyword cAnsiName STDC CX_LIMITED_RANGE
syn keyword cAnsiName STDC FENV_ACCESS
syn keyword cAnsiName STDC FP_CONTRACT
syn keyword cAnsiName and bitor not_eq xor
syn keyword cAnsiName and_eq compl or xor_eq
syn keyword cAnsiName bitand not or_eq
hi def link cAnsiFunction cFunction
hi def link cAnsiName cIdentifier
hi def link cFunction Function
hi def link cIdentifier Identifier
" Booleans
syn keyword cBoolean true false TRUE FALSE
hi def link cBoolean Boolean
" -----------------------------------------------------------------------------
" Additional optional highlighting
" -----------------------------------------------------------------------------
" Operators
"syn match cOperator "\(<<\|>>\|[-+*/%&^|<>!=]\)="
"syn match cOperator "<<\|>>\|&&\|||\|++\|--\|->"
"syn match cOperator "[.!~*&%<>^|=,+-]"
"syn match cOperator "/[^/*=]"me=e-1
"syn match cOperator "/$"
"syn match cOperator "&&\|||"
"syn match cOperator "[][]"
"
"" Preprocs
"syn keyword cDefined defined contained containedin=cDefine
"hi def link cDefined cDefine
"" Functions
"syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
"syn match cUserFunctionPointer "(\s*\*\s*\h\w*\s*)\(\s\|\n\)*(" contains=cDelimiter,cOperator
"
"hi def link cUserFunction cFunction
"hi def link cUserFunctionPointer cFunction
"
"" Delimiters
"syn match cDelimiter "[();\\]"
"" foldmethod=syntax fix, courtesy of Ivan Freitas
"syn match cBraces display "[{}]"
" Links
"hi def link cDelimiter Delimiter
" foldmethod=syntax fix, courtesy of Ivan Freitas
"hi def link cBraces Delimiter
" Vim syntax file " Vim syntax file
" Language: C Additions " Language: C Additions
" Maintainer: Mikhail Wolfson <mywolfson@gmail.com> " Maintainer: Mikhail Wolfson <mywolfson@gmail.com>

View File

@ -2,16 +2,18 @@
" Language: C++ Additions " Language: C++ Additions
" Maintainer: Jon Haggblad <jon@haeggblad.com> " Maintainer: Jon Haggblad <jon@haeggblad.com>
" URL: http://www.haeggblad.com " URL: http://www.haeggblad.com
" Last Change: 21 Apr 2014 " Last Change: 21 Sep 2014
" Version: 0.3 " Version: 0.5
" Changelog: " Changelog:
" 0.1 - initial version. " 0.1 - initial version.
" 0.2 - C++14 " 0.2 - C++14
" 0.3 - Incorporate lastest changes from Mizuchi/STL-Syntax " 0.3 - Incorporate lastest changes from Mizuchi/STL-Syntax
" 0.4 - Add template function highlight
" 0.5 - Redo template function highlight to be more robust. Add options.
" "
" Additional Vim syntax highlighting for C++ (including C++11) " Additional Vim syntax highlighting for C++ (including C++11/14)
" "
" This file contains additional syntax highlighting that I use for my C++11/14 " This file contains additional syntax highlighting that I use for C++11/14
" development in Vim. Compared to the standard syntax highlighting for C++ it " development in Vim. Compared to the standard syntax highlighting for C++ it
" adds highlighting of (user defined) functions and the containers and types " adds highlighting of (user defined) functions and the containers and types
" in the standard library / boost. " in the standard library / boost.
@ -29,21 +31,35 @@
" Based on the discussion in: " Based on the discussion in:
" http://stackoverflow.com/questions/736701/class-function-names-highlighting-in-vim " http://stackoverflow.com/questions/736701/class-function-names-highlighting-in-vim
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
" Functions
syn match cCustomParen "(" contains=cParen contains=cCppParen syn match cCustomParen "(" contains=cParen contains=cCppParen
syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen
syn match cCustomScope "::"
syn match cCustomClass "\w\+\s*::" contains=cCustomScope
hi def link cCustomFunc Function hi def link cCustomFunc Function
" Uncomment this to also highlight 'class::' and 'namespace::' " Template functions
"hi def link cCustomClass Function if exists('g:cpp_experimental_template_highlight') && g:cpp_experimental_template_highlight
syn region cCustomAngleBrackets matchgroup=AngleBracketContents start="\v%(<operator\_s*)@<!%(%(\_i|template\_s*)@<=\<[<=]@!|\<@<!\<[[:space:]<=]@!)" end='>' contains=@cppSTLgroup,cppStructure,cType,cCustomClass,cCustomAngleBrackets,cNumbers
syn match cCustomBrack "<\|>" contains=cCustomAngleBrackets
syn match cCustomTemplateFunc "\w\+\s*<.*>(\@=" contains=cCustomBrack,cCustomAngleBrackets
hi def link cCustomTemplateFunc Function
endif
" Class and namespace scope
if exists('g:cpp_class_scope_highlight') && g:cpp_class_scope_highlight
syn match cCustomScope "::"
syn match cCustomClass "\w\+\s*::" contains=cCustomScope
hi def link cCustomClass Function " disabled for now
endif
" Alternative syntax that is used in: " Alternative syntax that is used in:
" http://www.vim.org/scripts/script.php?script_id=3064 " http://www.vim.org/scripts/script.php?script_id=3064
"syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine "syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
"hi def link cCustomFunc Function "hi def link cCustomFunc Function
" Cluster for all the stdlib functions defined below
syn cluster cppSTLgroup contains=cppSTLfunction,cppSTLfunctional,cppSTLconstant,cppSTLnamespace,cppSTLtype,cppSTLexception,cppSTLiterator,cppSTLiterator_tagcppSTLenumcppSTLioscppSTLcast
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
" Standard library types and functions. " Standard library types and functions.
" "
@ -1294,6 +1310,8 @@ if !exists("cpp_no_cpp11")
syntax keyword cppSTLtype minutes syntax keyword cppSTLtype minutes
syntax keyword cppSTLtype hours syntax keyword cppSTLtype hours
"raw string literals
syntax region cppRawString matchgroup=cppRawDelimiter start=@\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(@ end=/)\z1"/ contains=@Spell
endif " C++11 endif " C++11
if !exists("cpp_no_cpp14") if !exists("cpp_no_cpp14")
@ -1338,5 +1356,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppSTLenum Typedef HiLink cppSTLenum Typedef
HiLink cppSTLios Function HiLink cppSTLios Function
HiLink cppSTLcast Statement " be consistent with official syntax HiLink cppSTLcast Statement " be consistent with official syntax
HiLink cppRawString String
HiLink cppRawDelimiter Delimiter
delcommand HiLink delcommand HiLink
endif endif

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL
@ -18,8 +18,10 @@ if !g:less_html_style_tags
endif endif
" Unset (but preserve) so that less will run. " Unset (but preserve) so that less will run.
let s:pre_less_cur_syn = b:current_syntax if exists("b:current_syntax")
unlet b:current_syntax let s:pre_less_cur_syn = b:current_syntax
unlet b:current_syntax
endif
" Inspired by code from github.com/kchmck/vim-coffee-script " Inspired by code from github.com/kchmck/vim-coffee-script
" and the html syntax file included with vim 7.4. " and the html syntax file included with vim 7.4.
@ -30,7 +32,9 @@ syn include @htmlLess syntax/less.vim
syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end=+</style>+ contains=@htmlLess,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc containedin=htmlHead syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end=+</style>+ contains=@htmlLess,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc containedin=htmlHead
" Reset since 'less' isn't really the current_syntax. " Reset since 'less' isn't really the current_syntax.
let b:current_syntax = s:pre_less_cur_syn if exists("s:pre_less_cur_syn")
let b:current_syntax = s:pre_less_cur_syn
endif
" Language: Colorful CSS Color Preview " Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de> " Author: Aristotle Pagaltzis <pagaltzis@gmx.de>

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL

View File

@ -178,14 +178,14 @@ function! s:WithPath(func, ...)
call mkdir(tmpdir) call mkdir(tmpdir)
let save_cwd = getcwd() let save_cwd = getcwd()
silent exe 'lcd' tmpdir silent exe 'lcd' fnameescape(tmpdir)
let path = 'unnamed.rs' let path = 'unnamed.rs'
let save_mod = &mod let save_mod = &mod
set nomod set nomod
silent exe 'keepalt write! ' . path silent exe 'keepalt write! ' . fnameescape(path)
if pathisempty if pathisempty
silent keepalt 0file silent keepalt 0file
endif endif
@ -197,7 +197,7 @@ function! s:WithPath(func, ...)
finally finally
if exists("save_mod") | let &mod = save_mod | endif if exists("save_mod") | let &mod = save_mod | endif
if exists("save_write") | let &write = save_write | endif if exists("save_write") | let &write = save_write | endif
if exists("save_cwd") | silent exe 'lcd' save_cwd | endif if exists("save_cwd") | silent exe 'lcd' fnameescape(save_cwd) | endif
if exists("tmpdir") | silent call s:RmDir(tmpdir) | endif if exists("tmpdir") | silent call s:RmDir(tmpdir) | endif
endtry endtry
endfunction endfunction

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL

49
compiler/cargo.vim Normal file
View File

@ -0,0 +1,49 @@
" Vim compiler file
" Compiler: Cargo Compiler
" Maintainer: Damien Radtke <damienradtke@gmail.com>
" Latest Revision: 2014 Sep 18
if exists("current_compiler")
finish
endif
let current_compiler = "cargo"
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet errorformat&
CompilerSet makeprg=cargo\ $*
" Allow a configurable global Cargo.toml name. This makes it easy to
" support variations like 'cargo.toml'.
if !exists('g:cargo_toml_name')
let g:cargo_toml_name = 'Cargo.toml'
endif
let s:toml_dir = fnamemodify(findfile(g:cargo_toml_name, '.;'), ':p:h').'/'
if s:toml_dir != ''
augroup cargo
au!
au QuickfixCmdPost make call s:FixPaths()
augroup END
" FixPaths() is run after Cargo, and is used to change the file paths
" to be relative to the current directory instead of Cargo.toml.
function! s:FixPaths()
let qflist = getqflist()
for qf in qflist
if !qf['valid']
continue
endif
let filename = bufname(qf['bufnr'])
if stridx(filename, s:toml_dir) == -1
let filename = s:toml_dir.filename
endif
let qf['filename'] = simplify(s:toml_dir.bufname(qf['bufnr']))
call remove(qf, 'bufnr')
endfor
call setqflist(qflist, 'r')
endfunction
endif

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL

View File

@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber
CompilerSet errorformat= CompilerSet errorformat=
\%W%m\ (Cucumber::Undefined), \%W%m\ (Cucumber::Undefined),
\%E%m\ (%.%#), \%E%m\ (%\\S%#),
\%Z%f:%l, \%Z%f:%l,
\%Z%f:%l:%.%# \%Z%f:%l:%.%#

View File

@ -1,5 +1,5 @@
au BufRead,BufNewFile *.ino,*.pde set filetype=arduino au BufRead,BufNewFile *.ino,*.pde set filetype=arduino
autocmd BufRead,BufNewFile *.blade.php set filetype=blade au BufNewFile,BufRead *.blade.php set filetype=blade
autocmd BufNewFile,BufRead *.clj,*.cljs,*.edn setlocal filetype=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
@ -18,6 +18,12 @@ au BufRead,BufNewFile *.eex set filetype=eelixir
au FileType eelixir setl sw=2 sts=2 et iskeyword+=!,? au FileType eelixir setl sw=2 sts=2 et iskeyword+=!,?
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
au FileType elixir setl sw=2 sts=2 et iskeyword+=!,? au FileType elixir setl sw=2 sts=2 et iskeyword+=!,?
function! s:DetectElixir()
if getline(1) =~ '^#!.*\<elixir\>'
set filetype=elixir
endif
endfunction
autocmd BufNewFile,BufRead * call s:DetectElixir()
autocmd BufNewFile,BufRead *.em set filetype=ember-script autocmd BufNewFile,BufRead *.em set filetype=ember-script
autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab
autocmd BufNewFile,BufRead *.emblem set filetype=emblem autocmd BufNewFile,BufRead *.emblem set filetype=emblem
@ -104,7 +110,8 @@ autocmd BufRead *.html
\ set filetype=mason | \ set filetype=mason |
\ endif \ endif
if has("autocmd") if has("autocmd")
au BufNewFile,BufRead *.mustache,*.handlebars,*.hbs,*.hogan,*.hulk,*.hjs set filetype=html syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim au BufNewFile,BufRead *.mustache,*.hogan,*.hulk,*.hjs set filetype=html.mustache syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
au BufNewFile,BufRead *.handlebars,*.hbs set filetype=html.handlebars syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
endif endif
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/*,*/nginx/vhosts.d/*,nginx.conf if &ft == '' | setfiletype nginx | endif au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/*,*/nginx/vhosts.d/*,nginx.conf if &ft == '' | setfiletype nginx | endif
au BufRead,BufNewFile *.cl set filetype=opencl au BufRead,BufNewFile *.cl set filetype=opencl

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL
@ -13,6 +13,7 @@ call coffee#CoffeeSetUpVariables()
setlocal formatoptions-=t formatoptions+=croql setlocal formatoptions-=t formatoptions+=croql
setlocal comments=:# commentstring=#\ %s setlocal comments=:# commentstring=#\ %s
setlocal omnifunc=javascriptcomplete#CompleteJS setlocal omnifunc=javascriptcomplete#CompleteJS
setlocal suffixesadd+=coffee
" Create custom augroups. " Create custom augroups.
augroup CoffeeBufUpdate | augroup END augroup CoffeeBufUpdate | augroup END
@ -330,7 +331,7 @@ function! s:CoffeeLint(startline, endline, bang, args)
endif endif
let output = system(g:coffee_linter . let output = system(g:coffee_linter .
\ ' -s --csv' . \ ' -s --reporter csv' .
\ ' ' . b:coffee_litcoffee . \ ' ' . b:coffee_litcoffee .
\ ' ' . g:coffee_lint_options . \ ' ' . g:coffee_lint_options .
\ ' ' . a:args . \ ' ' . a:args .
@ -394,11 +395,11 @@ if !exists('b:coffee_run_buf')
call s:CoffeeRunResetVars() call s:CoffeeRunResetVars()
endif endif
command! -range=% -bar -nargs=* -complete=customlist,s:CoffeeComplete command! -buffer -range=% -bar -nargs=* -complete=customlist,s:CoffeeComplete
\ CoffeeCompile call s:CoffeeCompile(<line1>, <line2>, <q-args>) \ CoffeeCompile call s:CoffeeCompile(<line1>, <line2>, <q-args>)
command! -bar -nargs=* -complete=customlist,s:CoffeeComplete command! -buffer -bar -nargs=* -complete=customlist,s:CoffeeComplete
\ CoffeeWatch call s:CoffeeWatch(<q-args>) \ CoffeeWatch call s:CoffeeWatch(<q-args>)
command! -range=% -bar -nargs=* CoffeeRun command! -buffer -range=% -bar -nargs=* CoffeeRun
\ call s:CoffeeRun(<line1>, <line2>, <q-args>) \ call s:CoffeeRun(<line1>, <line2>, <q-args>)
command! -range=% -bang -bar -nargs=* CoffeeLint command! -buffer -range=% -bang -bar -nargs=* CoffeeLint
\ call s:CoffeeLint(<line1>, <line2>, <q-bang>, <q-args>) \ call s:CoffeeLint(<line1>, <line2>, <q-bang>, <q-args>)

View File

@ -517,7 +517,13 @@ fu! <sid>WColumn(...) "{{{3
" Return on which column the cursor is " Return on which column the cursor is
let _cur = getpos('.') let _cur = getpos('.')
if !exists("b:csv_fixed_width_cols") if !exists("b:csv_fixed_width_cols")
if line('.') > 1 && mode('') != 'n'
" in insert mode, get line from above, just in case the current
" line is empty
let line = getline(line('.')-1)
else
let line=getline('.') let line=getline('.')
endif
" move cursor to end of field " move cursor to end of field
"call search(b:col, 'ec', line('.')) "call search(b:col, 'ec', line('.'))
call search(b:col, 'ec') call search(b:col, 'ec')
@ -2398,6 +2404,9 @@ fu! csv#EvalColumn(nr, func, first, last) range "{{{3
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)
if col == 0
let col = 1
endif
" 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
let stop = a:last - 1 + s:csv_fold_headerline let stop = a:last - 1 + s:csv_fold_headerline
@ -2517,7 +2526,17 @@ fu! CSV_CloseBuffer(buffer) "{{{3
endtry endtry
endfu endfu
fu! CSVSum(col, fmt, first, last) "{{{3
let first = a:first
let last = a:last
if empty(first)
let first = 1
endif
if empty(last)
let last = line('$')
endif
return csv#EvalColumn(a:col, '<sid>SumColumn', first, last)
endfu
" Initialize Plugin "{{{2 " Initialize Plugin "{{{2
let b:csv_start = exists("b:csv_start") ? b:csv_start : 1 let b:csv_start = exists("b:csv_start") ? b:csv_start : 1
let b:csv_end = exists("b:csv_end") ? b:csv_end : line('$') let b:csv_end = exists("b:csv_end") ? b:csv_end : line('$')

View File

@ -39,6 +39,9 @@ function s:SetErlangOptions()
setlocal omnifunc=erlangcomplete#Complete setlocal omnifunc=erlangcomplete#Complete
endif endif
setlocal comments=:%%%,:%%,:%
setlocal commentstring=%%s
setlocal foldmethod=expr setlocal foldmethod=expr
setlocal foldexpr=GetErlangFold(v:lnum) setlocal foldexpr=GetErlangFold(v:lnum)
setlocal foldtext=ErlangFoldText() setlocal foldtext=ErlangFoldText()

View File

@ -4,4 +4,4 @@
" License: MIT " License: MIT
" Changes: Add - to keyword " Changes: Add - to keyword
setlocal iskeyword+=- " setlocal iskeyword+=-

View File

@ -367,6 +367,7 @@ function! s:ExtractLabels()
" Ignore cref entries (because they are duplicates) " Ignore cref entries (because they are duplicates)
if curname =~# "@cref$" if curname =~# "@cref$"
let [lblline, lblbegin] = searchpos( '\\newlabel{', 'ecW' )
continue continue
endif endif

View File

@ -156,7 +156,7 @@ let s:notcomment = '\%(\%(\\\@<!\%(\\\\\)*\)\@<=%.*\)\@<!'
let s:envbeginpattern = s:notcomment . s:notbslash . '\\begin\s*{.\{-}}' let s:envbeginpattern = s:notcomment . s:notbslash . '\\begin\s*{.\{-}}'
let s:envendpattern = s:notcomment . s:notbslash . '\\end\s*{.\{-}}' let s:envendpattern = s:notcomment . s:notbslash . '\\end\s*{.\{-}}'
let s:foldparts = '^\s*\\\%(' . join(g:LatexBox_fold_parts, '\|') . '\)' let s:foldparts = '^\s*\\\%(' . join(g:LatexBox_fold_parts, '\|') . '\)'
let s:folded = '\(% Fake\|\\\(document\|begin\|end\|' let s:folded = '\(% Fake\|\\\(document\|begin\|end\|paragraph\|'
\ . 'front\|main\|back\|app\|sub\|section\|chapter\|part\)\)' \ . 'front\|main\|back\|app\|sub\|section\|chapter\|part\)\)'
function! LatexBox_FoldLevel(lnum) function! LatexBox_FoldLevel(lnum)
@ -193,6 +193,10 @@ function! LatexBox_FoldLevel(lnum)
endif endif
" Fold environments " Fold environments
if line =~# s:envbeginpattern && line =~# s:envendpattern
" If the begin and end pattern are on the same line , do not fold
return "="
else
if line =~# s:envbeginpattern if line =~# s:envbeginpattern
if g:LatexBox_fold_envs == 1 if g:LatexBox_fold_envs == 1
return "a1" return "a1"
@ -216,6 +220,7 @@ function! LatexBox_FoldLevel(lnum)
endif endif
endif endif
endif endif
endif
" Return foldlevel of previous line " Return foldlevel of previous line
return "=" return "="
@ -288,7 +293,7 @@ function! LatexBox_FoldText_title()
endif endif
" Parts, sections and fakesections " Parts, sections and fakesections
let sections = '\(\(sub\)*section\|part\|chapter\)' let sections = '\(\(sub\)*\(section\|paragraph\)\|part\|chapter\)'
let secpat1 = '^\s*\\' . sections . '\*\?\s*{' let secpat1 = '^\s*\\' . sections . '\*\?\s*{'
let secpat2 = '^\s*\\' . sections . '\*\?\s*\[' let secpat2 = '^\s*\\' . sections . '\*\?\s*\['
if line =~ '\\frontmatter' if line =~ '\\frontmatter'

View File

@ -23,6 +23,9 @@ endif
if ! exists('g:LatexBox_quickfix') if ! exists('g:LatexBox_quickfix')
let g:LatexBox_quickfix = 1 let g:LatexBox_quickfix = 1
endif endif
if ! exists('g:LatexBox_personal_latexmkrc')
let g:LatexBox_personal_latexmkrc = 0
endif
" }}} " }}}
@ -177,7 +180,9 @@ function! LatexBox_Latexmk(force)
let cmd = 'cd ' . texroot . ' && ' let cmd = 'cd ' . texroot . ' && '
endif endif
let cmd .= env . ' latexmk' let cmd .= env . ' latexmk'
if ! g:LatexBox_personal_latexmkrc
let cmd .= ' -' . g:LatexBox_output_type let cmd .= ' -' . g:LatexBox_output_type
endif
let cmd .= ' -quiet ' let cmd .= ' -quiet '
let cmd .= g:LatexBox_latexmk_options let cmd .= g:LatexBox_latexmk_options
if a:force if a:force

View File

@ -87,8 +87,12 @@ function! s:TOCActivate(close)
endfor endfor
" Find section in buffer (or inputted files) " Find section in buffer (or inputted files)
call s:TOCFindMatch('\\' . entry['level'] . '\_\s*{' . titlestr . '}', if entry['level'] == 'label'
\ duplicates, files) let re = '\(\\label\_\s*{\|label\s*=\s*\)' . titlestr . '\>'
else
let re = '\\' . entry['level'] . '\_\s*{' . titlestr . '}'
endif
call s:TOCFindMatch(re, duplicates, files)
if a:close if a:close
if g:LatexBox_split_resize if g:LatexBox_split_resize

View File

@ -1,3 +1,8 @@
if exists('g:loaded_mustache_handlebars') && g:loaded_mustache_handlebars
finish
endif
let g:loaded_mustache_handlebars = 1
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim

View File

@ -277,12 +277,12 @@ function! RubyBalloonexpr()
endfunction endfunction
function! s:searchsyn(pattern,syn,flags,mode) function! s:searchsyn(pattern,syn,flags,mode)
let cnt = v:count1
norm! m' norm! m'
if a:mode ==# 'v' if a:mode ==# 'v'
norm! gv norm! gv
endif endif
let i = 0 let i = 0
let cnt = v:count ? v:count : 1
while i < cnt while i < cnt
let i = i + 1 let i = i + 1
let line = line('.') let line = line('.')

View File

@ -1,12 +0,0 @@
" Language: Blade (Laravel)
" Maintainer: xsbeats <jwalton512@gmail.com>
" URL: http://github.com/xsbeats/vim-blade
" License: WTFPL
if exists("b:did_indent")
finish
endif
runtime! indent/html.vim
let b:did_indent = 1

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL

View File

@ -11,7 +11,8 @@ let b:did_indent = 1
setlocal nosmartindent setlocal nosmartindent
setlocal indentexpr=GetElixirIndent() setlocal indentexpr=GetElixirIndent()
setlocal indentkeys+==end,=else:,=match:,=elsif:,=catch:,=after:,=rescue: setlocal indentkeys+=0=end,0=else,0=match,0=elsif,0=catch,0=after,0=rescue
setlocal indentkeys+==->
if exists("*GetElixirIndent") if exists("*GetElixirIndent")
finish finish

View File

@ -55,7 +55,7 @@ function! HIndent(lnum)
" This is the wrong thing if you are deeply indented already and want to put " This is the wrong thing if you are deeply indented already and want to put
" a where clause on the top-level construct, but there isn't much that can " a where clause on the top-level construct, but there isn't much that can
" be done about that case... " be done about that case...
if thisl =~ '^\s*where\s*$' if thisl =~ '^\s*where\s*'
return previ + &sw return previ + &sw
endif endif
@ -175,11 +175,11 @@ function! HIndent(lnum)
return previ - &sw return previ - &sw
endif endif
" On the other hand, if the previous line is a where with some bindings " On the other hand, if the previous line is a do or where with some bindings
" following it on the same line, accommodate and align with the first non-ws " following it on the same line, accommodate and align with the first non-ws
" char after the where " char after the where
if prevl =~ '\Wwhere\s\+\w' if prevl =~ '\W\(do\|where\)\s\+\w'
let bindStart = match(prevl, '\(\Wwhere\s\+\)\@<=\w') let bindStart = match(prevl, '\(\W\(do\|where\)\s\+\)\@<=\w')
if bindStart != -1 if bindStart != -1
return bindStart return bindStart
endif endif
@ -248,7 +248,7 @@ function! s:GetAndStripTrailingComments(lnum)
let aline = getline(a:lnum) let aline = getline(a:lnum)
" We can't just remove the string literal since that leaves us with a " We can't just remove the string literal since that leaves us with a
" trailing operator (=), so replace it with a fake identifier " trailing operator (=), so replace it with a fake identifier
let noStrings = substitute(aline, '"\([^"]\|\\"\)*"', 's', '') let noStrings = substitute(aline, '"\([^"]\|\\"\)*"', '\=repeat("s", len(submatch(0)))', '')
let noLineCom = substitute(noStrings, '--.*$', '', '') let noLineCom = substitute(noStrings, '--.*$', '', '')
" If there are no fancy block comments involved, skip some of this extra " If there are no fancy block comments involved, skip some of this extra

View File

@ -187,6 +187,7 @@ if exists('g:html_exclude_tags')
endfor endfor
endif endif
let s:html_indent_tags = join(s:tags, '\|') let s:html_indent_tags = join(s:tags, '\|')
let s:html_indent_tags = s:html_indent_tags.'\|\w\+\(-\w\+\)\+'
if exists('g:html_indent_tags') if exists('g:html_indent_tags')
let s:html_indent_tags = s:html_indent_tags.'\|'.g:html_indent_tags let s:html_indent_tags = s:html_indent_tags.'\|'.g:html_indent_tags
endif endif
@ -281,7 +282,7 @@ fun! HtmlIndentGet(lnum)
if 0 < searchpair(js, '', jse, 'nWb') if 0 < searchpair(js, '', jse, 'nWb')
\ && 0 < searchpair(js, '', jse, 'nW') \ && 0 < searchpair(js, '', jse, 'nW')
" we're inside javascript " we're inside javascript
if getline(searchpair(js, '', '</script>', 'nWb')) !~ '<script [^>]*type=["'']\?text\/\(html\|template\)' if getline(searchpair(js, '', '</script>', 'nWb')) !~ '<script [^>]*type=["'']\?text\/\(html\|\(ng-\)\?template\)'
\ && getline(lnum) !~ js && getline(a:lnum) !~ jse \ && getline(lnum) !~ js && getline(a:lnum) !~ jse
if restore_ic == 0 if restore_ic == 0
setlocal noic setlocal noic

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Rust " Language: Rust
" Author: Chris Morgan <me@chrismorgan.info> " Author: Chris Morgan <me@chrismorgan.info>
" Last Change: 2013 Oct 29 " Last Change: 2014 Sep 13
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -10,7 +10,7 @@ endif
let b:did_indent = 1 let b:did_indent = 1
setlocal cindent setlocal cindent
setlocal cinoptions=L0,(0,Ws,JN,j1 setlocal cinoptions=L0,(0,Ws,J1,j1
setlocal cinkeys=0{,0},!^F,o,O,0[,0] setlocal cinkeys=0{,0},!^F,o,O,0[,0]
" Don't think cinwords will actually do anything at all... never mind " Don't think cinwords will actually do anything at all... never mind
setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,extern setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,extern
@ -151,10 +151,11 @@ function GetRustIndent(lnum)
" "
" There are probably other cases where we don't want to do this as " There are probably other cases where we don't want to do this as
" well. Add them as needed. " well. Add them as needed.
return GetRustIndent(a:lnum - 1) return indent(prevlinenum)
endif endif
" cindent doesn't do the module scope well at all; e.g.:: if !has("patch-7.4.355")
" cindent before 7.4.355 doesn't do the module scope well at all; e.g.::
" "
" static FOO : &'static [bool] = [ " static FOO : &'static [bool] = [
" true, " true,
@ -188,6 +189,7 @@ function GetRustIndent(lnum)
endif endif
endif endif
endif endif
endif
" Fall back on cindent, which does it mostly right " Fall back on cindent, which does it mostly right
return cindent(a:lnum) return cindent(a:lnum)

View File

@ -90,4 +90,35 @@ function! LatexBox_TexIndent()
endfunction endfunction
" }}} " }}}
" Restore cursor position, window position, and last search after running a
" command.
function! Latexbox_CallIndent()
" Save the current cursor position.
let cursor = getpos('.')
" Save the current window position.
normal! H
let window = getpos('.')
call setpos('.', cursor)
" Execute the command.
execute 'normal! =='
" Restore the previous window position.
call setpos('.', window)
normal! zt
" Restore the previous cursor position.
call setpos('.', cursor)
endfunction
" autocmd to call indent after completion
" 7.3.598
if v:version > 703 || (v:version == 703 && has('patch598'))
augroup LatexBox_Completion
autocmd!
autocmd CompleteDone <buffer> call Latexbox_CallIndent()
augroup END
endif
" vim:fdm=marker:ff=unix:noet:ts=4:sw=4 " vim:fdm=marker:ff=unix:noet:ts=4:sw=4

View File

@ -1,35 +1,41 @@
" Language: Blade (Laravel) " Language: Blade
" Maintainer: xsbeats <jwalton512@gmail.com> " Maintainer: Jason Walton <jwalton512@gmail.com>
" URL: http://github.com/xsbeats/vim-blade " URL: https://github.com/xsbeats/vim-blade
" License: WTFPL " License: DBAD
if exists("b:current_syntax") " Check if our syntax is already loaded
if exists('b:current_syntax') && b:current_syntax == 'blade'
finish finish
endif endif
runtime! syntax/html.vim " Include PHP
unlet b:current_syntax
runtime! syntax/php.vim runtime! syntax/php.vim
unlet b:current_syntax silent! unlet b:current_syntax
syn match bladeConditional /@\(choice\|each\|elseif\|extends\|for\|foreach\|if\|include\|lang\|section\|unless\|while\|yield\)\>\s*/ nextgroup=bladeParenBlock containedin=ALLBUT,bladeComment " Echos
syn region bladeUnescapedEcho matchgroup=bladeEchoDelim start=/@\@<!\s*{!!/ end=/!!}\s*/ oneline contains=@phpClTop containedin=ALLBUT,bladeComment
syn region bladeEscapedEcho matchgroup=bladeEchoDelim start=/@\@<!\s*{{{\@!/ end=/}}\s*/ oneline contains=@phpClTop containedin=ALLBUT,bladeComment
syn region bladeEscapedEcho matchgroup=bladeEchoDelim start=/@\@<!\s*{{{{\@!/ end=/}}}/ oneline contains=@phpClTop containedin=ALLBUT,bladeComment
syn match bladeKeyword /@\(else\|endfor\|endforeach\|endif\|endsection\|endunless\|endwhile\|overwrite\|parent\|show\|stop\)\>/ containedin=ALL,bladeComment " Structures
syn match bladeStructure /\s*@\(else\|empty\|endfor\|endforeach\|endforelse\|endif\|endpush\|endsection\|endunless\|endwhile\|overwrite\|show\|stop\)\>/
syn match bladeStructure /\s*@\(append\|choice\|each\|elseif\|extends\|for\|foreach\|forelse\|if\|include\|lang\|push\|section\|stack\|unless\|while\|yield\|\)\>\s*/ nextgroup=bladeParens
syn region bladeParens matchgroup=bladeParen start=/(/ end=/)/ contained contains=@bladeAll,@phpClTop
syn region bladeCommentBlock start="{{--" end="--}}" contains=bladeComment keepend containedin=TOP " Comments
syn match bladeComment /.*/ contained containedin=bladeCommentBlock syn region bladeComments start=/\s*{{--/ end=/--}}/ contains=bladeComment keepend
syn match bladeComment /.*/ contained containedin=bladeComments
syn region bladeEchoUnescaped matchgroup=bladeEchoDelim start="\([@|{]\)\@<!{{\(--\)\@!" end="}}" contains=@phpClInside containedin=ALLBUT,bladeComment " Clusters
syn region bladeEchoEscaped matchgroup=bladeEchoDelim start="\(@\)\@<!{{{" end="}}}" contains=@phpClInside containedin=ALLBUT,bladeComment syn cluster bladeAll contains=bladeStructure,bladeParens
syn cluster bladeStatement contains=bladeConditional,bladeKeyword
syn region bladeParenBlock start="(" end=")" contained oneline contains=bladeParenBlock,@phpClInside,@bladeStatement extend keepend
" Highlighting
hi def link bladeComment Comment hi def link bladeComment Comment
hi def link bladeConditional Conditional
hi def link bladeKeyword Keyword
hi def link bladeEchoDelim Delimiter hi def link bladeEchoDelim Delimiter
hi def link bladeParen Delimiter
hi def link bladeStructure Keyword
let b:current_syntax = 'blade'
if !exists('b:current_syntax')
let b:current_syntax = 'blade'
endif

View File

@ -1,5 +1,5 @@
" Language: CoffeeScript " Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com> " Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL

View File

@ -6,7 +6,7 @@
" Nikolai Weibull (Add CSS2 support) " Nikolai Weibull (Add CSS2 support)
" Maintainer: Jules Wang <w.jq0722@gmail.com> " Maintainer: Jules Wang <w.jq0722@gmail.com>
" URL: https://github.com/JulesWang/css.vim " URL: https://github.com/JulesWang/css.vim
" Last Change: 2013 Nov.27 " Last Change: 2014 Oct.28
" For version 5.x: Clear all syntax items " For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded " For version 6.x: Quit when a syntax file was already loaded
@ -26,18 +26,19 @@ set cpo&vim
syn case ignore syn case ignore
" All HTML4 tags " HTML4 tags
syn keyword cssTagName abbr acronym address applet area a b base syn keyword cssTagName abbr address area a b base
syn keyword cssTagName basefont bdo big blockquote body br button syn keyword cssTagName bdo blockquote body br button
syn keyword cssTagName caption center cite code col colgroup dd del syn keyword cssTagName caption cite code col colgroup dd del
syn keyword cssTagName dfn dir div dl dt em fieldset font form frame syn keyword cssTagName dfn div dl dt em fieldset form
syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i
syn keyword cssTagName iframe img input ins isindex kbd label legend li syn keyword cssTagName iframe input ins isindex kbd label legend li
syn keyword cssTagName link map menu meta noframes noscript ol optgroup syn keyword cssTagName link map menu meta noscript ol optgroup
syn keyword cssTagName option p param pre q s samp script select small syn keyword cssTagName option p param pre q s samp script small
syn keyword cssTagName span strike strong style sub sup table tbody td syn keyword cssTagName span strong sub sup tbody td
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var syn keyword cssTagName textarea tfoot th thead title tr ul u var
syn keyword cssTagName object svg syn keyword cssTagName object svg
syn match cssTagName /\<select\>\|\<style\>\|\<table\>/
" 34 HTML5 tags " 34 HTML5 tags
syn keyword cssTagName article aside audio bdi canvas command data syn keyword cssTagName article aside audio bdi canvas command data
@ -47,8 +48,8 @@ syn keyword cssTagName output progress rt rp ruby section
syn keyword cssTagName source summary time track video wbr syn keyword cssTagName source summary time track video wbr
" Tags not supported in HTML5 " Tags not supported in HTML5
syn keyword cssDeprecated acronym applet basefont big center dir " acronym applet basefont big center dir
syn keyword cssDeprecated font frame frameset noframes strike tt " font frame frameset noframes strike tt
syn match cssTagName "\*" syn match cssTagName "\*"
@ -70,10 +71,10 @@ endtry
" digits " digits
syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)" contains=cssUnitDecorators syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)" contains=cssUnitDecorators syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)" contains=cssUnitDecorators syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)" contains=cssUnitDecorators syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators
syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained
@ -116,15 +117,27 @@ syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssSt
" @font-face " @font-face
" http://www.w3.org/TR/css3-fonts/#at-font-face-rule " http://www.w3.org/TR/css3-fonts/#at-font-face-rule
syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr,cssNoise syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise
"syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>"
"syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline syn match cssFontDescriptorProp contained "\<font-family\>"
syn keyword cssFontDescriptorProp contained src syn keyword cssFontDescriptorProp contained src
syn match cssFontDescriptorProp contained "\<font-\(style\|weight\|stretch\)\>"
syn match cssFontDescriptorProp contained "\<unicode-range\>" syn match cssFontDescriptorProp contained "\<unicode-range\>"
syn keyword cssFontDescriptorAttr contained all syn match cssFontDescriptorProp contained "\<font-\(variant\|feature-settings\)\>"
" src functions
syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+" " font-sytle and font-weight attributes
syn match cssUnicodeRange contained "U+\x\+-\x\+" syn keyword cssFontDescriptorAttr contained normal italic oblique bold
" font-stretch attributes
syn match cssFontDescriptorAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
" unicode-range attributes
syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+"
syn match cssFontDescriptorAttr contained "U+\x\+-\x\+"
" font-feature-settings attributes
syn keyword cssFontDescriptorAttr contained on off
" The 16 basic color names " The 16 basic color names
syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
@ -133,23 +146,23 @@ syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon na
syn keyword cssColor contained aliceblue antiquewhite aquamarine azure syn keyword cssColor contained aliceblue antiquewhite aquamarine azure
syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood
syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan
syn match cssColor contained /dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)/ syn match cssColor contained /\<dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)\>/
syn match cssColor contained /dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)/ syn match cssColor contained /\<dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)\>/
syn match cssColor contained /darkslate\(blue\|gray\|grey\)/ syn match cssColor contained /\<darkslate\(blue\|gray\|grey\)\>/
syn match cssColor contained /dark\(turquoise\|violet\)/ syn match cssColor contained /\<dark\(turquoise\|violet\)\>/
syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick
syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold
syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink
syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen
syn keyword cssColor contained lemonchiffon limegreen linen magenta syn keyword cssColor contained lemonchiffon limegreen linen magenta
syn match cssColor contained /light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)/ syn match cssColor contained /\<light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)\>/
syn match cssColor contained /light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)/ syn match cssColor contained /\<light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)\>/
syn match cssColor contained /light\(slategray\|slategrey\|steelblue\)/ syn match cssColor contained /\<light\(slategray\|slategrey\|steelblue\)\>/
syn match cssColor contained /medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)/ syn match cssColor contained /\<medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)\>/
syn match cssColor contained /medium\(slateblue\|springgreen\|turquoise\|violetred\)/ syn match cssColor contained /\<medium\(slateblue\|springgreen\|turquoise\|violetred\)\>/
syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite
syn keyword cssColor contained oldlace olivedrab orange orangered orchid syn keyword cssColor contained oldlace olivedrab orange orangered orchid
syn match cssColor contained /pale\(goldenrod\|green\|turquoise\|violetred\)/ syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/
syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue
syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown
syn keyword cssColor contained seagreen seashell sienna skyblue slateblue syn keyword cssColor contained seagreen seashell sienna skyblue slateblue
@ -265,6 +278,7 @@ syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
" CSS Fonts Module Level 3 " CSS Fonts Module Level 3
" http://www.w3.org/TR/css-fonts-3/ " http://www.w3.org/TR/css-fonts-3/
syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>" syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>"
" font attributes " font attributes
syn keyword cssFontAttr contained icon menu caption syn keyword cssFontAttr contained icon menu caption
syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" syn match cssFontAttr contained "\<small-\(caps\|caption\)\>"
@ -272,27 +286,21 @@ syn match cssFontAttr contained "\<message-box\>"
syn match cssFontAttr contained "\<status-bar\>" syn match cssFontAttr contained "\<status-bar\>"
syn keyword cssFontAttr contained larger smaller syn keyword cssFontAttr contained larger smaller
syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>"
" font-family attributes " font-family attributes
syn match cssFontAttr contained "\<\(sans-\)\=serif\>" syn match cssFontAttr contained "\<\(sans-\)\=serif\>"
syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Unicode Verdana Webdings Wingdings York Zapf syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf
syn keyword cssFontAttr contained cursive fantasy monospace syn keyword cssFontAttr contained cursive fantasy monospace
" font-feature-settings attributes " font-feature-settings attributes
syn keyword cssFontAttr contained on off syn keyword cssFontAttr contained on off
" font-stretch attributes " font-stretch attributes
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
" font-style attributes " font-style attributes
syn keyword cssFontAttr contained italic oblique syn keyword cssFontAttr contained italic oblique
" font-synthesis attributes
" font-variant-caps attributes syn keyword cssFontAttr contained weight style
syn match cssFontAttr contained "\<\(all-\)\=\(small-\|petite-\|titling-\)caps\>"
syn keyword cssFontAttr contained unicase
" font-weight attributes " font-weight attributes
syn keyword cssFontAttr contained bold bolder lighter syn keyword cssFontAttr contained bold bolder lighter
" TODO: font-variant-* attributes
"------------------------------------------------ "------------------------------------------------
" Webkit specific property/attributes " Webkit specific property/attributes

View File

@ -7,8 +7,6 @@ if exists("b:current_syntax")
finish finish
endif endif
let b:current_syntax = "dockerfile"
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/
@ -20,3 +18,14 @@ highlight link dockerfileString String
syntax match dockerfileComment "\v^\s*#.*$" syntax match dockerfileComment "\v^\s*#.*$"
highlight link dockerfileComment Comment highlight link dockerfileComment Comment
syntax include @DockerSh syntax/sh.vim
try
syntax include @DockerSh after/syntax/sh.vim
catch
endtry
syntax region dockerShSnip matchgroup=DockerShGroup start="^\s*\%(RUN\|CMD\)\s\+" end="$" contains=@DockerSh
highlight link DockerShGroup dockerfileKeyword
let b:current_syntax = "dockerfile"

View File

@ -63,14 +63,14 @@ syn match elixirRegexQuantifier "[*?+][?+]\=" contained display
syn match elixirRegexQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display syn match elixirRegexQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained display syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained display
syn region elixirRegex matchgroup=elixirDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial
syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
syn region elixirString matchgroup=elixirDelimiter start="'" end="'" skip="\\'" syn region elixirString matchgroup=elixirStringDelimiter start="'" end="'" skip="\\'"
syn region elixirString matchgroup=elixirDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained syn region elixirString matchgroup=elixirStringDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained
syn region elixirInterpolation matchgroup=elixirDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop
syn region elixirDocStringStart matchgroup=elixirDocString start=+"""+ end=+$+ oneline contains=ALLBUT,@elixirNotTop syn region elixirDocStringStart matchgroup=elixirDocString start=+"""+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
syn region elixirDocStringStart matchgroup=elixirDocString start=+'''+ end=+$+ oneline contains=ALLBUT,@elixirNotTop syn region elixirDocStringStart matchgroup=elixirDocString start=+'''+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
@ -83,25 +83,25 @@ syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|
syn region elixirBlock matchgroup=elixirKeyword start="\<do\>\(:\)\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold syn region elixirBlock matchgroup=elixirKeyword start="\<do\>\(:\)\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirAnonymousFunction matchgroup=elixirKeyword start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold syn region elixirAnonymousFunction matchgroup=elixirKeyword start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirDelimiter syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigilDelimiter
syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" fold contains=@elixirStringContained,elixirRegexEscapePunctuation syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l<" end=">" skip="\\\\\|\\>" fold contains=@elixirStringContained,elixirRegexEscapePunctuation syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l<" end=">" skip="\\\\\|\\>" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l(" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l(" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
" Sigils surrounded with docString " Sigils surrounded with docString
syn region elixirSigil matchgroup=elixirDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold
syn region elixirSigil matchgroup=elixirDelimiter start=+\~\a\z('''\)+ end=+^\s*\zs\z1+ skip=+\\'+ fold syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\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
@ -172,4 +172,7 @@ hi def link elixirRegexQuantifier elixirSpecial
hi def link elixirSpecial Special hi def link elixirSpecial Special
hi def link elixirString String hi def link elixirString String
hi def link elixirSigil String hi def link elixirSigil String
hi def link elixirDelimiter Delimiter hi def link elixirStringDelimiter Delimiter
hi def link elixirRegexDelimiter Delimiter
hi def link elixirInterpolationDelimiter Delimiter
hi def link elixirSigilDelimiter Delimiter

View File

@ -29,40 +29,40 @@ if exists("b:current_syntax")
finish finish
endif endif
if !exists("go_highlight_array_whitespace_error") if !exists("g:go_highlight_array_whitespace_error")
let go_highlight_array_whitespace_error = 1 let g:go_highlight_array_whitespace_error = 1
endif endif
if !exists("go_highlight_chan_whitespace_error") if !exists("g:go_highlight_chan_whitespace_error")
let go_highlight_chan_whitespace_error = 1 let g:go_highlight_chan_whitespace_error = 1
endif endif
if !exists("go_highlight_extra_types") if !exists("g:go_highlight_extra_types")
let go_highlight_extra_types = 1 let g:go_highlight_extra_types = 1
endif endif
if !exists("go_highlight_space_tab_error") if !exists("g:go_highlight_space_tab_error")
let go_highlight_space_tab_error = 1 let g:go_highlight_space_tab_error = 1
endif endif
if !exists("go_highlight_trailing_whitespace_error") if !exists("g:go_highlight_trailing_whitespace_error")
let go_highlight_trailing_whitespace_error = 1 let g:go_highlight_trailing_whitespace_error = 1
endif endif
if !exists("go_highlight_operators") if !exists("g:go_highlight_operators")
let go_highlight_operators = 0 let g:go_highlight_operators = 1
endif endif
if !exists("go_highlight_functions") if !exists("g:go_highlight_functions")
let go_highlight_functions = 0 let g:go_highlight_functions = 0
endif endif
if !exists("go_highlight_methods") if !exists("g:go_highlight_methods")
let go_highlight_methods = 0 let g:go_highlight_methods = 0
endif endif
if !exists("go_highlight_structs") if !exists("g:go_highlight_structs")
let go_highlight_structs = 0 let g:go_highlight_structs = 0
endif endif
syn case match syn case match
@ -182,12 +182,12 @@ syn match goImaginary "\<\d\+[Ee][-+]\d\+i\>"
hi def link goImaginary Number hi def link goImaginary Number
" Spaces after "[]" " Spaces after "[]"
if go_highlight_array_whitespace_error != 0 if g:go_highlight_array_whitespace_error != 0
syn match goSpaceError display "\(\[\]\)\@<=\s\+" syn match goSpaceError display "\(\[\]\)\@<=\s\+"
endif endif
" Spacing errors around the 'chan' keyword " Spacing errors around the 'chan' keyword
if go_highlight_chan_whitespace_error != 0 if g:go_highlight_chan_whitespace_error != 0
" receive-only annotation on chan type " receive-only annotation on chan type
syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@=" syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@="
" send-only annotation on chan type " send-only annotation on chan type
@ -197,7 +197,7 @@ if go_highlight_chan_whitespace_error != 0
endif endif
" Extra types commonly seen " Extra types commonly seen
if go_highlight_extra_types != 0 if g:go_highlight_extra_types != 0
syn match goExtraType /\<bytes\.\(Buffer\)\>/ syn match goExtraType /\<bytes\.\(Buffer\)\>/
syn match goExtraType /\<io\.\(Reader\|Writer\|ReadWriter\|ReadWriteCloser\)\>/ syn match goExtraType /\<io\.\(Reader\|Writer\|ReadWriter\|ReadWriteCloser\)\>/
syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/ syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/
@ -205,12 +205,12 @@ if go_highlight_extra_types != 0
endif endif
" Space-tab error " Space-tab error
if go_highlight_space_tab_error != 0 if g:go_highlight_space_tab_error != 0
syn match goSpaceError display " \+\t"me=e-1 syn match goSpaceError display " \+\t"me=e-1
endif endif
" Trailing white space error " Trailing white space error
if go_highlight_trailing_whitespace_error != 0 if g:go_highlight_trailing_whitespace_error != 0
syn match goSpaceError display excludenl "\s\+$" syn match goSpaceError display excludenl "\s\+$"
endif endif
@ -227,7 +227,7 @@ hi def link goTodo Todo
" Operators; " Operators;
if go_highlight_operators != 0 if g:go_highlight_operators != 0
syn match goOperator /:=/ syn match goOperator /:=/
syn match goOperator />=/ syn match goOperator />=/
syn match goOperator /<=/ syn match goOperator /<=/
@ -246,20 +246,20 @@ endif
hi def link goOperator Operator hi def link goOperator Operator
" Functions; " Functions;
if go_highlight_functions != 0 if g:go_highlight_functions != 0
syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/ syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/
syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/ syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/
endif endif
hi def link goFunction Function hi def link goFunction Function
" Methods; " Methods;
if go_highlight_methods != 0 if g:go_highlight_methods != 0
syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/ syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/
endif endif
hi def link goMethod Type hi def link goMethod Type
" Structs; " Structs;
if go_highlight_structs != 0 if g:go_highlight_structs != 0
syn match goStruct /\(.\)\@<=\w\+\({\)\@=/ syn match goStruct /\(.\)\@<=\w\+\({\)\@=/
syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/ syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/
endif endif

View File

@ -68,7 +68,7 @@ syn keyword htmlArg contained autoplay preload controls loop poster media kind c
" <form>, <input>, <button> " <form>, <input>, <button>
syn keyword htmlArg contained form autocomplete autofocus list min max step syn keyword htmlArg contained form autocomplete autofocus list min max step
syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
syn keyword htmlArg contained required placeholder syn keyword htmlArg contained required placeholder pattern
" <command>, <details>, <time> " <command>, <details>, <time>
syn keyword htmlArg contained label icon open datetime pubdate syn keyword htmlArg contained label icon open datetime pubdate
" <script> " <script>

View File

@ -51,7 +51,7 @@ syntax match mustacheUnescape '{{{\|}}}' contained containedin=mustacheInside,@h
syntax match mustacheConditionals '\([/#]\(if\|unless\)\|else\)' contained containedin=mustacheInside syntax match mustacheConditionals '\([/#]\(if\|unless\)\|else\)' contained containedin=mustacheInside
syntax match mustacheHelpers '[/#]\(with\|each\)' contained containedin=mustacheSection syntax match mustacheHelpers '[/#]\(with\|each\)' contained containedin=mustacheSection
syntax region mustacheComment start=/{{!/rs=s+2 end=/}}/re=e-2 contains=Todo contained containedin=mustacheInside,@htmlMustacheContainer syntax region mustacheComment start=/{{!/rs=s+2 end=/}}/re=e-2 contains=Todo contained containedin=mustacheInside,@htmlMustacheContainer
syntax region mustacheBlockComment start=/{{!--/rs=s+2 end=/--}}/re=e-2 contains=Todo syntax region mustacheBlockComment start=/{{!--/rs=s+2 end=/--}}/re=e-2 contains=Todo contained containedin=mustacheInside,@htmlMustacheContainer
syntax region mustacheQString start=/'/ skip=/\\'/ end=/'/ contained containedin=mustacheInside syntax region mustacheQString start=/'/ skip=/\\'/ end=/'/ contained containedin=mustacheInside
syntax region mustacheDQString start=/"/ skip=/\\"/ end=/"/ contained containedin=mustacheInside syntax region mustacheDQString start=/"/ skip=/\\"/ end=/"/ contained containedin=mustacheInside

View File

@ -56,15 +56,15 @@ syn keyword clType cl_image_format
syn keyword clCast vec_type_hint work_group_size_hint aligned packed endian syn keyword clCast vec_type_hint work_group_size_hint aligned packed endian
syn match clCast "as_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\)(" syn match clCast "as_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\)"
syn match clCast "as_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\)\(2\|3\|4\|8\|16\)(" syn match clCast "as_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\)\(2\|3\|4\|8\|16\)"
syn match clCast "convert_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\))\(2\|3\|4\|8\|16\)(" syn match clCast "convert_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\))\(2\|3\|4\|8\|16\)"
syn match clCast "convert_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\))\(2\|3\|4\|8\|16\)_sat(" syn match clCast "convert_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\))\(2\|3\|4\|8\|16\)_sat"
syn match clCast "convert_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\))\(2\|3\|4\|8\|16\)_sat_\(rte\|rtz\|rtp\|rtn\)(" syn match clCast "convert_\(uchar\|char\|ushort\|short\|uint\|int\|ulong\|long\|float\|double\))\(2\|3\|4\|8\|16\)_sat_\(rte\|rtz\|rtp\|rtn\)"
" work item functions " work item functions
syn keyword clFunction get_work_dim get_global_size get_global_id get_local_size get_local_id get_num_groups get_group_id get_global_offset syn keyword clFunction get_work_dim get_global_size get_global_id get_local_size get_local_id get_num_groups get_group_id get_global_offset
@ -105,21 +105,21 @@ syn keyword clFunction isequal isnotequal isgreater isgreaterequal isle
" vector data load and store functions " vector data load and store functions
syn keyword clFunction vload_half vstore_half syn keyword clFunction vload_half vstore_half
syn match clFunction "vload\(2\|3\|4\|8\|16\)(" syn match clFunction "vload\(2\|3\|4\|8\|16\)"
syn match clFunction "vload_half\(2\|3\|4\|8\|16\)(" syn match clFunction "vload_half\(2\|3\|4\|8\|16\)"
syn match clFunction "vloada_half\(2\|3\|4\|8\|16\)(" syn match clFunction "vloada_half\(2\|3\|4\|8\|16\)"
syn match clFunction "vloada_half\(2\|3\|4\|8\|16\)_\(rte\|rtz\|rtp\)(" syn match clFunction "vloada_half\(2\|3\|4\|8\|16\)_\(rte\|rtz\|rtp\)"
syn match clFunction "vstore\(2\|3\|4\|8\|16\)(" syn match clFunction "vstore\(2\|3\|4\|8\|16\)"
syn match clFunction "vstore\(rte\|rtz\|rtp\|rtn\)(" syn match clFunction "vstore\(rte\|rtz\|rtp\|rtn\)"
syn match clFunction "vstore_half\(2\|3\|4\|8\|16\)(" syn match clFunction "vstore_half\(2\|3\|4\|8\|16\)"
syn match clFunction "vstore_half_\(rte\|rtz\|rtp\|rtn\)(" syn match clFunction "vstore_half_\(rte\|rtz\|rtp\|rtn\)"
syn match clFunction "vstore_half\(2\|3\|4\|8\|16\)_\(rte\|rtz\|rtp\|rtn\)(" syn match clFunction "vstore_half\(2\|3\|4\|8\|16\)_\(rte\|rtz\|rtp\|rtn\)"
syn match clFunction "vstorea_half\(2\|3\|4\|8\|16\)(" syn match clFunction "vstorea_half\(2\|3\|4\|8\|16\)"
syn match clFunction "vstorea_half\(2\|3\|4\|8\|16\)_\(rte\|rtz\|rtp\|rtn\)(" syn match clFunction "vstorea_half\(2\|3\|4\|8\|16\)_\(rte\|rtz\|rtp\|rtn\)"
" image read and write functions " image read and write functions
syn match clFunction "read_image\(f\|i\|ui\|h\)(" syn match clFunction "read_image\(f\|i\|ui\|h\)"
syn match clFunction "write_image\(f\|i\|ui\|h\)(" syn match clFunction "write_image\(f\|i\|ui\|h\)"
syn keyword clFunction get_image_width get_image_height get_image_depth get_image_channel_data_type get_image_channel_order get_image_dim syn keyword clFunction get_image_width get_image_height get_image_depth get_image_channel_data_type get_image_channel_order get_image_dim
" explicit memory fence functions " explicit memory fence functions
@ -129,7 +129,7 @@ syn keyword clFunction barrier mem_fence read_mem_fence write_mem_fence
syn keyword clFunction async_work_group_copy async_work_group__strided_copy wait_group_events prefetch syn keyword clFunction async_work_group_copy async_work_group__strided_copy wait_group_events prefetch
" atomic functions " atomic functions
syn match clFunction "atom_\(add\|sub\|xchg\|inc\|dec\|cmpxchg\|min\|max\|and\|or\|xor\)(" syn match clFunction "atom_\(add\|sub\|xchg\|inc\|dec\|cmpxchg\|min\|max\|and\|or\|xor\)"
syn keyword clConstant MAXFLOAT HUGE_VALF INFINITY NAN syn keyword clConstant MAXFLOAT HUGE_VALF INFINITY NAN
syn keyword clConstant FLT_DIG FLT_MANT_DIG FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX FLT_MAX FLT_MIN FLT_EPSILON syn keyword clConstant FLT_DIG FLT_MANT_DIG FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX FLT_MAX FLT_MIN FLT_EPSILON

View File

@ -3,7 +3,7 @@
" "
" {{{ BLOCK: Last-modified " {{{ BLOCK: Last-modified
" Thu, 14 Aug 2014 09:05:56 +0000, PHP 5.6.0RC2 " Thu, 18 Sep 2014 08:32:15 +0000, PHP 5.6.0-1+deb.sury.org~trusty+1
" }}} " }}}
" "
@ -46,6 +46,8 @@
" php_folding = 1 for folding loops, if/elseif/else, switch, try/catch, classes, and functions based on " php_folding = 1 for folding loops, if/elseif/else, switch, try/catch, classes, and functions based on
" indent, finds a } with an indent matching the structure. " indent, finds a } with an indent matching the structure.
" 2 for folding all { }, ( ), and [ ] pairs. (see known bugs ii) " 2 for folding all { }, ( ), and [ ] pairs. (see known bugs ii)
" php_phpdoc_folding = 0 Don't fold phpDoc comments (default)
" 1 Fold phpDoc comments
" php_sync_method = x " php_sync_method = x
" x=-1 to sync by search ( default ) " x=-1 to sync by search ( default )
" x>0 to sync at least x lines backwards " x>0 to sync at least x lines backwards
@ -150,6 +152,11 @@ if !exists("php_folding")
let php_folding = 0 let php_folding = 0
endif endif
" set default for php_phpdoc_folding so we don't have to keep checking its existence.
if !exists("php_phpdoc_folding")
let php_phpdoc_folding = 0
endif
" Folding Support {{{ " Folding Support {{{
" "
if php_folding==1 && has("folding") if php_folding==1 && has("folding")
@ -158,6 +165,12 @@ else
command! -nargs=+ SynFold <args> command! -nargs=+ SynFold <args>
endif endif
if php_phpdoc_folding==1 && has("folding")
command! -nargs=+ SynFoldDoc <args> fold
else
command! -nargs=+ SynFoldDoc <args>
endif
" }}} " }}}
syn case match syn case match
@ -246,7 +259,7 @@ syn keyword phpConstants ATTR_AUTOCOMMIT ATTR_CASE ATTR_CLIENT_VERSION ATTR_CONN
endif endif
if index(g:php_syntax_extensions_enabled, "pgsql") >= 0 && index(g:php_syntax_extensions_disabled, "pgsql") < 0 && ( ! exists("b:php_syntax_extensions_enabled") || index(b:php_syntax_extensions_enabled, "pgsql") >= 0) && ( ! exists("b:php_syntax_extensions_disabled") || index(b:php_syntax_extensions_disabled, "pgsql") < 0) if index(g:php_syntax_extensions_enabled, "pgsql") >= 0 && index(g:php_syntax_extensions_disabled, "pgsql") < 0 && ( ! exists("b:php_syntax_extensions_enabled") || index(b:php_syntax_extensions_enabled, "pgsql") >= 0) && ( ! exists("b:php_syntax_extensions_disabled") || index(b:php_syntax_extensions_disabled, "pgsql") < 0)
" pgsql constants " pgsql constants
syn keyword phpConstants PGSQL_ASSOC PGSQL_BAD_RESPONSE PGSQL_BOTH PGSQL_COMMAND_OK PGSQL_CONNECTION_AUTH_OK PGSQL_CONNECTION_AWAITING_RESPONSE PGSQL_CONNECTION_BAD PGSQL_CONNECTION_MADE PGSQL_CONNECTION_OK PGSQL_CONNECTION_SETENV PGSQL_CONNECTION_SSL_STARTUP PGSQL_CONNECTION_STARTED PGSQL_CONNECT_ASYNC PGSQL_CONNECT_FORCE_NEW PGSQL_CONV_FORCE_NULL PGSQL_CONV_IGNORE_DEFAULT PGSQL_CONV_IGNORE_NOT_NULL PGSQL_COPY_IN PGSQL_COPY_OUT PGSQL_DIAG_CONTEXT PGSQL_DIAG_INTERNAL_POSITION PGSQL_DIAG_INTERNAL_QUERY PGSQL_DIAG_MESSAGE_DETAIL PGSQL_DIAG_MESSAGE_HINT PGSQL_DIAG_MESSAGE_PRIMARY PGSQL_DIAG_SEVERITY PGSQL_DIAG_SOURCE_FILE PGSQL_DIAG_SOURCE_FUNCTION PGSQL_DIAG_SOURCE_LINE PGSQL_DIAG_SQLSTATE PGSQL_DIAG_STATEMENT_POSITION PGSQL_DML_ASYNC PGSQL_DML_ESCAPE PGSQL_DML_EXEC PGSQL_DML_NO_CONV PGSQL_DML_STRING PGSQL_EMPTY_QUERY PGSQL_ERRORS_DEFAULT PGSQL_ERRORS_TERSE PGSQL_ERRORS_VERBOSE PGSQL_FATAL_ERROR PGSQL_LIBPQ_VERSION PGSQL_LIBPQ_VERSION_STR PGSQL_NONFATAL_ERROR PGSQL_NUM PGSQL_POLLING_ACTIVE PGSQL_POLLING_FAILED PGSQL_POLLING_OK PGSQL_POLLING_READING PGSQL_POLLING_WRITING PGSQL_SEEK_CUR PGSQL_SEEK_END PGSQL_SEEK_SET PGSQL_STATUS_LONG PGSQL_STATUS_STRING PGSQL_TRANSACTION_ACTIVE PGSQL_TRANSACTION_IDLE PGSQL_TRANSACTION_INERROR PGSQL_TRANSACTION_INTRANS PGSQL_TRANSACTION_UNKNOWN PGSQL_TUPLES_OK contained syn keyword phpConstants PGSQL_ASSOC PGSQL_BAD_RESPONSE PGSQL_BOTH PGSQL_COMMAND_OK PGSQL_CONNECTION_AUTH_OK PGSQL_CONNECTION_AWAITING_RESPONSE PGSQL_CONNECTION_BAD PGSQL_CONNECTION_MADE PGSQL_CONNECTION_OK PGSQL_CONNECTION_SETENV PGSQL_CONNECTION_STARTED PGSQL_CONNECT_ASYNC PGSQL_CONNECT_FORCE_NEW PGSQL_CONV_FORCE_NULL PGSQL_CONV_IGNORE_DEFAULT PGSQL_CONV_IGNORE_NOT_NULL PGSQL_COPY_IN PGSQL_COPY_OUT PGSQL_DIAG_CONTEXT PGSQL_DIAG_INTERNAL_POSITION PGSQL_DIAG_INTERNAL_QUERY PGSQL_DIAG_MESSAGE_DETAIL PGSQL_DIAG_MESSAGE_HINT PGSQL_DIAG_MESSAGE_PRIMARY PGSQL_DIAG_SEVERITY PGSQL_DIAG_SOURCE_FILE PGSQL_DIAG_SOURCE_FUNCTION PGSQL_DIAG_SOURCE_LINE PGSQL_DIAG_SQLSTATE PGSQL_DIAG_STATEMENT_POSITION PGSQL_DML_ASYNC PGSQL_DML_ESCAPE PGSQL_DML_EXEC PGSQL_DML_NO_CONV PGSQL_DML_STRING PGSQL_EMPTY_QUERY PGSQL_ERRORS_DEFAULT PGSQL_ERRORS_TERSE PGSQL_ERRORS_VERBOSE PGSQL_FATAL_ERROR PGSQL_LIBPQ_VERSION PGSQL_LIBPQ_VERSION_STR PGSQL_NONFATAL_ERROR PGSQL_NUM PGSQL_POLLING_ACTIVE PGSQL_POLLING_FAILED PGSQL_POLLING_OK PGSQL_POLLING_READING PGSQL_POLLING_WRITING PGSQL_SEEK_CUR PGSQL_SEEK_END PGSQL_SEEK_SET PGSQL_STATUS_LONG PGSQL_STATUS_STRING PGSQL_TRANSACTION_ACTIVE PGSQL_TRANSACTION_IDLE PGSQL_TRANSACTION_INERROR PGSQL_TRANSACTION_INTRANS PGSQL_TRANSACTION_UNKNOWN PGSQL_TUPLES_OK contained
endif endif
if index(g:php_syntax_extensions_enabled, "phar") >= 0 && index(g:php_syntax_extensions_disabled, "phar") < 0 && ( ! exists("b:php_syntax_extensions_enabled") || index(b:php_syntax_extensions_enabled, "phar") >= 0) && ( ! exists("b:php_syntax_extensions_disabled") || index(b:php_syntax_extensions_disabled, "phar") < 0) if index(g:php_syntax_extensions_enabled, "phar") >= 0 && index(g:php_syntax_extensions_disabled, "phar") < 0 && ( ! exists("b:php_syntax_extensions_enabled") || index(b:php_syntax_extensions_enabled, "phar") >= 0) && ( ! exists("b:php_syntax_extensions_disabled") || index(b:php_syntax_extensions_disabled, "phar") < 0)
" Phar constants " Phar constants
@ -582,7 +595,7 @@ syn match phpCommentStar contained "^\s*\*$"
if !exists("php_ignore_phpdoc") || !php_ignore_phpdoc if !exists("php_ignore_phpdoc") || !php_ignore_phpdoc
syn case ignore syn case ignore
syn region phpDocComment start="/\*\*" end="\*/" keepend contains=phpCommentTitle,phpDocTags,phpTodo,@Spell SynFoldDoc 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,@Spell containedin=phpDocComment 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=phpDocComment
syn region phpDocTags start="{@\(example\|id\|internal\|inheritdoc\|link\|source\|toc\|tutorial\)" end="}" containedin=phpDocComment syn region phpDocTags start="{@\(example\|id\|internal\|inheritdoc\|link\|source\|toc\|tutorial\)" end="}" containedin=phpDocComment
@ -818,6 +831,7 @@ endif
" Cleanup: {{{ " Cleanup: {{{
delcommand SynFold delcommand SynFold
delcommand SynFoldDoc
let b:current_syntax = "php" let b:current_syntax = "php"
let &iskeyword = s:iskeyword_save let &iskeyword = s:iskeyword_save

View File

@ -27,14 +27,16 @@ syn keyword rustKeyword for in if impl let
syn keyword rustKeyword loop once proc pub syn keyword rustKeyword loop once proc 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,rustModPathInUse skipwhite skipempty syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
" FIXME: Scoped impl's name is also fallen in this category " FIXME: Scoped impl's name is also fallen in this category
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
syn keyword rustStorage mut ref static const syn keyword rustStorage mut ref static const
syn keyword rustInvalidBareKeyword crate syn keyword rustInvalidBareKeyword crate
syn keyword rustExternCrate crate contained nextgroup=rustIdentifier skipwhite skipempty syn keyword rustExternCrate crate contained nextgroup=rustIdentifier,rustExternCrateString skipwhite skipempty
" This is to get the `bar` part of `extern crate "foo" as bar;` highlighting.
syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifier skipwhite transparent skipempty contains=rustString,rustOperator
syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
@ -54,7 +56,7 @@ syn match rustMacroRepeatCount ".\?[*+]" contained
syn match rustMacroVariable "$\w\+" syn match rustMacroVariable "$\w\+"
" Reserved (but not yet used) keywords {{{2 " Reserved (but not yet used) keywords {{{2
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override
" Built-in types {{{2 " Built-in types {{{2
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32 syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
@ -91,7 +93,7 @@ syn keyword rustEnum Ordering
syn keyword rustEnumVariant Less Equal Greater syn keyword rustEnumVariant Less Equal Greater
syn keyword rustTrait Collection Mutable Map MutableMap MutableSeq syn keyword rustTrait Collection Mutable Map MutableMap MutableSeq
syn keyword rustTrait Set MutableSet syn keyword rustTrait Set MutableSet
syn keyword rustTrait FromIterator Extendable ExactSize syn keyword rustTrait FromIterator IntoIterator Extend ExactSize
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
@ -131,9 +133,7 @@ syn keyword rustBoolean true false
" If foo::bar changes to foo.bar, change this ("::" to "\."). " If foo::bar changes to foo.bar, change this ("::" to "\.").
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u"). " If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3 syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
syn match rustModPathInUse "\w\(\w\)*" contained " only for 'use path;'
syn match rustModPathSep "::" syn match rustModPathSep "::"
" rustModPathInUse is split out from rustModPath so that :syn-include can get the group list right.
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1 syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>(); syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
@ -172,9 +172,10 @@ syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\=" syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
" Special case for numbers of the form "1." which are float literals, unless followed by " Special case for numbers of the form "1." which are float literals, unless followed by
" an identifier, which makes them integer literals with a method call or field access. " an identifier, which makes them integer literals with a method call or field access,
" or by another ".", which makes them integer literals followed by the ".." token.
" (This must go first so the others take precedence.) " (This must go first so the others take precedence.)
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\@!" syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!"
" To mark a number as a normal float, it must have at least one of the three things integral values don't have: " To mark a number as a normal float, it must have at least one of the three things integral values don't have:
" a decimal point and more numbers; an exponent; and a type suffix. " a decimal point and more numbers; an exponent; and a type suffix.
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\=" syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
@ -216,7 +217,7 @@ syn keyword rustTodo contained TODO FIXME XXX NB NOTE
" Folding rules {{{2 " Folding rules {{{2
" Trivial folding rules to begin with. " Trivial folding rules to begin with.
" TODO: use the AST to make really good folding " FIXME: use the AST to make really good folding
syn region rustFoldBraces start="{" end="}" transparent fold syn region rustFoldBraces start="{" end="}" transparent fold
" Default highlighting {{{1 " Default highlighting {{{1
@ -252,7 +253,6 @@ hi def link rustReservedKeyword Error
hi def link rustConditional Conditional hi def link rustConditional Conditional
hi def link rustIdentifier Identifier hi def link rustIdentifier Identifier
hi def link rustCapsIdent rustIdentifier hi def link rustCapsIdent rustIdentifier
hi def link rustModPathInUse rustModPath
hi def link rustModPath Include hi def link rustModPath Include
hi def link rustModPathSep Delimiter hi def link rustModPathSep Delimiter
hi def link rustFunction Function hi def link rustFunction Function

View File

@ -46,6 +46,7 @@ syn match sdUnitKey contained /^Documentation=/ nextgroup=sdDocURI
syn match sdUnitKey contained /^SourcePath=/ nextgroup=sdFilename,sdErr syn match sdUnitKey contained /^SourcePath=/ nextgroup=sdFilename,sdErr
syn match sdUnitKey contained /^\%(Requires\|RequiresOverridable\|Requisite\|RequisiteOverridable\|Wants\|BindsTo\|PartOf\|Conflicts\|Before\|After\|OnFailure\|Names|PropagatesReloadTo\|ReloadPropagatedFrom\)=/ nextgroup=sdUnitList syn match sdUnitKey contained /^\%(Requires\|RequiresOverridable\|Requisite\|RequisiteOverridable\|Wants\|BindsTo\|PartOf\|Conflicts\|Before\|After\|OnFailure\|Names|PropagatesReloadTo\|ReloadPropagatedFrom\)=/ nextgroup=sdUnitList
syn match sdUnitKey contained /^\%(OnFailureIsolate\|IgnoreOnIsolate\|IgnoreOnSnapshot\|StopWhenUnneeded\|RefuseManualStart\|RefuseManualStop\|AllowIsolate\|DefaultDependencies\)=/ nextgroup=sdBool,sdErr syn match sdUnitKey contained /^\%(OnFailureIsolate\|IgnoreOnIsolate\|IgnoreOnSnapshot\|StopWhenUnneeded\|RefuseManualStart\|RefuseManualStop\|AllowIsolate\|DefaultDependencies\)=/ nextgroup=sdBool,sdErr
syn match sdUnitKey contained /^OnFailureJobMode=/ nextgroup=sdFailJobMode,sdErr
syn match sdUnitKey contained /^JobTimeoutSec=/ nextgroup=sdDuration,sdErr syn match sdUnitKey contained /^JobTimeoutSec=/ nextgroup=sdDuration,sdErr
" ConditionXXX. Note that they all have an optional '|' after the '=' " ConditionXXX. Note that they all have an optional '|' after the '='
syn match sdUnitKey contained /^Condition\(PathExists\|PathExistsGlob\|PathIsDirectory\|PathIsMountPoint\|PathIsReadWrite\|PathIsSymbolicLink\|DirectoryNotEmpty\|FileNotEmpty\|FileIsExecutable\)=|\=!\=/ contains=sdConditionFlag nextgroup=sdFilename,sdErr syn match sdUnitKey contained /^Condition\(PathExists\|PathExistsGlob\|PathIsDirectory\|PathIsMountPoint\|PathIsReadWrite\|PathIsSymbolicLink\|DirectoryNotEmpty\|FileNotEmpty\|FileIsExecutable\)=|\=!\=/ contains=sdConditionFlag nextgroup=sdFilename,sdErr
@ -59,6 +60,7 @@ syn match sdUnitList contained /.*/ contains=sdUnitName,sdErr
syn match sdConditionFlag contained /[!|]/ syn match sdConditionFlag contained /[!|]/
syn keyword sdVirtType contained nextgroup=sdErr vm container qemu kvm vmware microsoft oracle xen bochs chroot openvz lxc lxc-libvirt systemd-nspawn syn keyword sdVirtType contained nextgroup=sdErr vm container qemu kvm vmware microsoft oracle xen bochs chroot openvz lxc lxc-libvirt systemd-nspawn
syn keyword sdSecurityType contained nextgroup=sdErr selinux syn keyword sdSecurityType contained nextgroup=sdErr selinux
syn keyword sdFailJobMode contained nextgroup=sderr fail replace replace-irreversibly
syn match sdDocUri contained /\%(https\=:\/\/\|file:\|info:\|man:\)\S\+\s*/ nextgroup=sdDocUri,sdErr syn match sdDocUri contained /\%(https\=:\/\/\|file:\|info:\|man:\)\S\+\s*/ nextgroup=sdDocUri,sdErr
" [Install] {{{1 " [Install] {{{1
@ -94,6 +96,7 @@ syn match sdExecKey contained /^IOSchedulingClass=/ nextgroup=sdIOSchedClass,sdE
syn match sdExecKey contained /^IOSchedulingPriority=/ nextgroup=sdIOSchedPrio,sdErr syn match sdExecKey contained /^IOSchedulingPriority=/ nextgroup=sdIOSchedPrio,sdErr
syn match sdExecKey contained /^CPUSchedulingPolicy=/ nextgroup=sdCPUSchedPol,sdErr syn match sdExecKey contained /^CPUSchedulingPolicy=/ nextgroup=sdCPUSchedPol,sdErr
syn match sdExecKey contained /^MountFlags=/ nextgroup=sdMountFlags,sdErr syn match sdExecKey contained /^MountFlags=/ nextgroup=sdMountFlags,sdErr
syn match sdExecKey contained /^IgnoreSIGPIPE=/ nextgroup=sdBool,sdErr
syn match sdExecKey contained /^Environment=/ nextgroup=sdEnvDefs syn match sdExecKey contained /^Environment=/ nextgroup=sdEnvDefs
syn match sdExecKey contained /^EnvironmentFile=-\=/ contains=sdEnvDashFlag nextgroup=sdFilename,sdErr syn match sdExecKey contained /^EnvironmentFile=-\=/ contains=sdEnvDashFlag nextgroup=sdFilename,sdErr
@ -248,6 +251,7 @@ hi def link sdSecurityType sdValue
hi def link sdSecureBits sdValue hi def link sdSecureBits sdValue
hi def link sdMountFlags sdValue hi def link sdMountFlags sdValue
hi def link sdKillMode sdValue hi def link sdKillMode sdValue
hi def link sdFailJobMode sdValue
hi def link sdRestartType sdValue hi def link sdRestartType sdValue
hi def link sdSignal sdValue hi def link sdSignal sdValue
hi def link sdStdin sdValue hi def link sdStdin sdValue

View File

@ -7,10 +7,22 @@ if exists("b:current_syntax")
finish finish
endif endif
syn match tomlEscape /\\[0tnr"\\]/ display syn match tomlEscape /\\[btnfr"/\\]/ display contained
syn match tomlEscape /\\u\x\{4}/ contained
syn match tomlEscape /\\U\x\{8}/ contained
hi def link tomlEscape SpecialChar hi def link tomlEscape SpecialChar
syn region tomlString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=tomlEscape syn match tomlLineEscape /\\$/ contained
hi def link tomlLineEscape SpecialChar
" Basic strings
syn region tomlString oneline start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=tomlEscape
" Multi-line basic strings
syn region tomlString start=/"""/ end=/"""/ contains=tomlEscape,tomlLineEscape
" Literal strings
syn region tomlString oneline start=/'/ end=/'/
" Multi-line literal strings
syn region tomlString start=/'''/ end=/'''/
hi def link tomlString String hi def link tomlString String
syn match tomlInteger /\<-\?\d\+\>/ display syn match tomlInteger /\<-\?\d\+\>/ display
@ -25,8 +37,11 @@ hi def link tomlBoolean Boolean
syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}T\d\{2\}:\d\{2\}:\d\{2\}Z/ display syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}T\d\{2\}:\d\{2\}:\d\{2\}Z/ display
hi def link tomlDate Constant hi def link tomlDate Constant
syn match tomlKeyGroup /^\s*\[.\+\]\s*\(#.*\)\?$/ contains=tomlComment syn match tomlTable /^\s*\[[^#\[\]]\+\]\s*\(#.*\)\?$/ contains=tomlComment
hi def link tomlKeyGroup Identifier hi def link tomlTable Identifier
syn match tomlTableArray /^\s*\[\[[^#\[\]]\+\]\]\s*\(#.*\)\?$/ contains=tomlComment
hi def link tomlTableArray Identifier
syn keyword tomlTodo TODO FIXME XXX BUG contained syn keyword tomlTodo TODO FIXME XXX BUG contained
hi def link tomlTodo Todo hi def link tomlTodo Todo

View File

@ -30,7 +30,7 @@ hi link shebang Comment
"" typeScript comments"{{{ "" typeScript comments"{{{
syn keyword typeScriptCommentTodo TODO FIXME XXX TBD contained syn keyword typeScriptCommentTodo TODO FIXME XXX TBD contained
syn match typeScriptLineComment "\/\/.*" contains=@Spell,typeScriptCommentTodo,typeScriptRef syn match typeScriptLineComment "\/\/.*" contains=@Spell,typeScriptCommentTodo,typeScriptRef
syn match typeScriptRef /\/\/\/\s*<reference\s\+.*\/>$/ contains=typeScriptRefD,typeScriptRefS syn match typeScriptRef /\/\/\/<reference\s\+.*\/>$/ contains=typeScriptRefD,typeScriptRefS
syn region typeScriptRefD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ syn region typeScriptRefD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
syn region typeScriptRefS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ syn region typeScriptRefS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+
@ -116,7 +116,7 @@ syntax keyword typeScriptGlobalObjects Array Boolean Date Function Infinity Math
syntax keyword typeScriptExceptions try catch throw finally Error EvalError RangeError ReferenceError SyntaxError TypeError URIError syntax keyword typeScriptExceptions try catch throw finally Error EvalError RangeError ReferenceError SyntaxError TypeError URIError
syntax keyword typeScriptReserved constructor declare as interface module abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public syntax keyword typeScriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public
"}}} "}}}
"" TypeScript/DOM/HTML/CSS specified things"{{{ "" TypeScript/DOM/HTML/CSS specified things"{{{
@ -126,7 +126,7 @@ syntax keyword typeScriptReserved constructor declare as interface module abstra
syn match typeScriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite syn match typeScriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite
"}}} "}}}
" DOM2 Objects"{{{ " DOM2 Objects"{{{
syntax keyword typeScriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string bool number syntax keyword typeScriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number
syntax keyword typeScriptExceptions DOMException syntax keyword typeScriptExceptions DOMException
"}}} "}}}
" DOM2 CONSTANT"{{{ " DOM2 CONSTANT"{{{

11
syntax/vimgo.vim Normal file
View File

@ -0,0 +1,11 @@
if exists("b:current_syntax")
finish
endif
let b:current_syntax = "vimgo"
syn match goInterface /^\S*/
syn region goTitle start="\%1l" end=":"
hi def link goInterface Type
hi def link goTitle Label