mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7a30b1f1a | ||
|
|
6745c49110 | ||
|
|
1a97304cf6 | ||
|
|
d8eaa50aed | ||
|
|
8e26e6e963 |
@@ -26,7 +26,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
||||
## Language packs
|
||||
|
||||
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent, ftdetect)
|
||||
- [blade](https://github.com/xsbeats/vim-blade) (syntax, indent, ftdetect)
|
||||
- [blade](https://github.com/xsbeats/vim-blade) (syntax, ftdetect)
|
||||
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
|
||||
- [c/c++](https://github.com/vim-jp/cpp-vim) (syntax)
|
||||
- [c-extensions](https://github.com/kergoth/aftersyntaxc.vim) (syntax)
|
||||
@@ -82,11 +82,12 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
||||
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, compiler, ftplugin, ftdetect)
|
||||
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
||||
- [thrift](https://github.com/solarnz/thrift.vim) (syntax, ftdetect)
|
||||
- [toml](https://github.com/cespare/vim-toml) (syntax, ftdetect)
|
||||
- [toml](https://github.com/cespare/vim-toml) (syntax, ftplugin, ftdetect)
|
||||
- [twig](https://github.com/beyondwords/vim-twig) (syntax, ftplugin, ftdetect)
|
||||
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
|
||||
- [vala](https://github.com/tkztmk/vim-vala) (syntax, indent, ftdetect)
|
||||
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
|
||||
- [vala](https://github.com/tkztmk/vim-vala) (syntax, indent, ftdetect)
|
||||
- [vm](https://github.com/lepture/vim-velocity) (syntax, indent, ftdetect)
|
||||
- [css-color](https://github.com/ap/vim-css-color) (autoload, syntax)
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -289,282 +289,3 @@ hi def link cBoolean Boolean
|
||||
"hi def link cDelimiter Delimiter
|
||||
" foldmethod=syntax fix, courtesy of Ivan Freitas
|
||||
"hi def link cBraces Delimiter
|
||||
" Vim syntax file
|
||||
" Language: C Additions
|
||||
" Maintainer: Mikhail Wolfson <mywolfson@gmail.com>
|
||||
" URL: http://web.mit.edu/wolfsonm
|
||||
" Last Change: 2010 Dec. 3
|
||||
" Version: 0.4
|
||||
"
|
||||
" Changelog:
|
||||
" 0.4 - updates and fixes to cDelimiter to fix break with foldmethod=syntax,
|
||||
" entirely suggested and solved by Ivan Freitas
|
||||
" <ivansichfreitas@gmail.com>
|
||||
" 0.3 - updates and fixes to cUserFunctionPointer, thanks to
|
||||
" Alexei <lxmzhv@gmail.com>
|
||||
" 0.2 - change [] to operator
|
||||
" 0.1 - initial upload, modification from vimscript#1201, Extended c.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
|
||||
|
||||
" 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 "[{}]"
|
||||
|
||||
|
||||
" Booleans
|
||||
syn keyword cBoolean true false TRUE FALSE
|
||||
|
||||
|
||||
" Links
|
||||
hi def link cFunction Function
|
||||
hi def link cIdentifier Identifier
|
||||
hi def link cDelimiter Delimiter
|
||||
" foldmethod=syntax fix, courtesy of Ivan Freitas
|
||||
hi def link cBraces Delimiter
|
||||
hi def link cBoolean Boolean
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
" This file describes a very basic syntax for TomDoc comments in a
|
||||
" CoffeeScript file.
|
||||
"
|
||||
" For more information on TomDoc, check it out here: http://tomdoc.org/
|
||||
"
|
||||
|
||||
syn keyword tomdocKeywords Returns containedin=coffeeComment contained
|
||||
syn keyword tomdocKeywords Throws containedin=coffeeComment contained
|
||||
syn keyword tomdocKeywords Examples containedin=coffeeComment contained
|
||||
syn keyword tomdocKeywords Signature containedin=coffeeComment contained
|
||||
|
||||
syn match tomdocArguments +\s*[A-Za-z0-9_\-&\*:]*\(\s*- \)+he=e-3 containedin=coffeeComment contained
|
||||
|
||||
syn match tomdocDescriptions +\s*Public:+he=e-1 containedin=coffeeComment contained
|
||||
syn match tomdocDescriptions +\s*Internal:+he=e-1 containedin=coffeeComment contained
|
||||
syn match tomdocDescriptions +\s*Deprecated:+he=e-1 containedin=coffeeComment contained
|
||||
|
||||
hi default link tomdocDescriptions String
|
||||
hi default link tomdocKeywords String
|
||||
hi default link tomdocArguments HELP
|
||||
@@ -1,23 +1,3 @@
|
||||
" This file describes a very basic syntax for TomDoc comments in a Ruby file.
|
||||
"
|
||||
" For more information on TomDoc, check it out here: http://tomdoc.org/
|
||||
"
|
||||
|
||||
syn keyword tomdocKeywords Returns containedin=rubyComment contained
|
||||
syn keyword tomdocKeywords Yields containedin=rubyComment contained
|
||||
syn keyword tomdocKeywords Raises containedin=rubyComment contained
|
||||
syn keyword tomdocKeywords Examples containedin=rubyComment contained
|
||||
syn keyword tomdocKeywords Signature containedin=rubyComment contained
|
||||
|
||||
syn match tomdocArguments +\s*[A-Za-z0-9_\-&\*:]*\(\s*- \)+he=e-3 containedin=rubyComment contained
|
||||
|
||||
syn match tomdocDescriptions +\s*Public:+he=e-1 containedin=rubyComment contained
|
||||
syn match tomdocDescriptions +\s*Internal:+he=e-1 containedin=rubyComment contained
|
||||
syn match tomdocDescriptions +\s*Deprecated:+he=e-1 containedin=rubyComment contained
|
||||
|
||||
hi default link tomdocDescriptions String
|
||||
hi default link tomdocKeywords String
|
||||
hi default link tomdocArguments HELP
|
||||
" Ruby syntax extensions for highlighting YARD documentation.
|
||||
"
|
||||
" Author: Joel Holdbrooks <https://github.com/noprompt>
|
||||
|
||||
@@ -235,9 +235,9 @@ endfunction
|
||||
|
||||
let s:_hexcolor = '#\(\x\{3}\|\x\{6}\)\>' " submatch 1
|
||||
let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2
|
||||
let s:_numval = '\(\d\{1,3}%\?\)' " submatch 3,4,5
|
||||
let s:_ws_ = '\s*'
|
||||
let s:_listsep = s:_ws_ . ',' . s:_ws_
|
||||
let s:_numval = s:_ws_ . '\(\d\{1,3}%\?\)' " submatch 3,4,5
|
||||
let s:_listsep = s:_ws_ . ','
|
||||
let s:_otherargs_ = '\%(,[^)]*\)\?'
|
||||
let s:_funcexpr = s:_funcname . '[(]' . s:_numval . s:_listsep . s:_numval . s:_listsep . s:_numval . s:_ws_ . s:_otherargs_ . '[)]'
|
||||
let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr
|
||||
|
||||
@@ -601,7 +601,7 @@ let g:xmldata_html5 = {
|
||||
\ ],
|
||||
\ 'meta': [
|
||||
\ [],
|
||||
\ extend(copy(global_attributes), {'name': [], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
|
||||
\ extend(copy(global_attributes), {'name': ['application-name', 'author', 'description', 'generator', 'referrer', 'creator', 'googlebot', 'publisher', 'robots', 'slurp', 'viewport', 'theme-color'], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
|
||||
\ ],
|
||||
\ 'meter': [
|
||||
\ phrasing_elements,
|
||||
|
||||
10
build
10
build
@@ -23,17 +23,18 @@ extract() {
|
||||
path="$(printf "$pack" | cut -d ':' -f 2)"
|
||||
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
||||
directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"
|
||||
subtree="$(printf "$pack" | cut -d ':' -f 4)"
|
||||
printf -- "- [$name](https://github.com/$path) ("
|
||||
|
||||
subdirs=""
|
||||
for subdir in ${!directories}; do
|
||||
if [ -d "$dir/$subdir" ]; then
|
||||
if [ -d "${dir}${subtree:-/}${subdir}" ]; then
|
||||
base="$(basename "$subdir")"
|
||||
if [[ "$subdirs" != *"$base"* ]]; then
|
||||
subdirs="$subdirs, $base"
|
||||
fi
|
||||
|
||||
copy_dir "$dir" "$subdir"
|
||||
copy_dir "${dir}${subtree}" "$subdir"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -45,8 +46,9 @@ extract() {
|
||||
name="$(printf "$pack" | cut -d ':' -f 1)"
|
||||
path="$(printf "$pack" | cut -d ':' -f 2)"
|
||||
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
||||
subtree="$(printf "$pack" | cut -d ':' -f 4)"
|
||||
|
||||
if [ -d "$dir/plugin" ]; then
|
||||
if [ -d "$dir${subtree:-/}plugin" ]; then
|
||||
printf "Possible error (plugin directory exists): $path\n"
|
||||
fi
|
||||
done
|
||||
@@ -72,7 +74,6 @@ PACKS="
|
||||
blade:xsbeats/vim-blade
|
||||
c++11:octol/vim-cpp-enhanced-highlight
|
||||
c/c++:vim-jp/cpp-vim
|
||||
c-extensions:kergoth/aftersyntaxc.vim
|
||||
clojure:guns/vim-clojure-static
|
||||
coffee-script:kchmck/vim-coffee-script
|
||||
css:JulesWang/css.vim
|
||||
@@ -130,6 +131,7 @@ PACKS="
|
||||
xls:vim-scripts/XSLT-syntax
|
||||
yard:sheerun/vim-yardoc
|
||||
vala:tkztmk/vim-vala
|
||||
vm:lepture/vim-velocity
|
||||
css-color:ap/vim-css-color
|
||||
"
|
||||
|
||||
|
||||
@@ -3,11 +3,14 @@ if exists("current_compiler")
|
||||
endif
|
||||
let current_compiler = "typescript"
|
||||
|
||||
if !exists("g:typescript_compiler_binary")
|
||||
let g:typescript_compiler_binary = "tsc"
|
||||
endif
|
||||
|
||||
if !exists("g:typescript_compiler_options")
|
||||
let g:typescript_compiler_options = ""
|
||||
endif
|
||||
|
||||
|
||||
let &l:makeprg='tsc' . g:typescript_compiler_options . ' $* %'
|
||||
let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %'
|
||||
|
||||
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m
|
||||
|
||||
@@ -29,11 +29,11 @@ autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab
|
||||
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
|
||||
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
|
||||
autocmd BufNewFile,BufRead *.git/{,modules/**/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
|
||||
autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules set ft=gitconfig
|
||||
autocmd BufNewFile,BufRead */.config/git/config set ft=gitconfig
|
||||
autocmd BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig
|
||||
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
|
||||
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
|
||||
autocmd BufNewFile,BufRead *.git/config,.gitconfig,gitconfig,.gitmodules set ft=gitconfig
|
||||
autocmd BufNewFile,BufRead */.config/git/config set ft=gitconfig
|
||||
autocmd BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig
|
||||
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
|
||||
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
|
||||
autocmd BufNewFile,BufRead *.git/**
|
||||
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
|
||||
\ set ft=git |
|
||||
@@ -202,8 +202,10 @@ au BufRead,BufNewFile *.textile set filetype=textile
|
||||
au BufNewFile,BufRead *.thrift setlocal filetype=thrift
|
||||
autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux
|
||||
autocmd BufNewFile,BufRead *.toml set filetype=toml
|
||||
autocmd BufNewFile,BufRead Cargo.lock set filetype=toml
|
||||
autocmd BufNewFile,BufRead *.twig set filetype=twig
|
||||
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
|
||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||
au BufRead,BufNewFile *.vala,*.vapi setfiletype vala
|
||||
au BufRead,BufNewFile *.vm set ft=velocity syntax=velocity
|
||||
|
||||
270
ftplugin/csv.vim
270
ftplugin/csv.vim
@@ -1,11 +1,11 @@
|
||||
" Filetype plugin for editing CSV files. "{{{1
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Version: 0.30
|
||||
" Version: 0.31
|
||||
" Script: http://www.vim.org/scripts/script.php?script_id=2830
|
||||
" License: VIM License
|
||||
" Last Change: Thu, 27 Mar 2014 23:28:40 +0100
|
||||
" Last Change: Thu, 15 Jan 2015 21:05:10 +0100
|
||||
" Documentation: see :help ft-csv.txt
|
||||
" GetLatestVimScripts: 2830 29 :AutoInstall: csv.vim
|
||||
" GetLatestVimScripts: 2830 30 :AutoInstall: csv.vim
|
||||
"
|
||||
" Some ideas are taken from the wiki http://vim.wikia.com/wiki/VimTip667
|
||||
" though, implementation differs.
|
||||
@@ -90,7 +90,7 @@ fu! <sid>Init(startline, endline) "{{{3
|
||||
" - Should work with most ugly solutions that are available
|
||||
let b:col='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
|
||||
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
|
||||
\ '[^"]\|""\)*"\)' . s:del . '\)\|\%(' .
|
||||
\ '[^"]\|""\)*"\s*\)' . s:del . '\)\|\%(' .
|
||||
\ '[^' . b:delimiter . ']*' . s:del . '\)\)'
|
||||
let b:col_end='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
|
||||
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
|
||||
@@ -147,7 +147,7 @@ fu! <sid>Init(startline, endline) "{{{3
|
||||
let b:undo_ftplugin .= "| unlet! b:delimiter b:col"
|
||||
\ . "| unlet! b:csv_fixed_width_cols b:csv_filter"
|
||||
\ . "| unlet! b:csv_fixed_width b:csv_list b:col_width"
|
||||
\ . "| unlet! b:csv_SplitWindow b:csv_headerline"
|
||||
\ . "| unlet! b:csv_SplitWindow b:csv_headerline b:csv_cmt"
|
||||
\ . "| unlet! b:csv_thousands_sep b:csv_decimal_sep"
|
||||
\. " | unlet! b:browsefilter b:csv_cmt"
|
||||
\. " | unlet! b:csv_arrange_leftalign"
|
||||
@@ -182,7 +182,7 @@ fu! <sid>Init(startline, endline) "{{{3
|
||||
" \ delf <sid>SaveOptions | delf <sid>CheckDuplicates |
|
||||
" \ delf <sid>CompleteColumnNr | delf <sid>CSVPat | delf <sid>Transpose |
|
||||
" \ delf <sid>LocalSettings() | delf <sid>AddColumn | delf <sid>SubstituteInColumn
|
||||
" \ delf <sid>SetupQuitPre() | delf CSV_CloseBuffer
|
||||
" \ delf <sid>SetupAutoCmd() | delf CSV_CloseBuffer
|
||||
endfu
|
||||
|
||||
fu! <sid>LocalSettings(type) "{{{3
|
||||
@@ -194,11 +194,8 @@ fu! <sid>LocalSettings(type) "{{{3
|
||||
let b:undo_ftplugin = "setlocal sol& tw< wrap<"
|
||||
|
||||
" Set browsefilter
|
||||
if (v:version > 703 || (v:version == 703 && has("patch593")))
|
||||
\ && exists("browsefilter")
|
||||
let b:browsefilter="CSV Files (*.csv, *.dat)\t*.csv;*.dat\n".
|
||||
let b:browsefilter="CSV Files (*.csv, *.dat)\t*.csv;*.dat\n".
|
||||
\ "All Files\t*.*\n"
|
||||
endif
|
||||
|
||||
if has("conceal")
|
||||
setl cole=2 cocu=nc
|
||||
@@ -341,7 +338,8 @@ fu! <sid>SearchColumn(arg) "{{{3
|
||||
endif
|
||||
let @/ = <sid>GetPat(colnr, maxcolnr, '\%('.pat. '\)')
|
||||
try
|
||||
norm! n
|
||||
" force redraw, so that the search pattern isn't shown
|
||||
exe "norm! n\<c-l>"
|
||||
catch /^Vim\%((\a\+)\)\=:E486/
|
||||
" Pattern not found
|
||||
echohl Error
|
||||
@@ -619,10 +617,6 @@ fu! <sid>ColWidth(colnr) "{{{3
|
||||
endfu
|
||||
|
||||
fu! <sid>ArrangeCol(first, last, bang, limit) range "{{{3
|
||||
"TODO: Why doesn't that work?
|
||||
" is this because of the range flag?
|
||||
" It's because of the way, Vim works with
|
||||
" a:firstline and a:lastline parameter, therefore
|
||||
" explicitly give the range as argument to the function
|
||||
if exists("b:csv_fixed_width_cols")
|
||||
" Nothing to do
|
||||
@@ -713,6 +707,8 @@ fu! <sid>CalculateColumnWidth() "{{{3
|
||||
" delete buffer content in variable b:csv_list,
|
||||
" this was only necessary for calculating the max width
|
||||
unlet! b:csv_list
|
||||
unlet! s:columnize_count
|
||||
unlet! s:decimal_column
|
||||
endfu
|
||||
|
||||
fu! <sid>Columnize(field) "{{{3
|
||||
@@ -736,51 +732,83 @@ fu! <sid>Columnize(field) "{{{3
|
||||
" Careful: Keep this fast! Using
|
||||
" let width=get(b:col_width,<SID>WColumn()-1,20)
|
||||
" is too slow, so we are using:
|
||||
let width=get(b:col_width, (s:columnize_count % s:max_cols), 20)
|
||||
let colnr = s:columnize_count % s:max_cols
|
||||
let width=get(b:col_width, colnr, 20)
|
||||
let align='r'
|
||||
if exists('b:csv_arrange_align')
|
||||
let align_list=split(get(b:, 'csv_arrange_align', " "), '\zs')
|
||||
try
|
||||
let align = align_list[colnr]
|
||||
catch
|
||||
let align = 'r'
|
||||
endtry
|
||||
endif
|
||||
if ((align isnot? 'r' && align isnot? 'l' &&
|
||||
\ align isnot? 'c' && align isnot? '.') || get(b:, 'csv_arrange_leftalign', 0))
|
||||
let align = 'r'
|
||||
endif
|
||||
|
||||
let s:columnize_count += 1
|
||||
let has_delimiter = (a:field =~# b:delimiter.'$')
|
||||
if v:version > 703 || v:version == 703 && has("patch713")
|
||||
" printf knows about %S (e.g. can handle char length
|
||||
if get(b:, 'csv_arrange_leftalign',0)
|
||||
" left-align content
|
||||
return printf("%-*S%s", width+1 ,
|
||||
\ (has_delimiter ?
|
||||
\ matchstr(a:field, '.*\%('.b:delimiter.'\)\@=') : a:field),
|
||||
\ (has_delimiter ? b:delimiter : ''))
|
||||
else
|
||||
return printf("%*S", width+1 , a:field)
|
||||
if align is? 'l'
|
||||
" left-align content
|
||||
return printf("%-*S%s", width+1 ,
|
||||
\ (has_delimiter ? a:field[:-2] : a:field),
|
||||
\ (has_delimiter ? b:delimiter : ' '))
|
||||
elseif align is? 'c'
|
||||
" center the column
|
||||
let t = width - len(split(a:field, '\zs'))
|
||||
let leftwidth = t/2
|
||||
" uneven width, add one
|
||||
let rightwidth = (t%2 ? leftwidth+1 : leftwidth)
|
||||
let field = (has_delimiter ? a:field[:-2] : a:field). repeat(' ', rightwidth)
|
||||
return printf("%*S%s", width , field, (has_delimiter ? b:delimiter : ' '))
|
||||
elseif align is? '.'
|
||||
if !exists("s:decimal_column")
|
||||
let s:decimal_column = {}
|
||||
endif
|
||||
else
|
||||
" printf only handles bytes
|
||||
if !exists("g:csv_no_multibyte") &&
|
||||
\ match(a:field, '[^ -~]') != -1
|
||||
" match characters outside the ascii range
|
||||
let a = split(a:field, '\zs')
|
||||
let add = eval(join(map(a, 'len(v:val)'), '+'))
|
||||
let add -= len(a)
|
||||
else
|
||||
let add = 0
|
||||
endif
|
||||
|
||||
" Add one for the frame
|
||||
" plus additional width for multibyte chars,
|
||||
" since printf(%*s..) uses byte width!
|
||||
let width = width + add + 1
|
||||
|
||||
if width == strlen(a:field)
|
||||
" Column has correct length, don't use printf()
|
||||
return a:field
|
||||
else
|
||||
if get(b:, 'csv_arrange_leftalign',0)
|
||||
" left-align content
|
||||
return printf("%-*s%s", width,
|
||||
\ (has_delimiter ? matchstr(a:field, '.*\%('.b:delimiter.'\)\@=') : a:field),
|
||||
\ (has_delimiter ? b:delimiter : ''))
|
||||
else
|
||||
return printf("%*s", width , a:field)
|
||||
if get(s:decimal_column, colnr, 0) == 0
|
||||
call <sid>CheckHeaderLine()
|
||||
call <sid>NumberFormat()
|
||||
let data = <sid>CopyCol('', colnr+1, '')[s:csv_fold_headerline : -1]
|
||||
let pat1 = escape(s:nr_format[1], '.').'\zs[^'.s:nr_format[1].']*\ze'.
|
||||
\ (has_delimiter ? b:delimiter : '').'$'
|
||||
let pat2 = '\d\+\ze\%(\%('.escape(s:nr_format[1], '.'). '\d\+\)\|'.
|
||||
\ (has_delimiter ? b:delimiter : '').'$\)'
|
||||
let data1 = map(copy(data), 'matchstr(v:val, pat1)')
|
||||
let data2 = map(data, 'matchstr(v:val, pat2)')
|
||||
" strlen should be okay for decimals...
|
||||
let data1 = map(data1, 'strlen(v:val)')
|
||||
let data2 = map(data2, 'strlen(v:val)')
|
||||
let dec = max(data1)
|
||||
let scal = max(data2)
|
||||
if dec + scal + 1 + (has_delimiter ? 1 : 0) > width
|
||||
let width = dec + scal + 1 + (has_delimiter ? 1 :0)
|
||||
let b:col_width[colnr] = width
|
||||
endif
|
||||
|
||||
let s:decimal_column[colnr] = dec
|
||||
else
|
||||
let dec = get(s:decimal_column, colnr)
|
||||
endif
|
||||
let field = (has_delimiter ? a:field[:-2] : a:field)
|
||||
let fmt = printf("%%%d.%df", width+1, dec)
|
||||
try
|
||||
if s:nr_format[1] isnot '.'
|
||||
let field = substitute(field, s:nr_format[1], '.', 'g')
|
||||
let field = substitute(field, s:nr_format[0], '', 'g')
|
||||
endif
|
||||
if field =~? '\h' " text in the column, can't be converted to float
|
||||
throw "no decimal"
|
||||
endif
|
||||
let result = printf(fmt, str2float(field)). (has_delimiter ? b:delimiter : ' ')
|
||||
catch
|
||||
let result = printf("%*S", width+2, a:field)
|
||||
endtry
|
||||
return result
|
||||
else
|
||||
" right align
|
||||
return printf("%*S", width+1 , a:field)
|
||||
endif
|
||||
endfun
|
||||
|
||||
@@ -809,14 +837,13 @@ fu! <sid>GetColPat(colnr, zs_flag) "{{{3
|
||||
return pat . (a:zs_flag ? '\zs' : '')
|
||||
endfu
|
||||
|
||||
fu! <sid>SetupQuitPre(window) "{{{3
|
||||
fu! <sid>SetupAutoCmd(window,bufnr) "{{{3
|
||||
" Setup QuitPre autocommand to quit cleanly
|
||||
if exists("##QuitPre")
|
||||
augroup CSV_QuitPre
|
||||
au!
|
||||
exe "au QuitPre * call CSV_CloseBuffer(".winbufnr(a:window).")"
|
||||
augroup end
|
||||
endif
|
||||
aug CSV_QuitPre
|
||||
au!
|
||||
exe "au QuitPre * call CSV_CloseBuffer(".winbufnr(a:window).")"
|
||||
exe "au CursorHold <buffer=".a:bufnr."> call CSV_SetSplitOptions(".a:window.")"
|
||||
aug END
|
||||
endfu
|
||||
|
||||
fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
||||
@@ -837,8 +864,9 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
||||
let _sbo = &sbo
|
||||
let a = []
|
||||
let b=b:col
|
||||
let bufnr = bufnr('.')
|
||||
if a:hor
|
||||
setl scrollopt=hor scrollbind
|
||||
setl scrollopt=hor scrollbind cursorbind
|
||||
let _fdc = &l:fdc
|
||||
let lines = empty(a:lines) ? s:csv_fold_headerline : a:lines
|
||||
let a = getline(1,lines)
|
||||
@@ -851,16 +879,21 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
||||
"setl syntax=csv
|
||||
sil! doautocmd FileType csv
|
||||
noa 1
|
||||
sil! sign unplace *
|
||||
exe "resize" . lines
|
||||
setl scrollopt=hor winfixheight nowrap
|
||||
"let &l:stl=repeat(' ', winwidth(0))
|
||||
setl scrollopt=hor winfixheight nowrap cursorbind
|
||||
let &l:stl="%#Normal#".repeat(' ',winwidth(0))
|
||||
let s:local_stl = &l:stl
|
||||
" set the foldcolumn to the same of the other window
|
||||
let &l:fdc = _fdc
|
||||
else
|
||||
setl scrollopt=ver scrollbind
|
||||
setl scrollopt=ver scrollbind cursorbind
|
||||
noa 0
|
||||
let a=<sid>CopyCol('',1,a:lines)
|
||||
if a:lines[-1:] is? '!'
|
||||
let a=<sid>CopyCol('',a:lines,'')
|
||||
else
|
||||
let a=<sid>CopyCol('',1, a:lines-1)
|
||||
endif
|
||||
" Does it make sense to use the preview window?
|
||||
"vert sil! pedit |wincmd w | enew!
|
||||
above vsp +enew
|
||||
@@ -876,11 +909,14 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
||||
noa 0
|
||||
let b:csv_SplitWindow = winnr()
|
||||
sil :call <sid>ArrangeCol(1,line('$'), 1, -1)
|
||||
sil! sign unplace *
|
||||
exe "vert res" . len(split(getline(1), '\zs'))
|
||||
call matchadd("CSVHeaderLine", b:col)
|
||||
setl scrollopt=ver winfixwidth
|
||||
setl scrollopt=ver winfixwidth cursorbind nonu nornu fdc=0
|
||||
endif
|
||||
call <sid>SetupQuitPre(winnr())
|
||||
call <sid>SetupAutoCmd(winnr(),bufnr)
|
||||
" disable airline
|
||||
let w:airline_disabled = 1
|
||||
let win = winnr()
|
||||
setl scrollbind buftype=nowrite bufhidden=wipe noswapfile nobuflisted
|
||||
noa wincmd p
|
||||
@@ -901,9 +937,9 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
||||
if exists("_sbo")
|
||||
let &sbo = _sbo
|
||||
endif
|
||||
setl noscrollbind
|
||||
setl noscrollbind nocursorbind
|
||||
try
|
||||
wincmd c
|
||||
noa wincmd c
|
||||
catch /^Vim\%((\a\+)\)\=:E444/ " cannot close last window
|
||||
catch /^Vim\%((\a\+)\)\=:E517/ " buffer already wiped
|
||||
" no-op
|
||||
@@ -959,6 +995,9 @@ fu! <sid>MoveCol(forward, line, ...) "{{{3
|
||||
elseif line > line('$')
|
||||
let line=line('$')
|
||||
endif
|
||||
if foldclosed(line) != -1
|
||||
let line = line > line('.') ? foldclosedend(line) : foldclosed(line)
|
||||
endif
|
||||
|
||||
" Generate search pattern
|
||||
if colnr == 1
|
||||
@@ -1609,7 +1648,7 @@ fu! <sid>AnalyzeColumn(...) "{{{3
|
||||
let qty = len(data)
|
||||
let res = {}
|
||||
for item in data
|
||||
if empty(item)
|
||||
if empty(item) || item ==# b:delimiter
|
||||
let item = 'NULL'
|
||||
endif
|
||||
if !get(res, item)
|
||||
@@ -1906,7 +1945,7 @@ fu! <sid>CommandDefinitions() "{{{3
|
||||
call <sid>LocalCmd("CSVFixed", ':call <sid>InitCSVFixedWidth()', '')
|
||||
call <sid>LocalCmd("NewRecord", ':call <sid>NewRecord(<line1>,
|
||||
\ <line2>, <q-args>)', '-nargs=? -range')
|
||||
call <sid>LocalCmd("NewDelimiter", ':call <sid>NewDelimiter(<q-args>)',
|
||||
call <sid>LocalCmd("NewDelimiter", ':call <sid>NewDelimiter(<q-args>, 1, line(''$''))',
|
||||
\ '-nargs=1')
|
||||
call <sid>LocalCmd("Duplicates", ':call <sid>CheckDuplicates(<q-args>)',
|
||||
\ '-nargs=1 -complete=custom,<sid>CompleteColumnNr')
|
||||
@@ -1993,7 +2032,7 @@ fu! <sid>SaveOptions(list) "{{{3
|
||||
return save
|
||||
endfu
|
||||
|
||||
fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
||||
fu! <sid>NewDelimiter(newdelimiter, firstl, lastl) "{{{3
|
||||
let save = <sid>SaveOptions(['ro', 'ma'])
|
||||
if exists("b:csv_fixed_width_cols")
|
||||
call <sid>Warn("NewDelimiter does not work with fixed width column!")
|
||||
@@ -2005,8 +2044,12 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
||||
if &l:ro
|
||||
setl noro
|
||||
endif
|
||||
let line=1
|
||||
while line <= line('$')
|
||||
let delimiter = a:newdelimiter
|
||||
if a:newdelimiter is '\t'
|
||||
let delimiter="\t"
|
||||
endif
|
||||
let line=a:firstl
|
||||
while line <= a:lastl
|
||||
" Don't change delimiter for comments
|
||||
if getline(line) =~ '^\s*\V'. escape(b:csv_cmt[0], '\\')
|
||||
let line+=1
|
||||
@@ -2016,7 +2059,7 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
||||
" Remove field delimiter
|
||||
call map(fields, 'substitute(v:val, b:delimiter .
|
||||
\ ''\?$'' , "", "")')
|
||||
call setline(line, join(fields, a:newdelimiter))
|
||||
call setline(line, join(fields, delimiter))
|
||||
let line+=1
|
||||
endwhile
|
||||
" reset local buffer options
|
||||
@@ -2024,7 +2067,17 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
||||
call setbufvar('', '&'. key, value)
|
||||
endfor
|
||||
"reinitialize the plugin
|
||||
if exists("g:csv_delim")
|
||||
let _delim = g:csv_delim
|
||||
endif
|
||||
let g:csv_delim = delimiter
|
||||
call <sid>Init(1,line('$'))
|
||||
if exists("_delim")
|
||||
let g:csv_delim = _delim
|
||||
else
|
||||
unlet g:csv_delim
|
||||
endif
|
||||
unlet! _delim
|
||||
endfu
|
||||
|
||||
fu! <sid>IN(list, value) "{{{3
|
||||
@@ -2207,6 +2260,23 @@ fu! <sid>Tabularize(bang, first, last) "{{{3
|
||||
let adjust_last = 0
|
||||
call cursor(a:first,0)
|
||||
call <sid>CheckHeaderLine()
|
||||
let line=a:first
|
||||
if exists("g:csv_table_leftalign")
|
||||
let b:csv_arrange_leftalign = 1
|
||||
endif
|
||||
let newlines=[]
|
||||
while line <= a:last
|
||||
let curline = getline(line)
|
||||
if empty(split(curline, b:delimiter))
|
||||
" only empty delimiters, add one empty delimiter
|
||||
" (:NewDelimiter strips trailing delimiter
|
||||
let curline = repeat(b:delimiter, <sid>MaxColumns())
|
||||
call add(newlines, line)
|
||||
call setline(line, curline)
|
||||
endif
|
||||
let line+=1
|
||||
endw
|
||||
unlet! line
|
||||
if exists("b:csv_fixed_width_cols")
|
||||
let cols=copy(b:csv_fixed_width_cols)
|
||||
let pat = join(map(cols, ' ''\(\%''. v:val. ''c\)'' '), '\|')
|
||||
@@ -2223,21 +2293,35 @@ fu! <sid>Tabularize(bang, first, last) "{{{3
|
||||
" don't clear column width variable, might have been set in the
|
||||
" plugin!
|
||||
sil call <sid>ArrangeCol(a:first, a:last, 0, -1)
|
||||
if !get(b:, 'csv_arrange_leftalign',0)
|
||||
for line in newlines
|
||||
let cline = getline(line)
|
||||
let cline = substitute(cline, '\s$', ' ', '')
|
||||
call setline(line, cline)
|
||||
endfor
|
||||
unlet! line
|
||||
endif
|
||||
endif
|
||||
|
||||
if empty(b:col_width)
|
||||
call <sid>Warn('An error occured, aborting!')
|
||||
return
|
||||
endif
|
||||
let b:col_width[-1] += 1
|
||||
if get(b:, 'csv_arrange_leftalign', 0)
|
||||
call map(b:col_width, 'v:val+1')
|
||||
endif
|
||||
if b:delimiter == "\t" && !get(b:, 'csv_arrange_leftalign',0)
|
||||
let b:col_width[-1] += 1
|
||||
endif
|
||||
let marginline = s:td.scol. join(map(copy(b:col_width), 'repeat(s:td.hbar, v:val)'), s:td.cros). s:td.ecol
|
||||
|
||||
exe printf('sil %d,%ds/%s/%s/ge', a:first, (a:last+adjust_last),
|
||||
\ (exists("b:csv_fixed_width_cols") ? pat : b:delimiter ), s:td.vbar)
|
||||
call <sid>NewDelimiter(s:td.vbar, a:first, a:last+adjust_last)
|
||||
"exe printf('sil %d,%ds/%s/%s/ge', a:first, (a:last+adjust_last),
|
||||
" \ (exists("b:csv_fixed_width_cols") ? pat : b:delimiter ), s:td.vbar)
|
||||
" Add vertical bar in first column, if there isn't already one
|
||||
exe printf('sil %d,%ds/%s/%s/e', a:first, a:last+adjust_last,
|
||||
\ '^[^'. s:td.vbar. s:td.scol. ']', s:td.vbar.'&')
|
||||
" And add a final vertical bar, if there isn't already
|
||||
" And add a final vertical bar, if there isn't one already
|
||||
exe printf('sil %d,%ds/%s/%s/e', a:first, a:last+adjust_last,
|
||||
\ '[^'. s:td.vbar. s:td.ecol. ']$', '&'. s:td.vbar)
|
||||
" Make nice intersection graphs
|
||||
@@ -2247,11 +2331,16 @@ fu! <sid>Tabularize(bang, first, last) "{{{3
|
||||
call append(a:first-1, s:td.ltop. join(line, s:td.dhor). s:td.rtop)
|
||||
call append(a:last+adjust_last+1, s:td.lbot. join(line, s:td.uhor). s:td.rbot)
|
||||
|
||||
if s:csv_fold_headerline > 0 && !a:bang
|
||||
"call <sid>NewRecord(s:csv_fold_headerline, s:csv_fold_headerline, 1)
|
||||
if s:csv_fold_headerline > 0
|
||||
call append(a:first + s:csv_fold_headerline, marginline)
|
||||
let adjust_last += 1
|
||||
endif
|
||||
" Adjust headerline to header of new table
|
||||
let b:csv_headerline = (exists('b:csv_headerline')?b:csv_headerline+2:3)
|
||||
call <sid>CheckHeaderLine()
|
||||
" Adjust syntax highlighting
|
||||
unlet! b:current_syntax
|
||||
ru syntax/csv.vim
|
||||
|
||||
if a:bang
|
||||
exe printf('sil %d,%ds/^%s\zs\n/&%s&/e', a:first + s:csv_fold_headerline, a:last + adjust_last,
|
||||
@@ -2484,8 +2573,23 @@ fu! CSV_WCol(...) "{{{3
|
||||
endtry
|
||||
endfun
|
||||
|
||||
fu! CSV_SetSplitOptions(window) "{{{3
|
||||
if exists("s:local_stl")
|
||||
" local horizontal statusline
|
||||
for opt in items({'&nu': &l:nu, '&rnu': &l:rnu, '&fdc': &fdc})
|
||||
if opt[1] != getwinvar(a:window, opt[0])
|
||||
call setwinvar(a:window, opt[0], opt[1])
|
||||
endif
|
||||
endfor
|
||||
" Check statusline (airline might change it)
|
||||
if getwinvar(a:window, '&l:stl') != s:local_stl
|
||||
call setwinvar(a:window, '&stl', s:local_stl)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
fu! CSV_CloseBuffer(buffer) "{{{3
|
||||
" Setup by SetupQuitPre autocommand
|
||||
" Setup by SetupAutoCmd autocommand
|
||||
try
|
||||
if bufnr((a:buffer)+0) > -1
|
||||
exe a:buffer. "bw"
|
||||
|
||||
@@ -30,7 +30,7 @@ function! LatexBox_GetMainFileName(...)
|
||||
" move up the directory tree until we find a .latexmain file.
|
||||
" TODO: Should we be doing this recursion by default, or should there be a
|
||||
" setting?
|
||||
while glob('*.latexmain') == ''
|
||||
while glob('*.latexmain',1) == ''
|
||||
let dirmodifier = dirmodifier.':h'
|
||||
let dirNew = fnameescape(expand(dirmodifier))
|
||||
" break from the loop if we cannot go up any further.
|
||||
@@ -41,7 +41,7 @@ function! LatexBox_GetMainFileName(...)
|
||||
exe 'cd '.dirLast
|
||||
endwhile
|
||||
|
||||
let lheadfile = glob('*.latexmain')
|
||||
let lheadfile = glob('*.latexmain',1)
|
||||
if lheadfile != ''
|
||||
" Remove the trailing .latexmain part of the filename... We never want
|
||||
" that.
|
||||
|
||||
@@ -443,10 +443,32 @@ function! LatexBox_LatexErrors(status, ...)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Redefine uniq() for compatibility with older Vim versions (< 7.4.218)
|
||||
function! s:uniq(list)
|
||||
if exists('*uniq')
|
||||
return uniq(a:list)
|
||||
elseif len(a:list) <= 1
|
||||
return a:list
|
||||
endif
|
||||
|
||||
let last_element = get(a:list,0)
|
||||
let uniq_list = [last_element]
|
||||
|
||||
for i in range(1, len(a:list)-1)
|
||||
let next_element = get(a:list, i)
|
||||
if last_element == next_element
|
||||
continue
|
||||
endif
|
||||
let last_element = next_element
|
||||
call add(uniq_list, next_element)
|
||||
endfor
|
||||
return uniq_list
|
||||
endfunction
|
||||
|
||||
function! s:log_contains_error(file)
|
||||
let lines = readfile(a:file)
|
||||
let lines = filter(lines, 'v:val =~ ''^.*:\d\+: ''')
|
||||
let lines = uniq(map(lines, 'matchstr(v:val, ''^.*\ze:\d\+:'')'))
|
||||
let lines = s:uniq(map(lines, 'matchstr(v:val, ''^.*\ze:\d\+:'')'))
|
||||
let lines = filter(lines, 'filereadable(fnameescape(v:val))')
|
||||
return len(lines) > 0
|
||||
endfunction
|
||||
|
||||
@@ -5,31 +5,31 @@ if exists("g:LatexBox_no_mappings")
|
||||
endif
|
||||
|
||||
" latexmk {{{
|
||||
map <buffer> <LocalLeader>ll :Latexmk<CR>
|
||||
map <buffer> <LocalLeader>lL :Latexmk!<CR>
|
||||
map <buffer> <LocalLeader>lc :LatexmkClean<CR>
|
||||
map <buffer> <LocalLeader>lC :LatexmkClean!<CR>
|
||||
map <buffer> <LocalLeader>lg :LatexmkStatus<CR>
|
||||
map <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
|
||||
map <buffer> <LocalLeader>lk :LatexmkStop<CR>
|
||||
map <buffer> <LocalLeader>le :LatexErrors<CR>
|
||||
noremap <buffer> <LocalLeader>ll :Latexmk<CR>
|
||||
noremap <buffer> <LocalLeader>lL :Latexmk!<CR>
|
||||
noremap <buffer> <LocalLeader>lc :LatexmkClean<CR>
|
||||
noremap <buffer> <LocalLeader>lC :LatexmkClean!<CR>
|
||||
noremap <buffer> <LocalLeader>lg :LatexmkStatus<CR>
|
||||
noremap <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
|
||||
noremap <buffer> <LocalLeader>lk :LatexmkStop<CR>
|
||||
noremap <buffer> <LocalLeader>le :LatexErrors<CR>
|
||||
" }}}
|
||||
|
||||
" View {{{
|
||||
map <buffer> <LocalLeader>lv :LatexView<CR>
|
||||
noremap <buffer> <LocalLeader>lv :LatexView<CR>
|
||||
" }}}
|
||||
|
||||
" TOC {{{
|
||||
map <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
|
||||
noremap <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
|
||||
" }}}
|
||||
|
||||
" List of labels {{{
|
||||
map <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
|
||||
noremap <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
|
||||
" }}}
|
||||
|
||||
" Folding {{{
|
||||
if g:LatexBox_Folding == 1
|
||||
map <buffer> <LocalLeader>lf :LatexFold<CR>
|
||||
noremap <buffer> <LocalLeader>lf :LatexFold<CR>
|
||||
endif
|
||||
" }}}
|
||||
|
||||
@@ -44,12 +44,12 @@ endif
|
||||
" Define text objects {{{
|
||||
vmap <buffer> ie <Plug>LatexBox_SelectCurrentEnvInner
|
||||
vmap <buffer> ae <Plug>LatexBox_SelectCurrentEnvOuter
|
||||
omap <buffer> ie :normal vie<CR>
|
||||
omap <buffer> ae :normal vae<CR>
|
||||
onoremap <buffer> ie :normal vie<CR>
|
||||
onoremap <buffer> ae :normal vae<CR>
|
||||
vmap <buffer> i$ <Plug>LatexBox_SelectInlineMathInner
|
||||
vmap <buffer> a$ <Plug>LatexBox_SelectInlineMathOuter
|
||||
omap <buffer> i$ :normal vi$<CR>
|
||||
omap <buffer> a$ :normal va$<CR>
|
||||
onoremap <buffer> i$ :normal vi$<CR>
|
||||
onoremap <buffer> a$ :normal va$<CR>
|
||||
" }}}
|
||||
|
||||
" Jump between sections {{{
|
||||
|
||||
@@ -443,11 +443,17 @@ function! Fixedgq(lnum, count)
|
||||
let l:tw = &tw ? &tw : 80;
|
||||
|
||||
let l:count = a:count
|
||||
let l:first_char = indent(a:lnum) + 1
|
||||
|
||||
if mode() == 'i' " gq was not pressed, but tw was set
|
||||
return 1
|
||||
endif
|
||||
|
||||
" This gq is only meant to do code with strings, not comments
|
||||
if s:IsLineComment(a:lnum, l:first_char) || s:IsInMultilineComment(a:lnum, l:first_char)
|
||||
return 1
|
||||
endif
|
||||
|
||||
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
|
||||
return 1
|
||||
endif
|
||||
|
||||
5
indent/velocity.vim
Normal file
5
indent/velocity.vim
Normal file
@@ -0,0 +1,5 @@
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! indent/html.vim
|
||||
@@ -106,10 +106,9 @@ fu! <sid>DoHighlight() "{{{3
|
||||
\ . s:col . '/ contains=CSVDelimiter'
|
||||
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
|
||||
\ . s:col . '/ contains=CSVDelimiter'
|
||||
|
||||
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%1l'
|
||||
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%<'. (get(b:, 'csv_headerline', 1)+1).'l'
|
||||
\. s:col . '/ contains=CSVDelimiter'
|
||||
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%1l'
|
||||
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%<'. (get(b:, 'csv_headerline', 1)+1).'l'
|
||||
\. s:col . '/ contains=CSVDelimiter'
|
||||
else
|
||||
for i in range(len(b:csv_fixed_width_cols))
|
||||
@@ -137,8 +136,13 @@ fu! <sid>DoSyntaxDefinitions() "{{{3
|
||||
|
||||
hi def link CSVColumnHeaderOdd WarningMsg
|
||||
hi def link CSVColumnHeaderEven WarningMsg
|
||||
hi def link CSVColumnOdd DiffAdd
|
||||
hi def link CSVColumnEven DiffChange
|
||||
if get(g:, 'csv_no_column_highlight', 0)
|
||||
hi def link CSVColumnOdd Normal
|
||||
hi def link CSVColumnEven Normal
|
||||
else
|
||||
hi def link CSVColumnOdd DiffAdd
|
||||
hi def link CSVColumnEven DiffChange
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Main: {{{2
|
||||
|
||||
@@ -10,7 +10,7 @@ endif
|
||||
syntax case ignore
|
||||
|
||||
syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/
|
||||
syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s/
|
||||
syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR|COPY)\s/
|
||||
highlight link dockerfileKeyword Keyword
|
||||
|
||||
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
||||
|
||||
@@ -15,8 +15,8 @@ syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@el
|
||||
syn match elixirComment '#.*' contains=elixirTodo
|
||||
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
|
||||
|
||||
syn keyword elixirKeyword is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_number is_pid is_port is_record is_reference is_tuple is_exception
|
||||
syn keyword elixirKeyword case cond for if unless try receive send
|
||||
syn keyword elixirKeyword is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_map is_number is_pid is_port is_record is_reference is_tuple is_exception
|
||||
syn keyword elixirKeyword case when cond for if unless try receive send
|
||||
syn keyword elixirKeyword exit raise throw after rescue catch else do end
|
||||
syn keyword elixirKeyword quote unquote super
|
||||
|
||||
|
||||
@@ -67,6 +67,10 @@ if !exists("g:go_highlight_structs")
|
||||
let g:go_highlight_structs = 0
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_build_constraints")
|
||||
let g:go_highlight_build_constraints = 0
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn keyword goDirective package import
|
||||
@@ -270,6 +274,21 @@ endif
|
||||
hi def link goStruct Function
|
||||
hi def link goStructDef Function
|
||||
|
||||
" Build Constraints
|
||||
if g:go_highlight_build_constraints != 0
|
||||
syn keyword goBuildOs contained ignore cgo android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows
|
||||
syn keyword goBuildArch contained 386 amd64 amd64p32 arm
|
||||
syn match goBuildDirective display contained "+build"
|
||||
syn region goBuildComment start="//\s*+build" end="$" contains=goBuildDirective,goBuildOs,goBuildArch
|
||||
syn region goBuildComment start="/\*\s*+build" end="\*/" contains=goBuildDirective,goBuildOs,goBuildArch
|
||||
endif
|
||||
|
||||
hi def link goBuildComment Comment
|
||||
hi def link goBuildOs Type
|
||||
hi def link goBuildArch Type
|
||||
hi def link goBuildDirective PreProc
|
||||
|
||||
|
||||
" Search backwards for a global declaration to start processing the syntax.
|
||||
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassCha
|
||||
syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent
|
||||
syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript,jadeTagBlockChar,jadeTagInlineText
|
||||
syn match jadeComment '\s*\/\/.*$'
|
||||
syn region jadeCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
|
||||
syn region jadeHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
|
||||
syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent
|
||||
syn match jadeClassChar "\." contained nextgroup=jadeClass
|
||||
@@ -45,7 +46,7 @@ syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$"
|
||||
syn keyword jadeHtmlArg contained href title
|
||||
|
||||
syn match jadePlainChar "\\" contained
|
||||
syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="#{" end="}" contains=@htmlJavascript
|
||||
syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="[#!]{" end="}" contains=@htmlJavascript
|
||||
syn match jadeInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)"
|
||||
syn match jadeTagInlineText "\s.*$" contained contains=jadeInterpolation,jadeTextInlineJade
|
||||
syn region jadePipedText matchgroup=jadePipeChar start="|" end="$" contained contains=jadeInterpolation,jadeTextInlineJade nextgroup=jadePipedText skipnl
|
||||
@@ -90,6 +91,7 @@ hi def link jadeInlineDelimiter Delimiter
|
||||
hi def link jadeFilter PreProc
|
||||
hi def link jadeDocType PreProc
|
||||
hi def link jadeComment Comment
|
||||
hi def link jadeCommentBlock Comment
|
||||
hi def link jadeHtmlConditionalComment jadeComment
|
||||
|
||||
let b:current_syntax = "jade"
|
||||
|
||||
@@ -56,7 +56,7 @@ if !exists("javascript_ignore_javaScriptdoc")
|
||||
syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
|
||||
|
||||
" tags containing a param
|
||||
syntax match jsDocTags contained "@\(alias\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|template\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite
|
||||
syntax match jsDocTags contained "@\(alias\|api\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|template\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite
|
||||
" tags containing type and param
|
||||
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
|
||||
" tags containing type but no param
|
||||
@@ -70,7 +70,7 @@ if !exists("javascript_ignore_javaScriptdoc")
|
||||
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite
|
||||
syntax region jsDocTypeNoParam start="{" end="}" oneline contained
|
||||
syntax match jsDocTypeNoParam contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+"
|
||||
syntax match jsDocParam contained "\%(#\|\"\|{\|}\|\w\|\.\|:\|\/\)\+"
|
||||
syntax match jsDocParam contained "\%(#\|\"\|{\|}\|\w\|\.\|:\|\/\|\[\|]\|=\)\+"
|
||||
syntax region jsDocSeeTag contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags
|
||||
|
||||
syntax case match
|
||||
@@ -94,11 +94,17 @@ syntax match jsRegexpMod "\v\(@<=\?[:=!>]" contained
|
||||
syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod
|
||||
syntax region jsRegexpGroup start="\\\@<!(" skip="\\.\|\[\(\\.\|[^]]\)*\]" end="\\\@<!)" contained contains=jsRegexpCharClass,@jsRegexpSpecial keepend
|
||||
syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\.\|\[\(\\.\|[^]]\)*\]+ end=+/[gimy]\{,4}+ contains=jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline keepend
|
||||
syntax match jsNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/
|
||||
syntax match jsNumber /\<-\=\d\+\(L\|[eE][+-]\=\d\+\)\=\>\|\<0[xX]\x\+\>/
|
||||
syntax keyword jsNumber Infinity
|
||||
syntax match jsFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/
|
||||
syntax match jsObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\)\@=/ contains=jsFunctionKey contained
|
||||
syntax match jsFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\s*function\s*\)\@=/ contained
|
||||
syntax match jsObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\)\@=/ contains=jsFunctionKey contained
|
||||
syntax match jsFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\s*function\s*\)\@=/ contained
|
||||
|
||||
syntax match jsAssignmentExpr /\v%([a-zA-Z_$]\k*\.)*[a-zA-Z_$]\k*\s*\=/ contains=jsFuncAssignExpr,jsAssignExpIdent,jsPrototype,jsOperator,jsThis,jsNoise
|
||||
syntax match jsAssignExpIdent /\v[a-zA-Z_$]\k*\ze%(\s*\=)/ contained
|
||||
syntax match jsFuncAssignExpr /\v%(%([a-zA-Z_$]\k*\.)*[a-zA-Z_$]\k*\s*\=\s*){-1,}\ze%(function\s*\*?\s*\()/ contains=jsFuncAssignObjChain,jsFuncAssignIdent,jsFunction,jsPrototype,jsOperator,jsThis contained
|
||||
syntax match jsFuncAssignObjChain /\v%([a-zA-Z_$]\k*\.)+/ contains=jsPrototype,jsNoise contained
|
||||
syntax match jsFuncAssignIdent /\v[a-zA-Z_$]\k*\ze%(\s*\=)/ contained
|
||||
|
||||
exe 'syntax keyword jsNull null '.(exists('g:javascript_conceal_null') ? 'conceal cchar='.g:javascript_conceal_null : '')
|
||||
exe 'syntax keyword jsReturn return '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '')
|
||||
@@ -174,7 +180,7 @@ endif "DOM/HTML/CSS
|
||||
|
||||
|
||||
"" Code blocks
|
||||
syntax cluster jsExpression contains=jsComment,jsLineComment,jsDocComment,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsBlock,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsStorageClass,jsPrototype,jsBuiltins,jsNoise,jsCommonJS
|
||||
syntax cluster jsExpression contains=jsComment,jsLineComment,jsDocComment,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsBlock,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsStorageClass,jsPrototype,jsBuiltins,jsNoise,jsCommonJS,jsAssignmentExpr
|
||||
syntax cluster jsAll contains=@jsExpression,jsLabel,jsConditional,jsRepeat,jsReturn,jsStatement,jsTernaryIf,jsException
|
||||
syntax region jsBracket matchgroup=jsBrackets start="\[" end="\]" contains=@jsAll,jsParensErrB,jsParensErrC,jsBracket,jsParen,jsBlock,@htmlPreproc fold
|
||||
syntax region jsParen matchgroup=jsParens start="(" end=")" contains=@jsAll,jsParensErrA,jsParensErrC,jsParen,jsBracket,jsBlock,@htmlPreproc fold
|
||||
@@ -194,8 +200,9 @@ if main_syntax == "javascript"
|
||||
syntax sync match jsHighlight grouphere jsBlock /{/
|
||||
endif
|
||||
|
||||
exe 'syntax match jsFunction /\<function\>/ nextgroup=jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '')
|
||||
exe 'syntax match jsFunction /\<function\>/ nextgroup=jsGenerator,jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '')
|
||||
|
||||
syntax match jsGenerator contained '\*' nextgroup=jsFuncName skipwhite
|
||||
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite
|
||||
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest nextgroup=jsFuncBlock keepend skipwhite skipempty
|
||||
syntax match jsFuncArgCommas contained ','
|
||||
@@ -250,6 +257,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
||||
HiLink jsKeyword Keyword
|
||||
HiLink jsArrowFunction Type
|
||||
HiLink jsFunction Type
|
||||
HiLink jsGenerator jsFunction
|
||||
HiLink jsFuncName Function
|
||||
HiLink jsArgsObj Special
|
||||
HiLink jsError Error
|
||||
|
||||
@@ -39,11 +39,6 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists('®expengine')
|
||||
let s:regexpengine=®expengine
|
||||
set regexpengine=1
|
||||
endif
|
||||
|
||||
" POD starts with ^=<word> and ends with ^=cut
|
||||
|
||||
if !exists("perl_include_pod") || perl_include_pod == 1
|
||||
@@ -334,19 +329,24 @@ syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s
|
||||
" XXX Any statements after the identifier are in perlString colour (i.e.
|
||||
" 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it
|
||||
" seems due to the 'auto-extending nature' of regions.
|
||||
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+$+ contains=@perlTop oneline
|
||||
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+$+ contains=@perlTop oneline
|
||||
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+$+ contains=@perlTop oneline
|
||||
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*""+ end=+$+ contains=@perlTop oneline
|
||||
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*''+ end=+$+ contains=@perlTop oneline
|
||||
if exists("perl_fold")
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold extend
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold extend
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold extend
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold extend
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold extend
|
||||
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
|
||||
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
|
||||
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ fold extend
|
||||
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine fold extend
|
||||
syn region perlHereDoc start=+<<\s*''+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpSQ,perlNotEmptyLine fold extend
|
||||
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend
|
||||
else
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine
|
||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine
|
||||
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
|
||||
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
|
||||
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ
|
||||
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine
|
||||
syn region perlHereDoc start=+<<\s*''+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpSQ,perlNotEmptyLine
|
||||
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL
|
||||
endif
|
||||
|
||||
@@ -360,15 +360,11 @@ syn keyword perlStatementPackage package contained
|
||||
" sub [name] [(prototype)] {
|
||||
"
|
||||
syn match perlSubError "[^[:space:];{#]" contained
|
||||
if v:version == 701 && !has('patch221') " XXX I hope that's the right one
|
||||
syn match perlSubAttributes ":" contained
|
||||
else
|
||||
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
|
||||
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
|
||||
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
|
||||
syn match perlSubAttributes "" contained nextgroup=perlSubError
|
||||
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
|
||||
endif
|
||||
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
|
||||
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
|
||||
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
|
||||
syn match perlSubAttributes "" contained nextgroup=perlSubError
|
||||
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
|
||||
if !exists("perl_no_subprototype_error") " Set 1 if using signatures feature in perl5.19.9
|
||||
syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
|
||||
syn match perlSubPrototype +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
|
||||
@@ -583,11 +579,6 @@ syn sync match perlSyncPOD grouphere NONE "^=cut"
|
||||
|
||||
let b:current_syntax = "perl"
|
||||
|
||||
if exists('®expengine')
|
||||
let ®expengine=s:regexpengine
|
||||
unlet s:regexpengine
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
@@ -2245,8 +2245,6 @@ endif
|
||||
" know how to use them reliably)
|
||||
syn sync fromstart
|
||||
|
||||
setlocal foldmethod=syntax
|
||||
|
||||
let b:current_syntax = "perl6"
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
|
||||
@@ -533,10 +533,10 @@ syn match phpOperator "&&\|\<and\>" contained display
|
||||
syn match phpOperator "||\|\<x\=or\>" contained display
|
||||
syn match phpOperator "[!=<>]=" contained display
|
||||
syn match phpOperator "[<>]" contained display
|
||||
syn match phpMemberSelector "->" contained display
|
||||
syn match phpMemberSelector "->\|::" contained display
|
||||
syn match phpVarSelector "\$" contained display
|
||||
" highlight object variables inside strings
|
||||
syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble
|
||||
" highlight static and object variables inside strings
|
||||
syn match phpMethodsVar "\%(->\|::$\?\)\h\w*" contained contains=phpMethods,phpMemberSelector,phpIdentifier display containedin=phpStringDouble
|
||||
syn match phpSplatOperator "\.\.\." contained display
|
||||
|
||||
" Identifier
|
||||
|
||||
@@ -130,8 +130,8 @@ syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][io
|
||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
||||
|
||||
" Normal String and Shell Command Output
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
||||
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
||||
|
||||
" Generalized Single Quoted String, Symbol and Array of Strings
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
||||
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||
" Last Change: July 18, 2014
|
||||
" Last Change: January 5, 2015
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
@@ -24,7 +24,7 @@ syn keyword rustKeyword continue
|
||||
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
||||
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
|
||||
syn keyword rustKeyword for in if impl let
|
||||
syn keyword rustKeyword loop once proc pub
|
||||
syn keyword rustKeyword loop once pub
|
||||
syn keyword rustKeyword return super
|
||||
syn keyword rustKeyword unsafe virtual where while
|
||||
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
||||
@@ -56,10 +56,10 @@ syn match rustMacroRepeatCount ".\?[*+]" contained
|
||||
syn match rustMacroVariable "$\w\+"
|
||||
|
||||
" Reserved (but not yet used) keywords {{{2
|
||||
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override
|
||||
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override macro
|
||||
|
||||
" Built-in types {{{2
|
||||
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
|
||||
syn keyword rustType isize usize float char bool u8 u16 u32 u64 f32
|
||||
syn keyword rustType f64 i8 i16 i32 i64 str Self
|
||||
|
||||
" Things from the prelude (src/libstd/prelude.rs) {{{2
|
||||
@@ -68,59 +68,35 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
|
||||
|
||||
" Reexported core operators {{{3
|
||||
syn keyword rustTrait Copy Send Sized Sync
|
||||
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
|
||||
syn keyword rustTrait BitAnd BitOr BitXor
|
||||
syn keyword rustTrait Drop Deref DerefMut
|
||||
syn keyword rustTrait Shl Shr
|
||||
syn keyword rustTrait Index IndexMut
|
||||
syn keyword rustTrait Slice SliceMut
|
||||
syn keyword rustTrait Fn FnMut FnOnce
|
||||
syn keyword rustTrait Drop Fn FnMut FnOnce
|
||||
|
||||
" Reexported functions {{{3
|
||||
"syn keyword rustFunction range repeat
|
||||
"syn keyword rustFunction drop
|
||||
"syn keyword rustFunction from_str
|
||||
syn keyword rustFunction drop
|
||||
|
||||
" Reexported types and traits {{{3
|
||||
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
|
||||
syn keyword rustTrait IntoBytes
|
||||
syn keyword rustTrait ToCStr
|
||||
syn keyword rustTrait Char UnicodeChar
|
||||
syn keyword rustTrait Box
|
||||
syn keyword rustTrait CharExt
|
||||
syn keyword rustTrait Clone
|
||||
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
||||
syn keyword rustEnum Ordering Equiv
|
||||
syn keyword rustEnumVariant Less Equal Greater
|
||||
syn keyword rustTrait FromIterator Extend ExactSize
|
||||
syn keyword rustTrait Iterator DoubleEndedIterator
|
||||
syn keyword rustTrait RandomAccessIterator CloneableIterator
|
||||
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
|
||||
syn keyword rustTrait ToPrimitive FromPrimitive
|
||||
syn keyword rustTrait Box
|
||||
syn keyword rustTrait DoubleEndedIterator
|
||||
syn keyword rustTrait ExactSizeIterator
|
||||
syn keyword rustTrait Iterator IteratorExt Extend
|
||||
syn keyword rustEnum Option
|
||||
syn keyword rustEnumVariant Some None
|
||||
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
|
||||
syn keyword rustTrait RawPtr RawMutPtr
|
||||
syn keyword rustTrait PtrExt MutPtrExt
|
||||
syn keyword rustEnum Result
|
||||
syn keyword rustEnumVariant Ok Err
|
||||
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
|
||||
syn keyword rustTrait Str StrVector StrPrelude
|
||||
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude
|
||||
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
|
||||
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
|
||||
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
|
||||
syn keyword rustTrait SlicePrelude AsSlice CloneSlicePrelude
|
||||
syn keyword rustTrait VectorVector PartialEqSlicePrelude OrdSlicePrelude
|
||||
syn keyword rustTrait CloneSliceAllocPrelude OrdSliceAllocPrelude SliceAllocPrelude
|
||||
syn keyword rustTrait IntoString String ToString
|
||||
syn keyword rustTrait AsSlice
|
||||
syn keyword rustTrait SliceExt SliceConcatExt
|
||||
syn keyword rustTrait Str StrExt
|
||||
syn keyword rustTrait String ToString
|
||||
syn keyword rustTrait Vec
|
||||
|
||||
" Reexported runtime types {{{3
|
||||
"syn keyword rustFunction sync_channel channel
|
||||
syn keyword rustTrait SyncSender Sender Receiver
|
||||
"syn keyword rustFunction spawn
|
||||
" FIXME: remove when path reform lands
|
||||
syn keyword rustTrait Path GenericPath
|
||||
" FIXME: remove when I/O reform lands
|
||||
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
|
||||
|
||||
" Other syntax {{{2
|
||||
|
||||
syn keyword rustSelf self
|
||||
syn keyword rustBoolean true false
|
||||
|
||||
@@ -151,19 +127,20 @@ syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic
|
||||
syn match rustEscapeError display contained /\\./
|
||||
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
|
||||
syn match rustEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{8}\)/
|
||||
syn match rustEscapeUnicode display contained /\\u{\x\{1,6}}/
|
||||
syn match rustStringContinuation display contained /\\\n\s*/
|
||||
syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
||||
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
||||
syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
|
||||
|
||||
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDeriving
|
||||
syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait
|
||||
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive
|
||||
syn region rustDerive start="derive(" end=")" contained contains=rustTrait
|
||||
|
||||
" Number literals
|
||||
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(8\|16\|32\|64\)\=\)\="
|
||||
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
|
||||
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 rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(s\|8\|16\|32\|64\)\)\="
|
||||
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
|
||||
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
|
||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
|
||||
|
||||
" 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,
|
||||
@@ -187,7 +164,7 @@ syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
||||
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
|
||||
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
||||
syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
|
||||
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
||||
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\|u{\x\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
||||
|
||||
syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
|
||||
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
|
||||
@@ -262,7 +239,7 @@ hi def link rustMacro Macro
|
||||
hi def link rustType Type
|
||||
hi def link rustTodo Todo
|
||||
hi def link rustAttribute PreProc
|
||||
hi def link rustDeriving PreProc
|
||||
hi def link rustDerive PreProc
|
||||
hi def link rustStorage StorageClass
|
||||
hi def link rustObsoleteStorage Error
|
||||
hi def link rustLifetime Special
|
||||
@@ -274,7 +251,7 @@ hi def link rustBoxPlacementExpr rustKeyword
|
||||
|
||||
" Other Suggestions:
|
||||
" hi rustAttribute ctermfg=cyan
|
||||
" hi rustDeriving ctermfg=cyan
|
||||
" hi rustDerive ctermfg=cyan
|
||||
" hi rustAssert ctermfg=yellow
|
||||
" hi rustPanic ctermfg=red
|
||||
" hi rustMacro ctermfg=magenta
|
||||
|
||||
97
syntax/tap.vim
Normal file
97
syntax/tap.vim
Normal file
@@ -0,0 +1,97 @@
|
||||
" Vim syntax file
|
||||
" Language: Verbose TAP Output
|
||||
" Maintainer: Rufus Cable <rufus@threebytesfull.com>
|
||||
" Remark: Simple syntax highlighting for TAP output
|
||||
" License:
|
||||
" Copyright: (c) 2008-2013 Rufus Cable
|
||||
" Last Change: {{LAST_CHANGE}}
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match tapTestDiag /^ *#.*/ contains=tapTestTodo
|
||||
syn match tapTestTime /^ *\[\d\d:\d\d:\d\d\].*/ contains=tapTestFile
|
||||
syn match tapTestFile /\w\+\/[^. ]*/ contained
|
||||
syn match tapTestFileWithDot /\w\+\/[^ ]*/ contained
|
||||
|
||||
syn match tapTestPlan /^ *\d\+\.\.\d\+$/
|
||||
|
||||
" tapTest is a line like 'ok 1', 'not ok 2', 'ok 3 - xxxx'
|
||||
syn match tapTest /^ *\(not \)\?ok \d\+.*/ contains=tapTestStatusOK,tapTestStatusNotOK,tapTestLine
|
||||
|
||||
" tapTestLine is the line without the ok/not ok status - i.e. number and
|
||||
" optional message
|
||||
syn match tapTestLine /\d\+\( .*\|$\)/ contains=tapTestNumber,tapTestLoadMessage,tapTestTodo,tapTestSkip contained
|
||||
|
||||
" turn ok/not ok messages green/red respectively
|
||||
syn match tapTestStatusOK /ok/ contained
|
||||
syn match tapTestStatusNotOK /not ok/ contained
|
||||
|
||||
" highlight todo tests
|
||||
syn match tapTestTodo /\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev
|
||||
syn match tapTestTodoRev /\<TODO\>/ contained
|
||||
|
||||
" highlight skipped tests
|
||||
syn match tapTestSkip /# skip .*$/ contained contains=tapTestSkipTag
|
||||
syn match tapTestSkipTag /\(# \)\@<=skip\>/ contained
|
||||
|
||||
" look behind so "ok 123" and "not ok 124" match test number
|
||||
syn match tapTestNumber /\(ok \)\@<=\d\d*/ contained
|
||||
syn match tapTestLoadMessage /\*\*\*.*\*\*\*/ contained contains=tapTestThreeStars,tapTestFileWithDot
|
||||
syn match tapTestThreeStars /\*\*\*/ contained
|
||||
|
||||
syn region tapTestRegion start=/^ *\(not \)\?ok.*$/me=e+1 end=/^\(\(not \)\?ok\|# Looks like you planned \|All tests successful\|Bailout called\)/me=s-1 fold transparent excludenl
|
||||
syn region tapTestResultsOKRegion start=/^\(All tests successful\|Result: PASS\)/ end=/$/
|
||||
syn region tapTestResultsNotOKRegion start=/^\(# Looks like you planned \|Bailout called\|# Looks like you failed \|Result: FAIL\)/ end=/$/
|
||||
syn region tapTestResultsSummaryRegion start=/^Test Summary Report/ end=/^Files=.*$/ contains=tapTestResultsSummaryHeading,tapTestResultsSummaryNotOK
|
||||
|
||||
syn region tapTestResultsSummaryHeading start=/^Test Summary Report/ end=/^-\+$/ contained
|
||||
syn region tapTestResultsSummaryNotOK start=/TODO passed:/ end=/$/ contained
|
||||
|
||||
syn region tapTestInstructionsRegion start=/\%1l/ end=/^$/
|
||||
|
||||
set foldtext=TAPTestLine_foldtext()
|
||||
function! TAPTestLine_foldtext()
|
||||
let line = getline(v:foldstart)
|
||||
let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
|
||||
return sub
|
||||
endfunction
|
||||
|
||||
set foldminlines=5
|
||||
set foldcolumn=2
|
||||
set foldenable
|
||||
set foldmethod=syntax
|
||||
syn sync fromstart
|
||||
|
||||
if !exists("did_tapverboseoutput_syntax_inits")
|
||||
let did_tapverboseoutput_syntax_inits = 1
|
||||
|
||||
hi tapTestStatusOK term=bold ctermfg=green guifg=Green
|
||||
hi tapTestStatusNotOK term=reverse ctermfg=black ctermbg=red guifg=Black guibg=Red
|
||||
hi tapTestTodo term=bold ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black
|
||||
hi tapTestTodoRev term=reverse ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow
|
||||
hi tapTestSkip term=bold ctermfg=lightblue guifg=LightBlue
|
||||
hi tapTestSkipTag term=reverse ctermfg=black ctermbg=lightblue guifg=Black guibg=LightBlue
|
||||
hi tapTestTime term=bold ctermfg=blue guifg=Blue
|
||||
hi tapTestFile term=reverse ctermfg=black ctermbg=yellow guibg=Black guifg=Yellow
|
||||
hi tapTestLoadedFile term=bold ctermfg=black ctermbg=cyan guibg=Cyan guifg=Black
|
||||
hi tapTestThreeStars term=reverse ctermfg=blue guifg=Blue
|
||||
hi tapTestPlan term=bold ctermfg=yellow guifg=Yellow
|
||||
|
||||
hi link tapTestFileWithDot tapTestLoadedFile
|
||||
hi link tapTestNumber Number
|
||||
hi link tapTestDiag Comment
|
||||
|
||||
hi tapTestRegion ctermbg=green
|
||||
|
||||
hi tapTestResultsOKRegion ctermbg=green ctermfg=black
|
||||
hi tapTestResultsNotOKRegion ctermbg=red ctermfg=black
|
||||
|
||||
hi tapTestResultsSummaryHeading ctermbg=blue ctermfg=white
|
||||
hi tapTestResultsSummaryNotOK ctermbg=red ctermfg=black
|
||||
|
||||
hi tapTestInstructionsRegion ctermbg=lightmagenta ctermfg=black
|
||||
endif
|
||||
|
||||
let b:current_syntax="tapVerboseOutput"
|
||||
18
syntax/tomdoc.vim
Normal file
18
syntax/tomdoc.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
syn keyword tomdocKeywords
|
||||
\ Returns Yields Raises Examples Signature
|
||||
\ containedin=.*Comment
|
||||
\ contained
|
||||
|
||||
syn match tomdocDescriptions
|
||||
\ +\s*\(Public\|Internal\|Deprecated\):+he=e-1
|
||||
\ containedin=.*Comment
|
||||
\ contained
|
||||
|
||||
syn match tomdocArguments
|
||||
\ +\s*[A-Za-z0-9_\-&\*:]*\(\s*- \)+he=e-3
|
||||
\ containedin=.*Comment
|
||||
\ contained
|
||||
|
||||
hi default link tomdocDescriptions String
|
||||
hi default link tomdocKeywords String
|
||||
hi default link tomdocArguments HELP
|
||||
67
syntax/velocity.vim
Normal file
67
syntax/velocity.vim
Normal file
@@ -0,0 +1,67 @@
|
||||
" Vim syntax file
|
||||
" Language: Velocity HTML template
|
||||
" Maintainer: Hsiaoming Young <http://lepture.com>
|
||||
" Last Change: 2012 Jan 09
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("main_syntax")
|
||||
let main_syntax = 'html'
|
||||
endif
|
||||
|
||||
if version < 600
|
||||
so <sfile>:p:h/html.vim
|
||||
else
|
||||
runtime! syntax/html.vim
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
syn keyword velocityTodo FIXME TODO contained
|
||||
syn region velocitySpec start="@" end=" " oneline contained
|
||||
syn region velocityComment start="#\*" end="\*#" contains=velocityTodo,velocitySpec
|
||||
syn match velocityComment /##.*/ contains=velocityTodo,velocitySpec
|
||||
syn region velocityString start='"' end='"' oneline display
|
||||
syn region velocityString start="'" end="'" oneline display
|
||||
syn match velocityNumber "[-+]\=\d\+\(\.\d*\)\=" display
|
||||
syn region velocityList start='\[' end='\]' oneline contained contains=velocityString,velocityNumber
|
||||
syn match velocityMath /=\|-\|+\|\/\|\*\|%/ contained
|
||||
syn match velocityBlock /#[a-z]\{2,\}/ contains=velocityStatement
|
||||
syn match velocityBlock /#[a-z]\{2,\}(.\+)/ contains=velocityStatement,velocityVar,velocityString,velocityNumber,velocityMath,velocityList
|
||||
syn keyword velocityStatement in set if else elseif end foreach include parse macro cmsparse stop break evaluate define contained
|
||||
|
||||
syn match velocityVar /$!\?[a-zA-Z][a-zA-Z0-9_-]\+\(\.\?[a-zA-Z0-9]*\)\+/ contains=velocityFunction display containedin=ALL
|
||||
syn match velocityVar /$!\?{[a-zA-Z][a-zA-Z0-9_-]\+}/ display containedin=ALL
|
||||
syn match velocityFunction /[a-zA-Z][a-zA-Z0-9_-]\+\(\.[a-zA-Z][a-zA-Z0-9_-]\+\)\+([^)]*)/ contains=velocityString,velocityNumber,velocityList,velocityMath,velocityVar,velocityFunction display containedin=velocityBlock
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_velocity_syn_inits")
|
||||
if version < 508
|
||||
let did_velocity_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink velocityString String
|
||||
HiLink velocityNumber Number
|
||||
HiLink velocityList Constant
|
||||
HiLink velocityBlock PreProc
|
||||
HiLink velocitySpec Special
|
||||
HiLink velocityVar Identifier
|
||||
HiLink velocityFunction Function
|
||||
HiLink velocityStatement Statement
|
||||
HiLink velocityComment Comment
|
||||
HiLink velocityTodo Todo
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "velocity"
|
||||
Reference in New Issue
Block a user