mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 03:53:52 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4541e98466 | ||
|
|
6cd2d5417d | ||
|
|
b7a30b1f1a | ||
|
|
6745c49110 |
@@ -289,282 +289,3 @@ hi def link cBoolean Boolean
|
|||||||
"hi def link cDelimiter Delimiter
|
"hi def link cDelimiter Delimiter
|
||||||
" foldmethod=syntax fix, courtesy of Ivan Freitas
|
" foldmethod=syntax fix, courtesy of Ivan Freitas
|
||||||
"hi def link cBraces Delimiter
|
"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,6 +1,12 @@
|
|||||||
let b:current_syntax = ''
|
" Extends standard help syntax with highlighting of Scala code.
|
||||||
unlet b:current_syntax
|
"
|
||||||
|
" Place code between !sc! and !/sc! delimiters. These will be hidden if Vim is
|
||||||
|
" built with conceal support.
|
||||||
|
|
||||||
|
unlet! b:current_syntax
|
||||||
|
|
||||||
syntax include @ScalaCode syntax/scala.vim
|
syntax include @ScalaCode syntax/scala.vim
|
||||||
|
|
||||||
if has('conceal')
|
if has('conceal')
|
||||||
syntax region rgnScala matchgroup=Ignore concealends start='!sc!' end='!/sc!' contains=@ScalaCode
|
syntax region rgnScala matchgroup=Ignore concealends start='!sc!' end='!/sc!' contains=@ScalaCode
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -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.
|
" Ruby syntax extensions for highlighting YARD documentation.
|
||||||
"
|
"
|
||||||
" Author: Joel Holdbrooks <https://github.com/noprompt>
|
" Author: Joel Holdbrooks <https://github.com/noprompt>
|
||||||
|
|||||||
@@ -235,9 +235,9 @@ endfunction
|
|||||||
|
|
||||||
let s:_hexcolor = '#\(\x\{3}\|\x\{6}\)\>' " submatch 1
|
let s:_hexcolor = '#\(\x\{3}\|\x\{6}\)\>' " submatch 1
|
||||||
let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2
|
let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2
|
||||||
let s:_numval = '\(\d\{1,3}%\?\)' " submatch 3,4,5
|
|
||||||
let s:_ws_ = '\s*'
|
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:_otherargs_ = '\%(,[^)]*\)\?'
|
||||||
let s:_funcexpr = s:_funcname . '[(]' . s:_numval . s:_listsep . s:_numval . s:_listsep . s:_numval . s:_ws_ . 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
|
let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr
|
||||||
|
|||||||
@@ -601,7 +601,7 @@ let g:xmldata_html5 = {
|
|||||||
\ ],
|
\ ],
|
||||||
\ 'meta': [
|
\ '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': [
|
\ 'meter': [
|
||||||
\ phrasing_elements,
|
\ phrasing_elements,
|
||||||
|
|||||||
2
build
2
build
@@ -74,11 +74,9 @@ PACKS="
|
|||||||
blade:xsbeats/vim-blade
|
blade:xsbeats/vim-blade
|
||||||
c++11:octol/vim-cpp-enhanced-highlight
|
c++11:octol/vim-cpp-enhanced-highlight
|
||||||
c/c++:vim-jp/cpp-vim
|
c/c++:vim-jp/cpp-vim
|
||||||
c-extensions:kergoth/aftersyntaxc.vim
|
|
||||||
clojure:guns/vim-clojure-static
|
clojure:guns/vim-clojure-static
|
||||||
coffee-script:kchmck/vim-coffee-script
|
coffee-script:kchmck/vim-coffee-script
|
||||||
css:JulesWang/css.vim
|
css:JulesWang/css.vim
|
||||||
csv:chrisbra/csv.vim
|
|
||||||
cucumber:tpope/vim-cucumber
|
cucumber:tpope/vim-cucumber
|
||||||
dockerfile:honza/dockerfile.vim
|
dockerfile:honza/dockerfile.vim
|
||||||
elixir:elixir-lang/vim-elixir
|
elixir:elixir-lang/vim-elixir
|
||||||
|
|||||||
30
compiler/sbt.vim
Normal file
30
compiler/sbt.vim
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Language: Scala SBT (http://www.scala-sbt.org/)
|
||||||
|
" Maintainer: Derek Wyatt
|
||||||
|
" URL: https://github.com/derekwyatt/vim-scala
|
||||||
|
" License: Apache 2
|
||||||
|
" ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if exists('current_compiler')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = 'sbt'
|
||||||
|
|
||||||
|
if exists(':CompilerSet') != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
CompilerSet makeprg=sbt\ -Dsbt.log.noformat=true\ compile
|
||||||
|
|
||||||
|
CompilerSet errorformat=
|
||||||
|
\%E\ %#[error]\ %f:%l:\ %m,%C\ %#[error]\ %p^,%-C%.%#,%Z,
|
||||||
|
\%W\ %#[warn]\ %f:%l:\ %m,%C\ %#[warn]\ %p^,%-C%.%#,%Z,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim:set sw=2 sts=2 ts=8 et:
|
||||||
@@ -3,11 +3,14 @@ if exists("current_compiler")
|
|||||||
endif
|
endif
|
||||||
let current_compiler = "typescript"
|
let current_compiler = "typescript"
|
||||||
|
|
||||||
|
if !exists("g:typescript_compiler_binary")
|
||||||
|
let g:typescript_compiler_binary = "tsc"
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists("g:typescript_compiler_options")
|
if !exists("g:typescript_compiler_options")
|
||||||
let g:typescript_compiler_options = ""
|
let g:typescript_compiler_options = ""
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %'
|
||||||
let &l:makeprg='tsc' . g:typescript_compiler_options . ' $* %'
|
|
||||||
|
|
||||||
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m
|
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ function! s:DetectCoffee()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
autocmd BufNewFile,BufRead * call s:DetectCoffee()
|
autocmd BufNewFile,BufRead * call s:DetectCoffee()
|
||||||
au BufRead,BufNewFile *.csv,*.dat,*.tsv,*.tab set filetype=csv
|
|
||||||
autocmd BufNewFile,BufReadPost *.feature,*.story set filetype=cucumber
|
autocmd BufNewFile,BufReadPost *.feature,*.story set filetype=cucumber
|
||||||
au BufNewFile,BufRead Dockerfile set filetype=dockerfile
|
au BufNewFile,BufRead Dockerfile set filetype=dockerfile
|
||||||
au BufRead,BufNewFile *.eex set filetype=eelixir
|
au BufRead,BufNewFile *.eex set filetype=eelixir
|
||||||
@@ -29,11 +28,11 @@ 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
|
||||||
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
|
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/{,modules/**/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
|
||||||
autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules set ft=gitconfig
|
autocmd BufNewFile,BufRead *.git/config,.gitconfig,gitconfig,.gitmodules set ft=gitconfig
|
||||||
autocmd BufNewFile,BufRead */.config/git/config 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/modules/**/config set ft=gitconfig
|
||||||
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
|
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
|
||||||
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
|
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
|
||||||
autocmd BufNewFile,BufRead *.git/**
|
autocmd BufNewFile,BufRead *.git/**
|
||||||
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
|
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
|
||||||
\ set ft=git |
|
\ set ft=git |
|
||||||
@@ -86,6 +85,7 @@ augroup END
|
|||||||
au BufNewFile,BufRead *.ejs set filetype=jst
|
au BufNewFile,BufRead *.ejs set filetype=jst
|
||||||
au BufNewFile,BufRead *.jst set filetype=jst
|
au BufNewFile,BufRead *.jst set filetype=jst
|
||||||
au BufNewFile,BufRead *.hamljs set filetype=jst
|
au BufNewFile,BufRead *.hamljs set filetype=jst
|
||||||
|
au BufNewFile,BufRead *.ect set filetype=jst
|
||||||
autocmd BufNewFile,BufRead *.less setf less
|
autocmd BufNewFile,BufRead *.less setf less
|
||||||
au BufNewFile,BufRead *.liquid set ft=liquid
|
au BufNewFile,BufRead *.liquid set ft=liquid
|
||||||
au BufNewFile,BufRead */_layouts/*.html,*/_includes/*.html set ft=liquid
|
au BufNewFile,BufRead */_layouts/*.html,*/_includes/*.html set ft=liquid
|
||||||
@@ -178,14 +178,15 @@ au BufNewFile,BufRead [Bb]uildfile call s:setf('ruby')
|
|||||||
au BufNewFile,BufRead Appraisals call s:setf('ruby')
|
au BufNewFile,BufRead Appraisals call s:setf('ruby')
|
||||||
au BufNewFile,BufRead Podfile,*.podspec call s:setf('ruby')
|
au BufNewFile,BufRead Podfile,*.podspec call s:setf('ruby')
|
||||||
au BufRead,BufNewFile *.rs set filetype=rust
|
au BufRead,BufNewFile *.rs set filetype=rust
|
||||||
au BufRead,BufNewFile *.sbt set filetype=sbt
|
au BufRead,BufNewFile *.sbt set filetype=sbt.scala
|
||||||
fun! s:DetectScala()
|
fun! s:DetectScala()
|
||||||
if getline(1) == '#!/usr/bin/env scala'
|
if getline(1) == '#!/usr/bin/env scala'
|
||||||
set filetype=scala
|
set filetype=scala
|
||||||
endif
|
endif
|
||||||
endfun
|
endfun
|
||||||
au BufRead,BufNewFile *.scala,*.sbt set filetype=scala
|
au BufRead,BufNewFile *.scala set filetype=scala
|
||||||
au BufRead,BufNewFile * call s:DetectScala()
|
au BufRead,BufNewFile * call s:DetectScala()
|
||||||
|
au BufRead,BufNewFile *.sbt setfiletype sbt.scala
|
||||||
autocmd BufNewFile,BufRead *.slim set filetype=slim
|
autocmd BufNewFile,BufRead *.slim set filetype=slim
|
||||||
autocmd BufNewFile,BufReadPost *.styl set filetype=stylus
|
autocmd BufNewFile,BufReadPost *.styl set filetype=stylus
|
||||||
autocmd BufNewFile,BufReadPost *.stylus set filetype=stylus
|
autocmd BufNewFile,BufReadPost *.stylus set filetype=stylus
|
||||||
@@ -202,6 +203,7 @@ au BufRead,BufNewFile *.textile set filetype=textile
|
|||||||
au BufNewFile,BufRead *.thrift setlocal filetype=thrift
|
au BufNewFile,BufRead *.thrift setlocal filetype=thrift
|
||||||
autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux
|
autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux
|
||||||
autocmd BufNewFile,BufRead *.toml set filetype=toml
|
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 *.twig set filetype=twig
|
||||||
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
|
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
|
||||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||||
|
|||||||
2523
ftplugin/csv.vim
2523
ftplugin/csv.vim
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,8 @@ endif
|
|||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo-=C
|
set cpo-=C
|
||||||
|
|
||||||
|
setlocal iskeyword+=-
|
||||||
|
|
||||||
" Define some defaults in case the included ftplugins don't set them.
|
" Define some defaults in case the included ftplugins don't set them.
|
||||||
let s:undo_ftplugin = ""
|
let s:undo_ftplugin = ""
|
||||||
let s:browsefilter = "All Files (*.*)\t*.*\n"
|
let s:browsefilter = "All Files (*.*)\t*.*\n"
|
||||||
|
|||||||
@@ -64,14 +64,24 @@ setlocal efm+=%-G%.%#
|
|||||||
|
|
||||||
" Vim Windows {{{
|
" Vim Windows {{{
|
||||||
|
|
||||||
" Width of vertical splits
|
" Type of split, "new" for horiz. "vnew" for vert.
|
||||||
|
if !exists('g:LatexBox_split_type')
|
||||||
|
let g:LatexBox_split_type = "vnew"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Length of vertical splits
|
||||||
|
if !exists('g:LatexBox_split_length')
|
||||||
|
let g:LatexBox_split_length = 15
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Width of horizontal splits
|
||||||
if !exists('g:LatexBox_split_width')
|
if !exists('g:LatexBox_split_width')
|
||||||
let g:LatexBox_split_width = 30
|
let g:LatexBox_split_width = 30
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Where vertical splits appear
|
" Where splits appear
|
||||||
if !exists('g:LatexBox_split_side')
|
if !exists('g:LatexBox_split_side')
|
||||||
let g:LatexBox_split_side = "leftabove"
|
let g:LatexBox_split_side = "aboveleft"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Resize when split?
|
" Resize when split?
|
||||||
@@ -229,12 +239,18 @@ endfunction
|
|||||||
|
|
||||||
" Default pdf viewer
|
" Default pdf viewer
|
||||||
if !exists('g:LatexBox_viewer')
|
if !exists('g:LatexBox_viewer')
|
||||||
if has('win32')
|
" On windows, 'running' a file will open it with the default program
|
||||||
" On windows, 'running' a file will open it with the default program
|
let s:viewer = ''
|
||||||
let g:LatexBox_viewer = ''
|
if has('unix')
|
||||||
else
|
" echo -n necessary as uname -s will append \n otherwise
|
||||||
let g:LatexBox_viewer = 'xdg-open'
|
let s:uname = system('echo -n $(uname -s)')
|
||||||
|
if s:uname == "Darwin"
|
||||||
|
let s:viewer = 'open'
|
||||||
|
else
|
||||||
|
let s:viewer = 'xdg-open'
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
let g:LatexBox_viewer = s:viewer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! LatexBox_View(...)
|
function! LatexBox_View(...)
|
||||||
|
|||||||
@@ -459,7 +459,8 @@ function! s:GetLabelCache(file)
|
|||||||
|
|
||||||
if !has_key(s:LabelCache , a:file) || s:LabelCache[a:file][0] != getftime(a:file)
|
if !has_key(s:LabelCache , a:file) || s:LabelCache[a:file][0] != getftime(a:file)
|
||||||
" Open file in temporary split window for label extraction.
|
" Open file in temporary split window for label extraction.
|
||||||
silent execute '1sp +let\ labels=s:ExtractLabels()|let\ inputs=s:ExtractInputs()|quit! ' . fnameescape(a:file)
|
let main_tex_file = LatexBox_GetMainTexFile()
|
||||||
|
silent execute '1sp +let\ b:main_tex_file=main_tex_file|let\ labels=s:ExtractLabels()|let\ inputs=s:ExtractInputs()|quit! ' . fnameescape(a:file)
|
||||||
let s:LabelCache[a:file] = [ getftime(a:file), labels, inputs ]
|
let s:LabelCache[a:file] = [ getftime(a:file), labels, inputs ]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ function! LatexBox_GetMainFileName(...)
|
|||||||
" move up the directory tree until we find a .latexmain file.
|
" 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
|
" TODO: Should we be doing this recursion by default, or should there be a
|
||||||
" setting?
|
" setting?
|
||||||
while glob('*.latexmain') == ''
|
while glob('*.latexmain',1) == ''
|
||||||
let dirmodifier = dirmodifier.':h'
|
let dirmodifier = dirmodifier.':h'
|
||||||
let dirNew = fnameescape(expand(dirmodifier))
|
let dirNew = fnameescape(expand(dirmodifier))
|
||||||
" break from the loop if we cannot go up any further.
|
" break from the loop if we cannot go up any further.
|
||||||
@@ -41,7 +41,7 @@ function! LatexBox_GetMainFileName(...)
|
|||||||
exe 'cd '.dirLast
|
exe 'cd '.dirLast
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
let lheadfile = glob('*.latexmain')
|
let lheadfile = glob('*.latexmain',1)
|
||||||
if lheadfile != ''
|
if lheadfile != ''
|
||||||
" Remove the trailing .latexmain part of the filename... We never want
|
" Remove the trailing .latexmain part of the filename... We never want
|
||||||
" that.
|
" that.
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ if g:LatexBox_fold_automatic == 1
|
|||||||
"
|
"
|
||||||
augroup FastFold
|
augroup FastFold
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd InsertEnter *.tex setlocal foldmethod=manual
|
autocmd InsertEnter *.tex if !&diff | setlocal foldmethod=manual | endif
|
||||||
autocmd InsertLeave *.tex setlocal foldmethod=expr
|
autocmd InsertLeave *.tex if !&diff | setlocal foldmethod=expr | endif
|
||||||
augroup end
|
augroup end
|
||||||
else
|
else
|
||||||
setl foldmethod=manual
|
setl foldmethod=manual
|
||||||
|
|||||||
@@ -443,10 +443,32 @@ function! LatexBox_LatexErrors(status, ...)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
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)
|
function! s:log_contains_error(file)
|
||||||
let lines = readfile(a:file)
|
let lines = readfile(a:file)
|
||||||
let lines = filter(lines, 'v:val =~ ''^.*:\d\+: ''')
|
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))')
|
let lines = filter(lines, 'filereadable(fnameescape(v:val))')
|
||||||
return len(lines) > 0
|
return len(lines) > 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -5,31 +5,31 @@ if exists("g:LatexBox_no_mappings")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" latexmk {{{
|
" latexmk {{{
|
||||||
map <buffer> <LocalLeader>ll :Latexmk<CR>
|
noremap <buffer> <LocalLeader>ll :Latexmk<CR>
|
||||||
map <buffer> <LocalLeader>lL :Latexmk!<CR>
|
noremap <buffer> <LocalLeader>lL :Latexmk!<CR>
|
||||||
map <buffer> <LocalLeader>lc :LatexmkClean<CR>
|
noremap <buffer> <LocalLeader>lc :LatexmkClean<CR>
|
||||||
map <buffer> <LocalLeader>lC :LatexmkClean!<CR>
|
noremap <buffer> <LocalLeader>lC :LatexmkClean!<CR>
|
||||||
map <buffer> <LocalLeader>lg :LatexmkStatus<CR>
|
noremap <buffer> <LocalLeader>lg :LatexmkStatus<CR>
|
||||||
map <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
|
noremap <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
|
||||||
map <buffer> <LocalLeader>lk :LatexmkStop<CR>
|
noremap <buffer> <LocalLeader>lk :LatexmkStop<CR>
|
||||||
map <buffer> <LocalLeader>le :LatexErrors<CR>
|
noremap <buffer> <LocalLeader>le :LatexErrors<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" View {{{
|
" View {{{
|
||||||
map <buffer> <LocalLeader>lv :LatexView<CR>
|
noremap <buffer> <LocalLeader>lv :LatexView<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" TOC {{{
|
" TOC {{{
|
||||||
map <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
|
noremap <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" List of labels {{{
|
" List of labels {{{
|
||||||
map <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
|
noremap <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Folding {{{
|
" Folding {{{
|
||||||
if g:LatexBox_Folding == 1
|
if g:LatexBox_Folding == 1
|
||||||
map <buffer> <LocalLeader>lf :LatexFold<CR>
|
noremap <buffer> <LocalLeader>lf :LatexFold<CR>
|
||||||
endif
|
endif
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
@@ -44,12 +44,12 @@ endif
|
|||||||
" Define text objects {{{
|
" Define text objects {{{
|
||||||
vmap <buffer> ie <Plug>LatexBox_SelectCurrentEnvInner
|
vmap <buffer> ie <Plug>LatexBox_SelectCurrentEnvInner
|
||||||
vmap <buffer> ae <Plug>LatexBox_SelectCurrentEnvOuter
|
vmap <buffer> ae <Plug>LatexBox_SelectCurrentEnvOuter
|
||||||
omap <buffer> ie :normal vie<CR>
|
onoremap <buffer> ie :normal vie<CR>
|
||||||
omap <buffer> ae :normal vae<CR>
|
onoremap <buffer> ae :normal vae<CR>
|
||||||
vmap <buffer> i$ <Plug>LatexBox_SelectInlineMathInner
|
vmap <buffer> i$ <Plug>LatexBox_SelectInlineMathInner
|
||||||
vmap <buffer> a$ <Plug>LatexBox_SelectInlineMathOuter
|
vmap <buffer> a$ <Plug>LatexBox_SelectInlineMathOuter
|
||||||
omap <buffer> i$ :normal vi$<CR>
|
onoremap <buffer> i$ :normal vi$<CR>
|
||||||
omap <buffer> a$ :normal va$<CR>
|
onoremap <buffer> a$ :normal va$<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Jump between sections {{{
|
" Jump between sections {{{
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
|
|||||||
if len(tree) > 3 && empty(tree[1])
|
if len(tree) > 3 && empty(tree[1])
|
||||||
call remove(tree, 1)
|
call remove(tree, 1)
|
||||||
endif
|
endif
|
||||||
if len(tree) > 1 && tree[0] =~ '^\\\(numberline\|tocsection\)'
|
if len(tree) > 1 && type(tree[0]) == type("") && tree[0] =~ '^\\\(numberline\|tocsection\)'
|
||||||
let secnum = LatexBox_TreeToTex(tree[1])
|
let secnum = LatexBox_TreeToTex(tree[1])
|
||||||
let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
|
let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
|
||||||
let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g')
|
let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g')
|
||||||
@@ -379,6 +379,21 @@ function! LatexBox_TOC(...)
|
|||||||
|
|
||||||
" Check if window already exists
|
" Check if window already exists
|
||||||
let winnr = bufwinnr(bufnr('LaTeX TOC'))
|
let winnr = bufwinnr(bufnr('LaTeX TOC'))
|
||||||
|
" Two types of splits, horizontal and vertical
|
||||||
|
let l:hori = "new"
|
||||||
|
let l:vert = "vnew"
|
||||||
|
|
||||||
|
" Set General Vars and initialize size
|
||||||
|
let l:type = g:LatexBox_split_type
|
||||||
|
let l:size = 10
|
||||||
|
|
||||||
|
" Size detection
|
||||||
|
if l:type == l:hori
|
||||||
|
let l:size = g:LatexBox_split_length
|
||||||
|
elseif l:type == l:vert
|
||||||
|
let l:size = g:LatexBox_split_width
|
||||||
|
endif
|
||||||
|
|
||||||
if winnr >= 0
|
if winnr >= 0
|
||||||
if a:0 == 0
|
if a:0 == 0
|
||||||
silent execute winnr . 'wincmd w'
|
silent execute winnr . 'wincmd w'
|
||||||
@@ -386,13 +401,12 @@ function! LatexBox_TOC(...)
|
|||||||
" Supplying an argument to this function causes toggling instead
|
" Supplying an argument to this function causes toggling instead
|
||||||
" of jumping to the TOC window
|
" of jumping to the TOC window
|
||||||
if g:LatexBox_split_resize
|
if g:LatexBox_split_resize
|
||||||
silent exe "set columns-=" . g:LatexBox_split_width
|
silent exe "set columns-=" . l:size
|
||||||
endif
|
endif
|
||||||
silent execute 'bwipeout' . bufnr('LaTeX TOC')
|
silent execute 'bwipeout' . bufnr('LaTeX TOC')
|
||||||
endif
|
endif
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Read TOC
|
" Read TOC
|
||||||
let [toc, fileindices] = s:ReadTOC(LatexBox_GetAuxFile(),
|
let [toc, fileindices] = s:ReadTOC(LatexBox_GetAuxFile(),
|
||||||
\ LatexBox_GetMainTexFile())
|
\ LatexBox_GetMainTexFile())
|
||||||
@@ -403,9 +417,10 @@ function! LatexBox_TOC(...)
|
|||||||
|
|
||||||
" Create TOC window and set local settings
|
" Create TOC window and set local settings
|
||||||
if g:LatexBox_split_resize
|
if g:LatexBox_split_resize
|
||||||
silent exe "set columns+=" . g:LatexBox_split_width
|
silent exe "set columns+=" . l:size
|
||||||
endif
|
endif
|
||||||
silent exe g:LatexBox_split_side g:LatexBox_split_width . 'vnew LaTeX\ TOC'
|
silent exe g:LatexBox_split_side l:size . l:type . ' LaTeX\ TOC'
|
||||||
|
|
||||||
let b:toc = toc
|
let b:toc = toc
|
||||||
let b:toc_numbers = 1
|
let b:toc_numbers = 1
|
||||||
let b:calling_win = bufwinnr(calling_buf)
|
let b:calling_win = bufwinnr(calling_buf)
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ endif
|
|||||||
"---------------------------------------------
|
"---------------------------------------------
|
||||||
|
|
||||||
" Undo the stuff we changed.
|
" Undo the stuff we changed.
|
||||||
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp< path<" .
|
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk< isf< kp< path<" .
|
||||||
\ " | unlet! b:browsefilter"
|
\ " | unlet! b:browsefilter"
|
||||||
|
|
||||||
" proper matching for matchit plugin
|
" proper matching for matchit plugin
|
||||||
|
|||||||
@@ -65,11 +65,22 @@ if !exists("perlpath")
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let &l:path=perlpath
|
" Append perlpath to the existing path value, if it is set. Since we don't
|
||||||
|
" use += to do it because of the commas in perlpath, we have to handle the
|
||||||
|
" global / local settings, too.
|
||||||
|
if &l:path == ""
|
||||||
|
if &g:path == ""
|
||||||
|
let &l:path=perlpath
|
||||||
|
else
|
||||||
|
let &l:path=&g:path.",".perlpath
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let &l:path=&l:path.",".perlpath
|
||||||
|
endif
|
||||||
"---------------------------------------------
|
"---------------------------------------------
|
||||||
|
|
||||||
" Undo the stuff we changed.
|
" Undo the stuff we changed.
|
||||||
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
|
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< isk< kp< path<" .
|
||||||
\ " | unlet! b:browsefilter"
|
\ " | unlet! b:browsefilter"
|
||||||
|
|
||||||
" Restore the saved compatibility options.
|
" Restore the saved compatibility options.
|
||||||
|
|||||||
@@ -1,14 +1,33 @@
|
|||||||
setlocal formatoptions+=ro
|
" Vim filetype plugin
|
||||||
setlocal commentstring=//%s
|
" Language: Scala
|
||||||
let &l:include = '^\s*import'
|
" Maintainer: Derek Wyatt
|
||||||
let &l:includeexpr = 'substitute(v:fname,"\\.","/","g")'
|
" URL: https://github.com/derekwyatt/vim-scala
|
||||||
|
" License: Apache 2
|
||||||
|
" ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if exists('b:did_ftplugin') || &cp
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
" j is fairly new in Vim, so don't complain if it's not there
|
||||||
|
setlocal formatoptions-=t formatoptions+=croqnl
|
||||||
|
silent! setlocal formatoptions+=j
|
||||||
|
|
||||||
|
" Just like c.vim, but additionally doesn't wrap text onto /** line when
|
||||||
|
" formatting. Doesn't bungle bulleted lists when formatting.
|
||||||
|
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
|
||||||
|
setlocal commentstring=//\ %s
|
||||||
|
|
||||||
|
setlocal shiftwidth=2 softtabstop=2 expandtab
|
||||||
|
|
||||||
|
setlocal include='^\s*import'
|
||||||
|
setlocal includeexpr='substitute(v:fname,"\\.","/","g")'
|
||||||
|
|
||||||
setlocal path+=src/main/scala,src/test/scala
|
setlocal path+=src/main/scala,src/test/scala
|
||||||
setlocal suffixesadd=.scala
|
setlocal suffixesadd=.scala
|
||||||
|
|
||||||
set makeprg=sbt\ -Dsbt.log.noformat=true\ compile
|
compiler sbt
|
||||||
set efm=%E\ %#[error]\ %f:%l:\ %m,%C\ %#[error]\ %p^,%-C%.%#,%Z,
|
|
||||||
\%W\ %#[warn]\ %f:%l:\ %m,%C\ %#[warn]\ %p^,%-C%.%#,%Z,
|
|
||||||
\%-G%.%#
|
|
||||||
|
|
||||||
if globpath(&rtp, 'plugin/fuf.vim') != ''
|
if globpath(&rtp, 'plugin/fuf.vim') != ''
|
||||||
"
|
"
|
||||||
@@ -127,49 +146,6 @@ if globpath(&rtp, 'plugin/fuf.vim') != ''
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" If you want to disable the default key mappings, write the following line in
|
|
||||||
" your ~/.vimrc
|
|
||||||
" let g:scala_use_default_keymappings = 0
|
|
||||||
if get(g:, 'scala_use_default_keymappings', 1)
|
|
||||||
nnoremap <buffer> <Leader>jt :call JustifyCurrentLine()<cr>
|
|
||||||
endif
|
|
||||||
|
|
||||||
"
|
|
||||||
" TagBar
|
|
||||||
"
|
|
||||||
let g:tagbar_type_scala = {
|
|
||||||
\ 'ctagstype' : 'scala',
|
|
||||||
\ 'kinds' : [
|
|
||||||
\ 'p:packages:1',
|
|
||||||
\ 'V:values',
|
|
||||||
\ 'v:variables',
|
|
||||||
\ 'T:types',
|
|
||||||
\ 't:traits',
|
|
||||||
\ 'o:objects',
|
|
||||||
\ 'a:aclasses',
|
|
||||||
\ 'c:classes',
|
|
||||||
\ 'r:cclasses',
|
|
||||||
\ 'm:methods'
|
|
||||||
\ ],
|
|
||||||
\ 'sro' : '.',
|
|
||||||
\ 'kind2scope' : {
|
|
||||||
\ 'T' : 'type',
|
|
||||||
\ 't' : 'trait',
|
|
||||||
\ 'o' : 'object',
|
|
||||||
\ 'a' : 'abstract class',
|
|
||||||
\ 'c' : 'class',
|
|
||||||
\ 'r' : 'case class'
|
|
||||||
\ },
|
|
||||||
\ 'scope2kind' : {
|
|
||||||
\ 'type' : 'T',
|
|
||||||
\ 'trait' : 't',
|
|
||||||
\ 'object' : 'o',
|
|
||||||
\ 'abstract class' : 'a',
|
|
||||||
\ 'class' : 'c',
|
|
||||||
\ 'case class' : 'r'
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
|
|
||||||
function! s:CreateOrExpression(keywords)
|
function! s:CreateOrExpression(keywords)
|
||||||
return '('.join(a:keywords, '|').')'
|
return '('.join(a:keywords, '|').')'
|
||||||
endfunction
|
endfunction
|
||||||
@@ -191,5 +167,6 @@ function! s:NextSection(backwards)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
noremap <script> <buffer> <silent> ]] :call <SID>NextSection(0)<cr>
|
noremap <script> <buffer> <silent> ]] :call <SID>NextSection(0)<cr>
|
||||||
|
|
||||||
noremap <script> <buffer> <silent> [[ :call <SID>NextSection(1)<cr>
|
noremap <script> <buffer> <silent> [[ :call <SID>NextSection(1)<cr>
|
||||||
|
|
||||||
|
" vim:set sw=2 sts=2 ts=8 et:
|
||||||
|
|||||||
47
ftplugin/scala/tagbar.vim
Normal file
47
ftplugin/scala/tagbar.vim
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
"
|
||||||
|
" Support for Tagbar -- https://github.com/majutsushi/tagbar
|
||||||
|
"
|
||||||
|
" Hat tip to Leonard Ehrenfried for the built-in ctags deffile:
|
||||||
|
" https://leonard.io/blog/2013/04/editing-scala-with-vim/
|
||||||
|
"
|
||||||
|
if !exists(':Tagbar')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:tagbar_type_scala = {
|
||||||
|
\ 'ctagstype' : 'scala',
|
||||||
|
\ 'kinds' : [
|
||||||
|
\ 'p:packages:1',
|
||||||
|
\ 'V:values',
|
||||||
|
\ 'v:variables',
|
||||||
|
\ 'T:types',
|
||||||
|
\ 't:traits',
|
||||||
|
\ 'o:objects',
|
||||||
|
\ 'a:aclasses',
|
||||||
|
\ 'c:classes',
|
||||||
|
\ 'r:cclasses',
|
||||||
|
\ 'm:methods'
|
||||||
|
\ ],
|
||||||
|
\ 'sro' : '.',
|
||||||
|
\ 'kind2scope' : {
|
||||||
|
\ 'T' : 'type',
|
||||||
|
\ 't' : 'trait',
|
||||||
|
\ 'o' : 'object',
|
||||||
|
\ 'a' : 'abstract class',
|
||||||
|
\ 'c' : 'class',
|
||||||
|
\ 'r' : 'case class'
|
||||||
|
\ },
|
||||||
|
\ 'scope2kind' : {
|
||||||
|
\ 'type' : 'T',
|
||||||
|
\ 'trait' : 't',
|
||||||
|
\ 'object' : 'o',
|
||||||
|
\ 'abstract class' : 'a',
|
||||||
|
\ 'class' : 'c',
|
||||||
|
\ 'case class' : 'r'
|
||||||
|
\ }
|
||||||
|
\ }
|
||||||
|
|
||||||
|
" In case you've updated/customized your ~/.ctags and prefer to use it.
|
||||||
|
if get(g:, 'scala_use_builtin_tagbar_defs', 1)
|
||||||
|
let g:tagbar_type_scala.deffile = expand('<sfile>:p:h:h:h') . '/ctags/scala.ctags'
|
||||||
|
endif
|
||||||
@@ -11,6 +11,8 @@ let b:did_ftplugin = 1
|
|||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
|
setlocal commentstring=#\ %s
|
||||||
|
|
||||||
" Add NERDCommenter delimiters
|
" Add NERDCommenter delimiters
|
||||||
|
|
||||||
let s:delims = { 'left': '#' }
|
let s:delims = { 'left': '#' }
|
||||||
|
|||||||
@@ -37,20 +37,21 @@ function! GoIndent(lnum)
|
|||||||
let previ = indent(prevlnum)
|
let previ = indent(prevlnum)
|
||||||
|
|
||||||
let ind = previ
|
let ind = previ
|
||||||
|
let s:shiftwidth = shiftwidth()
|
||||||
|
|
||||||
if prevl =~ '[({]\s*$'
|
if prevl =~ '[({]\s*$'
|
||||||
" previous line opened a block
|
" previous line opened a block
|
||||||
let ind += &sw
|
let ind += s:shiftwidth
|
||||||
endif
|
endif
|
||||||
if prevl =~# '^\s*\(case .*\|default\):$'
|
if prevl =~# '^\s*\(case .*\|default\):$'
|
||||||
" previous line is part of a switch statement
|
" previous line is part of a switch statement
|
||||||
let ind += &sw
|
let ind += s:shiftwidth
|
||||||
endif
|
endif
|
||||||
" TODO: handle if the previous line is a label.
|
" TODO: handle if the previous line is a label.
|
||||||
|
|
||||||
if thisl =~ '^\s*[)}]'
|
if thisl =~ '^\s*[)}]'
|
||||||
" this line closed a block
|
" this line closed a block
|
||||||
let ind -= &sw
|
let ind -= s:shiftwidth
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Colons are tricky.
|
" Colons are tricky.
|
||||||
@@ -58,7 +59,7 @@ function! GoIndent(lnum)
|
|||||||
" We ignore trying to deal with jump labels because (a) they're rare, and
|
" We ignore trying to deal with jump labels because (a) they're rare, and
|
||||||
" (b) they're hard to disambiguate from a composite literal key.
|
" (b) they're hard to disambiguate from a composite literal key.
|
||||||
if thisl =~# '^\s*\(case .*\|default\):$'
|
if thisl =~# '^\s*\(case .*\|default\):$'
|
||||||
let ind -= &sw
|
let ind -= s:shiftwidth
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return ind
|
return ind
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_st
|
|||||||
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
|
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
|
||||||
|
|
||||||
" Regex that defines continuation lines, not including (, {, or [.
|
" Regex that defines continuation lines, not including (, {, or [.
|
||||||
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)' . s:line_term
|
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\|[^=]=[^=].*,\)' . s:line_term
|
||||||
|
|
||||||
" Regex that defines continuation lines.
|
" Regex that defines continuation lines.
|
||||||
" TODO: this needs to deal with if ...: and so on
|
" TODO: this needs to deal with if ...: and so on
|
||||||
let s:msl_regex = '\%([\\*+/.:([]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)' . s:line_term
|
let s:msl_regex = s:continuation_regex
|
||||||
|
|
||||||
let s:one_line_scope_regex = '\<\%(if\|else\|for\|while\)\>[^{;]*' . s:line_term
|
let s:one_line_scope_regex = '\<\%(if\|else\|for\|while\)\>[^{;]*' . s:line_term
|
||||||
|
|
||||||
@@ -443,11 +443,17 @@ function! Fixedgq(lnum, count)
|
|||||||
let l:tw = &tw ? &tw : 80;
|
let l:tw = &tw ? &tw : 80;
|
||||||
|
|
||||||
let l:count = a:count
|
let l:count = a:count
|
||||||
|
let l:first_char = indent(a:lnum) + 1
|
||||||
|
|
||||||
if mode() == 'i' " gq was not pressed, but tw was set
|
if mode() == 'i' " gq was not pressed, but tw was set
|
||||||
return 1
|
return 1
|
||||||
endif
|
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
|
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -9,13 +9,9 @@ if exists("b:did_indent")
|
|||||||
endif
|
endif
|
||||||
let b:did_indent = 1
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
setlocal autoindent
|
||||||
setlocal indentexpr=GetScalaIndent()
|
setlocal indentexpr=GetScalaIndent()
|
||||||
setlocal indentkeys=0{,0},0),!^F,<>>,o,O,e,=case,<CR>
|
setlocal indentkeys=0{,0},0),!^F,<>>,o,O,e,=case,<CR>
|
||||||
setlocal autoindent
|
|
||||||
setlocal softtabstop=2
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal expandtab
|
|
||||||
|
|
||||||
if exists("*GetScalaIndent")
|
if exists("*GetScalaIndent")
|
||||||
finish
|
finish
|
||||||
@@ -543,7 +539,7 @@ function! GetScalaIndent()
|
|||||||
let ind = ind - 1
|
let ind = ind - 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if scala#LineEndsInIncomplete(curline)
|
if scala#LineEndsInIncomplete(prevline)
|
||||||
call scala#ConditionalConfirm("19")
|
call scala#ConditionalConfirm("19")
|
||||||
return ind
|
return ind
|
||||||
endif
|
endif
|
||||||
@@ -597,5 +593,6 @@ function! GetScalaIndent()
|
|||||||
|
|
||||||
return ind
|
return ind
|
||||||
endfunction
|
endfunction
|
||||||
" vim:set ts=2 sts=2 sw=2:
|
|
||||||
|
" vim:set sw=2 sts=2 ts=8 et:
|
||||||
" vim600:fdm=marker fdl=1 fdc=0:
|
" vim600:fdm=marker fdl=1 fdc=0:
|
||||||
|
|||||||
159
syntax/csv.vim
159
syntax/csv.vim
@@ -1,159 +0,0 @@
|
|||||||
" A simple syntax highlighting, simply alternate colors between two
|
|
||||||
" adjacent columns
|
|
||||||
" Init {{{2
|
|
||||||
let s:cpo_save = &cpo
|
|
||||||
set cpo&vim
|
|
||||||
|
|
||||||
scriptencoding utf8
|
|
||||||
if version < 600
|
|
||||||
syn clear
|
|
||||||
elseif exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Helper functions "{{{2
|
|
||||||
fu! <sid>Warning(msg) "{{{3
|
|
||||||
" Don't redraw, so we are not overwriting messages from the ftplugin
|
|
||||||
" script
|
|
||||||
"redraw!
|
|
||||||
echohl WarningMsg
|
|
||||||
echomsg "CSV Syntax:" . a:msg
|
|
||||||
echohl Normal
|
|
||||||
endfu
|
|
||||||
|
|
||||||
fu! <sid>Esc(val, char) "{{2
|
|
||||||
return '\V'.escape(a:val, '\\'.a:char).'\m'
|
|
||||||
endfu
|
|
||||||
|
|
||||||
fu! <sid>CheckSaneSearchPattern() "{{{3
|
|
||||||
let s:del_def = ','
|
|
||||||
let s:col_def = '\%([^' . s:del_def . ']*' . s:del_def . '\|$\)'
|
|
||||||
let s:col_def_end = '\%([^' . s:del_def . ']*' . s:del_def . '\)'
|
|
||||||
|
|
||||||
" First:
|
|
||||||
" Check for filetype plugin. This syntax script relies on the filetype
|
|
||||||
" plugin, else, it won't work properly.
|
|
||||||
redir => s:a |sil filetype | redir end
|
|
||||||
let s:a=split(s:a, "\n")[0]
|
|
||||||
if match(s:a, '\cplugin:off') > 0
|
|
||||||
call <sid>Warning("No filetype support, only simple highlighting using"
|
|
||||||
\ . s:del_def . " as delimiter! See :h csv-installation")
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Check Comment setting
|
|
||||||
if !exists("g:csv_comment")
|
|
||||||
let b:csv_cmt = split(&cms, '%s')
|
|
||||||
else
|
|
||||||
let b:csv_cmt = split(g:csv_comment, '%s')
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
" Second: Check for sane defaults for the column pattern
|
|
||||||
" Not necessary to check for fixed width columns
|
|
||||||
if exists("b:csv_fixed_width_cols")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
" Try a simple highlighting, if the defaults from the ftplugin
|
|
||||||
" don't exist
|
|
||||||
let s:col = exists("b:col") && !empty(b:col) ? b:col
|
|
||||||
\ : s:col_def
|
|
||||||
let s:col_end = exists("b:col_end") && !empty(b:col_end) ? b:col_end
|
|
||||||
\ : s:col_def_end
|
|
||||||
let s:del = exists("b:delimiter") && !empty(b:delimiter) ? b:delimiter
|
|
||||||
\ : s:del_def
|
|
||||||
let s:cmts = exists("b:csv_cmt") ? b:csv_cmt[0] : split(&cms, '&s')[0]
|
|
||||||
let s:cmte = exists("b:csv_cmt") && len(b:csv_cmt) == 2 ? b:csv_cmt[1]
|
|
||||||
\ : ''
|
|
||||||
|
|
||||||
if line('$') > 1 && (!exists("b:col") || empty(b:col))
|
|
||||||
" check for invalid pattern, ftplugin hasn't been loaded yet
|
|
||||||
call <sid>Warning("Invalid column pattern, using default pattern " . s:col_def)
|
|
||||||
endif
|
|
||||||
endfu
|
|
||||||
|
|
||||||
" Syntax rules {{{2
|
|
||||||
fu! <sid>DoHighlight() "{{{3
|
|
||||||
if has("conceal") && !exists("g:csv_no_conceal") &&
|
|
||||||
\ !exists("b:csv_fixed_width_cols")
|
|
||||||
" old val
|
|
||||||
"\ '\%(.\)\@=/ms=e,me=e contained conceal cchar=' .
|
|
||||||
" Has a problem with the last line!
|
|
||||||
exe "syn match CSVDelimiter /" . s:col_end .
|
|
||||||
\ '/ms=e,me=e contained conceal cchar=' .
|
|
||||||
\ (&enc == "utf-8" ? "│" : '|')
|
|
||||||
"exe "syn match CSVDelimiterEOL /" . s:del .
|
|
||||||
" \ '\?$/ contained conceal cchar=' .
|
|
||||||
" \ (&enc == "utf-8" ? "│" : '|')
|
|
||||||
hi def link CSVDelimiter Conceal
|
|
||||||
elseif !exists("b:csv_fixed_width_cols")
|
|
||||||
" The \%(.\)\@<= makes sure, the last char won't be concealed,
|
|
||||||
" if it isn't a delimiter
|
|
||||||
"exe "syn match CSVDelimiter /" . s:col . '\%(.\)\@<=/ms=e,me=e contained'
|
|
||||||
exe "syn match CSVDelimiter /" . s:col_end . '/ms=e,me=e contained'
|
|
||||||
"exe "syn match CSVDelimiterEOL /" . s:del . '\?$/ contained'
|
|
||||||
if has("conceal")
|
|
||||||
hi def link CSVDelimiter Conceal
|
|
||||||
else
|
|
||||||
hi def link CSVDelimiter Ignore
|
|
||||||
endif
|
|
||||||
endif " There is no delimiter for csv fixed width columns
|
|
||||||
|
|
||||||
|
|
||||||
if !exists("b:csv_fixed_width_cols")
|
|
||||||
exe 'syn match CSVColumnEven nextgroup=CSVColumnOdd /'
|
|
||||||
\ . s:col . '/ contains=CSVDelimiter'
|
|
||||||
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
|
|
||||||
\ . s:col . '/ contains=CSVDelimiter'
|
|
||||||
|
|
||||||
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%1l'
|
|
||||||
\. s:col . '/ contains=CSVDelimiter'
|
|
||||||
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%1l'
|
|
||||||
\. s:col . '/ contains=CSVDelimiter'
|
|
||||||
else
|
|
||||||
for i in range(len(b:csv_fixed_width_cols))
|
|
||||||
let pat = '/\%' . b:csv_fixed_width_cols[i] . 'v.*' .
|
|
||||||
\ ((i == len(b:csv_fixed_width_cols)-1) ? '/' :
|
|
||||||
\ '\%' . b:csv_fixed_width_cols[i+1] . 'v/')
|
|
||||||
|
|
||||||
let group = "CSVColumn" . (i%2 ? "Odd" : "Even" )
|
|
||||||
let ngroup = "CSVColumn" . (i%2 ? "Even" : "Odd" )
|
|
||||||
exe "syn match " group pat " nextgroup=" . ngroup
|
|
||||||
endfor
|
|
||||||
endif
|
|
||||||
" Comment regions
|
|
||||||
exe 'syn match CSVComment /'. <sid>Esc(s:cmts, '/'). '.*'.
|
|
||||||
\ (!empty(s:cmte) ? '\%('. <sid>Esc(s:cmte, '/'). '\)\?'
|
|
||||||
\: ''). '/'
|
|
||||||
hi def link CSVComment Comment
|
|
||||||
endfun
|
|
||||||
|
|
||||||
fu! <sid>DoSyntaxDefinitions() "{{{3
|
|
||||||
syn spell toplevel
|
|
||||||
|
|
||||||
" Not really needed
|
|
||||||
syn case ignore
|
|
||||||
|
|
||||||
hi def link CSVColumnHeaderOdd WarningMsg
|
|
||||||
hi def link CSVColumnHeaderEven WarningMsg
|
|
||||||
hi def link CSVColumnOdd DiffAdd
|
|
||||||
hi def link CSVColumnEven DiffChange
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Main: {{{2
|
|
||||||
" Make sure, we are using a sane, valid pattern for syntax
|
|
||||||
" highlighting
|
|
||||||
call <sid>CheckSaneSearchPattern()
|
|
||||||
|
|
||||||
" Define all necessary syntax groups
|
|
||||||
call <sid>DoSyntaxDefinitions()
|
|
||||||
|
|
||||||
" Highlight the file
|
|
||||||
call <sid>DoHighlight()
|
|
||||||
|
|
||||||
" Set the syntax variable {{{2
|
|
||||||
let b:current_syntax="csv"
|
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
|
||||||
unlet s:cpo_save
|
|
||||||
@@ -15,8 +15,8 @@ syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@el
|
|||||||
syn match elixirComment '#.*' contains=elixirTodo
|
syn match elixirComment '#.*' contains=elixirTodo
|
||||||
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
|
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 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 cond for if unless try receive send
|
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 exit raise throw after rescue catch else do end
|
||||||
syn keyword elixirKeyword quote unquote super
|
syn keyword elixirKeyword quote unquote super
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ if !exists("g:go_highlight_structs")
|
|||||||
let g:go_highlight_structs = 0
|
let g:go_highlight_structs = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists("g:go_highlight_build_constraints")
|
||||||
|
let g:go_highlight_build_constraints = 0
|
||||||
|
endif
|
||||||
|
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
syn keyword goDirective package import
|
syn keyword goDirective package import
|
||||||
@@ -270,6 +274,21 @@ endif
|
|||||||
hi def link goStruct Function
|
hi def link goStruct Function
|
||||||
hi def link goStructDef 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.
|
" Search backwards for a global declaration to start processing the syntax.
|
||||||
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
|
"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 match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent
|
||||||
syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript,jadeTagBlockChar,jadeTagInlineText
|
syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript,jadeTagBlockChar,jadeTagInlineText
|
||||||
syn match jadeComment '\s*\/\/.*$'
|
syn match jadeComment '\s*\/\/.*$'
|
||||||
|
syn region jadeCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
|
||||||
syn region jadeHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
|
syn region jadeHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
|
||||||
syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent
|
syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent
|
||||||
syn match jadeClassChar "\." contained nextgroup=jadeClass
|
syn match jadeClassChar "\." contained nextgroup=jadeClass
|
||||||
@@ -45,7 +46,7 @@ syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$"
|
|||||||
syn keyword jadeHtmlArg contained href title
|
syn keyword jadeHtmlArg contained href title
|
||||||
|
|
||||||
syn match jadePlainChar "\\" contained
|
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 jadeInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)"
|
||||||
syn match jadeTagInlineText "\s.*$" contained contains=jadeInterpolation,jadeTextInlineJade
|
syn match jadeTagInlineText "\s.*$" contained contains=jadeInterpolation,jadeTextInlineJade
|
||||||
syn region jadePipedText matchgroup=jadePipeChar start="|" end="$" contained contains=jadeInterpolation,jadeTextInlineJade nextgroup=jadePipedText skipnl
|
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 jadeFilter PreProc
|
||||||
hi def link jadeDocType PreProc
|
hi def link jadeDocType PreProc
|
||||||
hi def link jadeComment Comment
|
hi def link jadeComment Comment
|
||||||
|
hi def link jadeCommentBlock Comment
|
||||||
hi def link jadeHtmlConditionalComment jadeComment
|
hi def link jadeHtmlConditionalComment jadeComment
|
||||||
|
|
||||||
let b:current_syntax = "jade"
|
let b:current_syntax = "jade"
|
||||||
|
|||||||
@@ -35,7 +35,13 @@ syntax keyword jsOperator delete instanceof typeof void new in
|
|||||||
syntax match jsOperator /\(!\||\|&\|+\|-\|<\|>\|=\|%\|\/\|*\|\~\|\^\)/
|
syntax match jsOperator /\(!\||\|&\|+\|-\|<\|>\|=\|%\|\/\|*\|\~\|\^\)/
|
||||||
syntax keyword jsBooleanTrue true
|
syntax keyword jsBooleanTrue true
|
||||||
syntax keyword jsBooleanFalse false
|
syntax keyword jsBooleanFalse false
|
||||||
syntax keyword jsCommonJS require module exports
|
syntax keyword jsModules import export contained
|
||||||
|
syntax keyword jsModuleWords default from as contained
|
||||||
|
syntax keyword jsOf of contained
|
||||||
|
|
||||||
|
syntax region jsImportContainer start="^\s\?import \?" end="$" contains=jsModules,jsModuleWords,jsComment,jsStringS,jsStringD,jsTemplateString
|
||||||
|
|
||||||
|
syntax region jsExportContainer start="^\s\?export \?" end="$" contains=jsModules,jsModuleWords,jsComment,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsClass,jsStorageClass,jsPrototype,jsBuiltins,jsNoise,jsAssignmentExpr
|
||||||
|
|
||||||
"" JavaScript comments
|
"" JavaScript comments
|
||||||
syntax keyword jsCommentTodo TODO FIXME XXX TBD contained
|
syntax keyword jsCommentTodo TODO FIXME XXX TBD contained
|
||||||
@@ -53,10 +59,10 @@ if !exists("javascript_ignore_javaScriptdoc")
|
|||||||
"syntax include @javaHtml <sfile>:p:h/html.vim
|
"syntax include @javaHtml <sfile>:p:h/html.vim
|
||||||
"unlet b:current_syntax
|
"unlet b:current_syntax
|
||||||
|
|
||||||
syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
|
syntax region jsBlockComment matchgroup=jsComment start="/\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
|
||||||
|
|
||||||
" tags containing a param
|
" 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
|
" tags containing type and param
|
||||||
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
|
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
|
||||||
" tags containing type but no param
|
" tags containing type but no param
|
||||||
@@ -70,7 +76,7 @@ if !exists("javascript_ignore_javaScriptdoc")
|
|||||||
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite
|
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite
|
||||||
syntax region jsDocTypeNoParam start="{" end="}" oneline contained
|
syntax region jsDocTypeNoParam start="{" end="}" oneline contained
|
||||||
syntax match jsDocTypeNoParam contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+"
|
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 region jsDocSeeTag contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags
|
||||||
|
|
||||||
syntax case match
|
syntax case match
|
||||||
@@ -79,26 +85,33 @@ endif "" JSDoc end
|
|||||||
syntax case match
|
syntax case match
|
||||||
|
|
||||||
"" Syntax in the JavaScript code
|
"" Syntax in the JavaScript code
|
||||||
syntax match jsFuncCall /\k\+\%(\s*(\)\@=/
|
syntax match jsFuncCall /\k\+\%(\s*(\)\@=/
|
||||||
syntax match jsSpecial "\v\\%(0|\\x\x\{2\}\|\\u\x\{4\}\|\c[A-Z]|.)" contained
|
syntax match jsSpecial "\v\\%(0|\\x\x\{2\}\|\\u\x\{4\}\|\c[A-Z]|.)" contained
|
||||||
syntax match jsTemplateVar "\${.\{-}}" contained
|
syntax match jsTemplateVar "\${.\{-}}" contained
|
||||||
syntax region jsStringD start=+"+ skip=+\\\("\|$\)+ end=+"\|$+ contains=jsSpecial,@htmlPreproc,@Spell
|
syntax region jsStringD start=+"+ skip=+\\\("\|$\)+ end=+"\|$+ contains=jsSpecial,@htmlPreproc,@Spell
|
||||||
syntax region jsStringS start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contains=jsSpecial,@htmlPreproc,@Spell
|
syntax region jsStringS start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contains=jsSpecial,@htmlPreproc,@Spell
|
||||||
syntax region jsTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`\|$+ contains=jsTemplateVar,jsSpecial,@htmlPreproc
|
syntax region jsTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=jsTemplateVar,jsSpecial,@htmlPreproc
|
||||||
syntax region jsRegexpCharClass start=+\[+ skip=+\\.+ end=+\]+ contained
|
syntax region jsTaggedTemplate start=/\k\+\(\(\n\|\s\)\+\)\?`/ end=+`\|$+ contains=jsTemplateString
|
||||||
|
syntax region jsRegexpCharClass start=+\[+ skip=+\\.+ end=+\]+ contained
|
||||||
syntax match jsRegexpBoundary "\v%(\<@![\^$]|\\[bB])" contained
|
syntax match jsRegexpBoundary "\v%(\<@![\^$]|\\[bB])" contained
|
||||||
syntax match jsRegexpBackRef "\v\\[1-9][0-9]*" contained
|
syntax match jsRegexpBackRef "\v\\[1-9][0-9]*" contained
|
||||||
syntax match jsRegexpQuantifier "\v\\@<!%([?*+]|\{\d+%(,|,\d+)?})\??" contained
|
syntax match jsRegexpQuantifier "\v\\@<!%([?*+]|\{\d+%(,|,\d+)?})\??" contained
|
||||||
syntax match jsRegexpOr "\v\<@!\|" contained
|
syntax match jsRegexpOr "\v\<@!\|" contained
|
||||||
syntax match jsRegexpMod "\v\(@<=\?[:=!>]" contained
|
syntax match jsRegexpMod "\v\(@<=\?[:=!>]" contained
|
||||||
syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod
|
syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod
|
||||||
syntax region jsRegexpGroup start="\\\@<!(" skip="\\.\|\[\(\\.\|[^]]\)*\]" end="\\\@<!)" contained contains=jsRegexpCharClass,@jsRegexpSpecial keepend
|
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 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 keyword jsNumber Infinity
|
||||||
syntax match jsFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/
|
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 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 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 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 : '')
|
exe 'syntax keyword jsReturn return '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '')
|
||||||
@@ -106,23 +119,26 @@ exe 'syntax keyword jsUndefined undefined '.(exists('g:javascript_conceal_undefi
|
|||||||
exe 'syntax keyword jsNan NaN '.(exists('g:javascript_conceal_NaN') ? 'conceal cchar='.g:javascript_conceal_NaN : '')
|
exe 'syntax keyword jsNan NaN '.(exists('g:javascript_conceal_NaN') ? 'conceal cchar='.g:javascript_conceal_NaN : '')
|
||||||
exe 'syntax keyword jsPrototype prototype '.(exists('g:javascript_conceal_prototype') ? 'conceal cchar='.g:javascript_conceal_prototype : '')
|
exe 'syntax keyword jsPrototype prototype '.(exists('g:javascript_conceal_prototype') ? 'conceal cchar='.g:javascript_conceal_prototype : '')
|
||||||
exe 'syntax keyword jsThis this '.(exists('g:javascript_conceal_this') ? 'conceal cchar='.g:javascript_conceal_this : '')
|
exe 'syntax keyword jsThis this '.(exists('g:javascript_conceal_this') ? 'conceal cchar='.g:javascript_conceal_this : '')
|
||||||
|
exe 'syntax keyword jsStatic static '.(exists('g:javascript_conceal_static') ? 'conceal cchar='.g:javascript_conceal_static : '')
|
||||||
|
exe 'syntax keyword jsSuper super '.(exists('g:javascript_conceal_super') ? 'conceal cchar='.g:javascript_conceal_super : '')
|
||||||
|
|
||||||
"" Statement Keywords
|
"" Statement Keywords
|
||||||
syntax keyword jsStatement break continue with
|
syntax keyword jsStatement break continue with
|
||||||
syntax keyword jsConditional if else switch
|
syntax keyword jsConditional if else switch
|
||||||
syntax keyword jsRepeat do while for
|
syntax keyword jsRepeat do while for
|
||||||
syntax keyword jsLabel case default
|
syntax keyword jsLabel case default
|
||||||
syntax keyword jsKeyword yield import export default extends class
|
syntax keyword jsKeyword yield
|
||||||
|
syntax keyword jsClass extends class
|
||||||
syntax keyword jsException try catch throw finally
|
syntax keyword jsException try catch throw finally
|
||||||
|
|
||||||
syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object RegExp String Proxy ParallelArray ArrayBuffer DataView Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Intl JSON Math console document window
|
syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object Symbol Map WeakMap Set RegExp String Proxy Promise ParallelArray ArrayBuffer DataView Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Intl JSON Math console document window
|
||||||
syntax match jsGlobalObjects /\%(Intl\.\)\@<=\(Collator\|DateTimeFormat\|NumberFormat\)/
|
syntax match jsGlobalObjects /\%(Intl\.\)\@<=\(Collator\|DateTimeFormat\|NumberFormat\)/
|
||||||
|
|
||||||
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
|
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
|
||||||
|
|
||||||
syntax keyword jsBuiltins decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseInt uneval
|
syntax keyword jsBuiltins decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseInt uneval
|
||||||
|
|
||||||
syntax keyword jsFutureKeys abstract enum int short boolean interface static byte long super char final native synchronized float package throws goto private transient debugger implements protected volatile double public
|
syntax keyword jsFutureKeys abstract enum int short boolean interface byte long char final native synchronized float package throws goto private transient debugger implements protected volatile double public
|
||||||
|
|
||||||
"" DOM/HTML/CSS specified things
|
"" DOM/HTML/CSS specified things
|
||||||
|
|
||||||
@@ -172,12 +188,11 @@ endif "DOM/HTML/CSS
|
|||||||
|
|
||||||
"" end DOM/HTML/CSS specified things
|
"" end DOM/HTML/CSS specified things
|
||||||
|
|
||||||
|
|
||||||
"" Code blocks
|
"" 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,jsBlockComment,jsTaggedTemplate,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsStatic,jsSuper,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,jsImportContainer,jsExportContainer,jsClass
|
||||||
syntax cluster jsAll contains=@jsExpression,jsLabel,jsConditional,jsRepeat,jsReturn,jsStatement,jsTernaryIf,jsException
|
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 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
|
syntax region jsParen matchgroup=jsParens start="(" end=")" contains=@jsAll,jsOf,jsParensErrA,jsParensErrC,jsParen,jsBracket,jsBlock,@htmlPreproc fold
|
||||||
syntax region jsBlock matchgroup=jsBraces start="{" end="}" contains=@jsAll,jsParensErrA,jsParensErrB,jsParen,jsBracket,jsBlock,jsObjectKey,@htmlPreproc fold
|
syntax region jsBlock matchgroup=jsBraces start="{" end="}" contains=@jsAll,jsParensErrA,jsParensErrB,jsParen,jsBracket,jsBlock,jsObjectKey,@htmlPreproc fold
|
||||||
syntax region jsFuncBlock matchgroup=jsFuncBraces start="{" end="}" contains=@jsAll,jsParensErrA,jsParensErrB,jsParen,jsBracket,jsBlock,@htmlPreproc contained fold
|
syntax region jsFuncBlock matchgroup=jsFuncBraces start="{" end="}" contains=@jsAll,jsParensErrA,jsParensErrB,jsParen,jsBracket,jsBlock,@htmlPreproc contained fold
|
||||||
syntax region jsTernaryIf matchgroup=jsTernaryIfOperator start=+?+ end=+:+ contains=@jsExpression,jsTernaryIf
|
syntax region jsTernaryIf matchgroup=jsTernaryIfOperator start=+?+ end=+:+ contains=@jsExpression,jsTernaryIf
|
||||||
@@ -194,10 +209,11 @@ if main_syntax == "javascript"
|
|||||||
syntax sync match jsHighlight grouphere jsBlock /{/
|
syntax sync match jsHighlight grouphere jsBlock /{/
|
||||||
endif
|
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 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 region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest,jsAssignmentExpr nextgroup=jsFuncBlock keepend skipwhite skipempty
|
||||||
syntax match jsFuncArgCommas contained ','
|
syntax match jsFuncArgCommas contained ','
|
||||||
syntax match jsFuncArgRest contained /\%(\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*\))/
|
syntax match jsFuncArgRest contained /\%(\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*\))/
|
||||||
syntax keyword jsArgsObj arguments contained containedin=jsFuncBlock
|
syntax keyword jsArgsObj arguments contained containedin=jsFuncBlock
|
||||||
@@ -218,7 +234,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
|||||||
HiLink jsComment Comment
|
HiLink jsComment Comment
|
||||||
HiLink jsLineComment Comment
|
HiLink jsLineComment Comment
|
||||||
HiLink jsEnvComment PreProc
|
HiLink jsEnvComment PreProc
|
||||||
HiLink jsDocComment Comment
|
HiLink jsBlockComment Comment
|
||||||
HiLink jsCommentTodo Todo
|
HiLink jsCommentTodo Todo
|
||||||
HiLink jsCvsTag Function
|
HiLink jsCvsTag Function
|
||||||
HiLink jsDocTags Special
|
HiLink jsDocTags Special
|
||||||
@@ -229,6 +245,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
|||||||
HiLink jsStringS String
|
HiLink jsStringS String
|
||||||
HiLink jsStringD String
|
HiLink jsStringD String
|
||||||
HiLink jsTemplateString String
|
HiLink jsTemplateString String
|
||||||
|
HiLink jsTaggedTemplate StorageClass
|
||||||
HiLink jsTernaryIfOperator Conditional
|
HiLink jsTernaryIfOperator Conditional
|
||||||
HiLink jsRegexpString String
|
HiLink jsRegexpString String
|
||||||
HiLink jsRegexpBoundary SpecialChar
|
HiLink jsRegexpBoundary SpecialChar
|
||||||
@@ -250,6 +267,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
|||||||
HiLink jsKeyword Keyword
|
HiLink jsKeyword Keyword
|
||||||
HiLink jsArrowFunction Type
|
HiLink jsArrowFunction Type
|
||||||
HiLink jsFunction Type
|
HiLink jsFunction Type
|
||||||
|
HiLink jsGenerator jsFunction
|
||||||
HiLink jsFuncName Function
|
HiLink jsFuncName Function
|
||||||
HiLink jsArgsObj Special
|
HiLink jsArgsObj Special
|
||||||
HiLink jsError Error
|
HiLink jsError Error
|
||||||
@@ -258,8 +276,12 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
|||||||
HiLink jsParensErrB Error
|
HiLink jsParensErrB Error
|
||||||
HiLink jsParensErrC Error
|
HiLink jsParensErrC Error
|
||||||
HiLink jsOperator Operator
|
HiLink jsOperator Operator
|
||||||
|
HiLink jsOf Operator
|
||||||
HiLink jsStorageClass StorageClass
|
HiLink jsStorageClass StorageClass
|
||||||
|
HiLink jsClass Structure
|
||||||
HiLink jsThis Special
|
HiLink jsThis Special
|
||||||
|
HiLink jsStatic Special
|
||||||
|
HiLink jsSuper Special
|
||||||
HiLink jsNan Number
|
HiLink jsNan Number
|
||||||
HiLink jsNull Type
|
HiLink jsNull Type
|
||||||
HiLink jsUndefined Type
|
HiLink jsUndefined Type
|
||||||
@@ -279,7 +301,8 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
|||||||
HiLink jsExceptions Special
|
HiLink jsExceptions Special
|
||||||
HiLink jsFutureKeys Special
|
HiLink jsFutureKeys Special
|
||||||
HiLink jsBuiltins Special
|
HiLink jsBuiltins Special
|
||||||
HiLink jsCommonJS Include
|
HiLink jsModules Include
|
||||||
|
HiLink jsModuleWords Include
|
||||||
|
|
||||||
HiLink jsDomErrNo Constant
|
HiLink jsDomErrNo Constant
|
||||||
HiLink jsDomNodeConsts Constant
|
HiLink jsDomNodeConsts Constant
|
||||||
@@ -296,10 +319,9 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Define the htmlJavaScript for HTML syntax html.vim
|
" Define the htmlJavaScript for HTML syntax html.vim
|
||||||
"syntax clear htmlJavaScript
|
|
||||||
"syntax clear jsExpression
|
|
||||||
syntax cluster htmlJavaScript contains=@jsAll,jsBracket,jsParen,jsBlock
|
syntax cluster htmlJavaScript contains=@jsAll,jsBracket,jsParen,jsBlock
|
||||||
syntax cluster javaScriptExpression contains=@jsAll,jsBracket,jsParen,jsBlock,@htmlPreproc
|
syntax cluster javaScriptExpression contains=@jsAll,jsBracket,jsParen,jsBlock,@htmlPreproc
|
||||||
|
|
||||||
" Vim's default html.vim highlights all javascript as 'Special'
|
" Vim's default html.vim highlights all javascript as 'Special'
|
||||||
hi! def link javaScript NONE
|
hi! def link javaScript NONE
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ elseif !exists("b:jst_subtype") && main_syntax == 'jst'
|
|||||||
let b:jst_subtype = 'haml'
|
let b:jst_subtype = 'haml'
|
||||||
elseif b:jst_subtype == 'ejs'
|
elseif b:jst_subtype == 'ejs'
|
||||||
let b:jst_subtype = 'html'
|
let b:jst_subtype = 'html'
|
||||||
|
elseif b:jst_subtype == 'ect'
|
||||||
|
let b:jst_subtype = 'html'
|
||||||
elseif b:jst_subtype == 'rb'
|
elseif b:jst_subtype == 'rb'
|
||||||
let b:jst_subtype = 'ruby'
|
let b:jst_subtype = 'ruby'
|
||||||
elseif b:jst_subtype == 'yml'
|
elseif b:jst_subtype == 'yml'
|
||||||
@@ -70,4 +72,14 @@ if main_syntax == 'jst'
|
|||||||
unlet main_syntax
|
unlet main_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
set commentstring=<!--%s-->
|
||||||
|
|
||||||
|
if exists("loaded_matchit")
|
||||||
|
let b:match_ignorecase = 1
|
||||||
|
let b:match_words = '<:>,' .
|
||||||
|
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
|
||||||
|
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
|
||||||
|
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||||
|
endif
|
||||||
|
|
||||||
" vim: nowrap sw=2 sts=2 ts=8:
|
" vim: nowrap sw=2 sts=2 ts=8:
|
||||||
|
|||||||
@@ -329,19 +329,24 @@ syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s
|
|||||||
" XXX Any statements after the identifier are in perlString colour (i.e.
|
" 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
|
" 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it
|
||||||
" seems due to the 'auto-extending nature' of regions.
|
" 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")
|
if exists("perl_fold")
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold extend
|
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold extend
|
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold extend
|
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold extend
|
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,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
|
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend
|
||||||
else
|
else
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ
|
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ
|
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ
|
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine
|
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,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
|
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -533,10 +533,10 @@ syn match phpOperator "&&\|\<and\>" contained display
|
|||||||
syn match phpOperator "||\|\<x\=or\>" contained display
|
syn match phpOperator "||\|\<x\=or\>" contained display
|
||||||
syn match phpOperator "[!=<>]=" contained display
|
syn match phpOperator "[!=<>]=" 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
|
syn match phpVarSelector "\$" contained display
|
||||||
" highlight object variables inside strings
|
" highlight static and object variables inside strings
|
||||||
syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble
|
syn match phpMethodsVar "\%(->\|::$\?\)\h\w*" contained contains=phpMethods,phpMemberSelector,phpIdentifier display containedin=phpStringDouble
|
||||||
syn match phpSplatOperator "\.\.\." contained display
|
syn match phpSplatOperator "\.\.\." contained display
|
||||||
|
|
||||||
" Identifier
|
" Identifier
|
||||||
|
|||||||
@@ -130,9 +130,14 @@ syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][io
|
|||||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
||||||
|
|
||||||
" Normal String and Shell Command Output
|
" Normal String and Shell Command Output
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
if exists('ruby_spellcheck_strings')
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold
|
||||||
|
else
|
||||||
|
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
||||||
|
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
||||||
|
endif
|
||||||
|
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
||||||
|
|
||||||
" Generalized Single Quoted String, Symbol and Array of Strings
|
" Generalized Single Quoted String, Symbol and Array of Strings
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
||||||
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
||||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||||
" Last Change: July 18, 2014
|
" Last Change: January 5, 2015
|
||||||
|
|
||||||
if version < 600
|
if version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
@@ -56,10 +56,10 @@ 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 abstract final override
|
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override macro
|
||||||
|
|
||||||
" Built-in types {{{2
|
" 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
|
syn keyword rustType f64 i8 i16 i32 i64 str Self
|
||||||
|
|
||||||
" Things from the prelude (src/libstd/prelude.rs) {{{2
|
" 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
|
" Reexported core operators {{{3
|
||||||
syn keyword rustTrait Copy Send Sized Sync
|
syn keyword rustTrait Copy Send Sized Sync
|
||||||
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
|
syn keyword rustTrait Drop Fn FnMut FnOnce
|
||||||
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
|
|
||||||
|
|
||||||
" Reexported functions {{{3
|
" Reexported functions {{{3
|
||||||
"syn keyword rustFunction range repeat
|
syn keyword rustFunction drop
|
||||||
"syn keyword rustFunction drop
|
|
||||||
"syn keyword rustFunction from_str
|
|
||||||
|
|
||||||
" Reexported types and traits {{{3
|
" Reexported types and traits {{{3
|
||||||
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
|
syn keyword rustTrait Box
|
||||||
syn keyword rustTrait IntoBytes
|
syn keyword rustTrait CharExt
|
||||||
syn keyword rustTrait ToCStr
|
|
||||||
syn keyword rustTrait Char UnicodeChar
|
|
||||||
syn keyword rustTrait Clone
|
syn keyword rustTrait Clone
|
||||||
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
||||||
syn keyword rustEnum Ordering Equiv
|
syn keyword rustTrait DoubleEndedIterator
|
||||||
syn keyword rustEnumVariant Less Equal Greater
|
syn keyword rustTrait ExactSizeIterator
|
||||||
syn keyword rustTrait FromIterator Extend ExactSizeIterator
|
syn keyword rustTrait Iterator IteratorExt Extend
|
||||||
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 rustEnum Option
|
syn keyword rustEnum Option
|
||||||
syn keyword rustEnumVariant Some None
|
syn keyword rustEnumVariant Some None
|
||||||
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
|
syn keyword rustTrait PtrExt MutPtrExt
|
||||||
syn keyword rustTrait RawPtr RawMutPtr
|
|
||||||
syn keyword rustEnum Result
|
syn keyword rustEnum Result
|
||||||
syn keyword rustEnumVariant Ok Err
|
syn keyword rustEnumVariant Ok Err
|
||||||
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
|
syn keyword rustTrait AsSlice
|
||||||
syn keyword rustTrait Str StrVector StrPrelude
|
syn keyword rustTrait SliceExt SliceConcatExt
|
||||||
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude
|
syn keyword rustTrait Str StrExt
|
||||||
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
|
syn keyword rustTrait String ToString
|
||||||
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 Vec
|
syn keyword rustTrait Vec
|
||||||
|
" FIXME: remove when path reform lands
|
||||||
" Reexported runtime types {{{3
|
syn keyword rustTrait Path GenericPath
|
||||||
"syn keyword rustFunction sync_channel channel
|
" FIXME: remove when I/O reform lands
|
||||||
syn keyword rustTrait SyncSender Sender Receiver
|
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
|
||||||
"syn keyword rustFunction spawn
|
|
||||||
|
|
||||||
" Other syntax {{{2
|
" Other syntax {{{2
|
||||||
|
|
||||||
syn keyword rustSelf self
|
syn keyword rustSelf self
|
||||||
syn keyword rustBoolean true false
|
syn keyword rustBoolean true false
|
||||||
|
|
||||||
@@ -157,14 +133,14 @@ syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustE
|
|||||||
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
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 rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
|
||||||
|
|
||||||
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDeriving
|
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive
|
||||||
syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait
|
syn region rustDerive start="derive(" end=")" contained contains=rustTrait
|
||||||
|
|
||||||
" Number literals
|
" Number literals
|
||||||
syn match rustDecNumber display "\<[0-9][0-9_]*\%([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]\%(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]\%(8\|16\|32\|64\)\=\)\="
|
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
|
||||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(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
|
" 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,
|
||||||
@@ -263,7 +239,7 @@ hi def link rustMacro Macro
|
|||||||
hi def link rustType Type
|
hi def link rustType Type
|
||||||
hi def link rustTodo Todo
|
hi def link rustTodo Todo
|
||||||
hi def link rustAttribute PreProc
|
hi def link rustAttribute PreProc
|
||||||
hi def link rustDeriving PreProc
|
hi def link rustDerive PreProc
|
||||||
hi def link rustStorage StorageClass
|
hi def link rustStorage StorageClass
|
||||||
hi def link rustObsoleteStorage Error
|
hi def link rustObsoleteStorage Error
|
||||||
hi def link rustLifetime Special
|
hi def link rustLifetime Special
|
||||||
@@ -275,7 +251,7 @@ hi def link rustBoxPlacementExpr rustKeyword
|
|||||||
|
|
||||||
" Other Suggestions:
|
" Other Suggestions:
|
||||||
" hi rustAttribute ctermfg=cyan
|
" hi rustAttribute ctermfg=cyan
|
||||||
" hi rustDeriving ctermfg=cyan
|
" hi rustDerive ctermfg=cyan
|
||||||
" hi rustAssert ctermfg=yellow
|
" hi rustAssert ctermfg=yellow
|
||||||
" hi rustPanic ctermfg=red
|
" hi rustPanic ctermfg=red
|
||||||
" hi rustMacro ctermfg=magenta
|
" hi rustMacro ctermfg=magenta
|
||||||
|
|||||||
@@ -1,22 +1,40 @@
|
|||||||
if version < 600
|
" Vim syntax file
|
||||||
syntax clear
|
" Language: Scala
|
||||||
elseif exists("b:current_syntax")
|
" Maintainer: Derek Wyatt
|
||||||
finish
|
" URL: https://github.com/derekwyatt/vim-scala
|
||||||
|
" License: Apache 2
|
||||||
|
" ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if !exists('main_syntax')
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let main_syntax = 'scala'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
let b:current_syntax = "scala"
|
let b:current_syntax = "scala"
|
||||||
|
|
||||||
|
" Allows for embedding, see #59; main_syntax convention instead? Refactor TOP
|
||||||
|
"
|
||||||
|
" The @Spell here is a weird hack, it means *exclude* if the first group is
|
||||||
|
" TOP. Otherwise we get spelling errors highlighted on code elements that
|
||||||
|
" match scalaBlock, even with `syn spell notoplevel`.
|
||||||
function! s:ContainedGroup()
|
function! s:ContainedGroup()
|
||||||
try
|
try
|
||||||
silent syn list @scala
|
silent syn list @scala
|
||||||
return '@scala'
|
return '@scala,@NoSpell'
|
||||||
catch /E392/
|
catch /E392/
|
||||||
return 'TOP'
|
return 'TOP,@Spell'
|
||||||
endtry
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
syn include @scalaHtml syntax/html.vim " Doc comment HTML
|
||||||
|
unlet! b:current_syntax
|
||||||
|
|
||||||
syn case match
|
syn case match
|
||||||
syn sync minlines=200 maxlines=1000
|
syn sync minlines=200 maxlines=1000
|
||||||
|
|
||||||
@@ -58,6 +76,9 @@ syn match scalaInstanceHash /#/ contained nextgroup=scalaInstanceDeclaration
|
|||||||
hi link scalaInstanceDeclaration Special
|
hi link scalaInstanceDeclaration Special
|
||||||
hi link scalaInstanceHash Type
|
hi link scalaInstanceHash Type
|
||||||
|
|
||||||
|
syn match scalaUnimplemented /???/
|
||||||
|
hi link scalaUnimplemented ERROR
|
||||||
|
|
||||||
syn match scalaCapitalWord /\<[A-Z][A-Za-z0-9$]*\>/
|
syn match scalaCapitalWord /\<[A-Z][A-Za-z0-9$]*\>/
|
||||||
hi link scalaCapitalWord Special
|
hi link scalaCapitalWord Special
|
||||||
|
|
||||||
@@ -97,12 +118,15 @@ hi link scalaCaseFollowing Special
|
|||||||
syn keyword scalaKeywordModifier abstract override final lazy implicit implicitly private protected sealed null require super
|
syn keyword scalaKeywordModifier abstract override final lazy implicit implicitly private protected sealed null require super
|
||||||
hi link scalaKeywordModifier Function
|
hi link scalaKeywordModifier Function
|
||||||
|
|
||||||
syn keyword scalaSpecial this true false package import ne eq
|
syn keyword scalaSpecial this true false ne eq
|
||||||
syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite
|
syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite
|
||||||
syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)"
|
syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)"
|
||||||
syn match scalaSpecial /`[^`]*`/ " Backtick literals
|
syn match scalaSpecial /`[^`]*`/ " Backtick literals
|
||||||
hi link scalaSpecial PreProc
|
hi link scalaSpecial PreProc
|
||||||
|
|
||||||
|
syn keyword scalaExternal package import
|
||||||
|
hi link scalaExternal Include
|
||||||
|
|
||||||
syn match scalaStringEmbeddedQuote /\\"/ contained
|
syn match scalaStringEmbeddedQuote /\\"/ contained
|
||||||
syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scalaEscapedChar,scalaUnicodeChar
|
syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scalaEscapedChar,scalaUnicodeChar
|
||||||
hi link scalaString String
|
hi link scalaString String
|
||||||
@@ -146,7 +170,7 @@ syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained
|
|||||||
hi link scalaTypeOperator Keyword
|
hi link scalaTypeOperator Keyword
|
||||||
hi link scalaTypeAnnotationParameter Function
|
hi link scalaTypeAnnotationParameter Function
|
||||||
|
|
||||||
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaCommentCodeBlock,@scalaHtml keepend
|
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaCommentCodeBlock,@scalaHtml,@Spell keepend
|
||||||
syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
|
syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
|
||||||
syn match scalaParameterAnnotation "@param" nextgroup=scalaParamAnnotationValue skipwhite contained
|
syn match scalaParameterAnnotation "@param" nextgroup=scalaParamAnnotationValue skipwhite contained
|
||||||
syn match scalaParamAnnotationValue /[`_A-Za-z0-9$]\+/ contained
|
syn match scalaParamAnnotationValue /[`_A-Za-z0-9$]\+/ contained
|
||||||
@@ -162,7 +186,7 @@ hi link scalaCommentCodeBlock String
|
|||||||
syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/
|
syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/
|
||||||
hi link scalaAnnotation PreProc
|
hi link scalaAnnotation PreProc
|
||||||
|
|
||||||
syn match scalaTrailingComment "//.*$"
|
syn match scalaTrailingComment "//.*$" contains=@Spell
|
||||||
hi link scalaTrailingComment Comment
|
hi link scalaTrailingComment Comment
|
||||||
|
|
||||||
syn match scalaAkkaFSM /goto([^)]*)\_s\+\<using\>/ contains=scalaAkkaFSMGotoUsing
|
syn match scalaAkkaFSM /goto([^)]*)\_s\+\<using\>/ contains=scalaAkkaFSMGotoUsing
|
||||||
@@ -178,3 +202,11 @@ syn match scalaAkkaFSMGotoUsing /\<using\>/
|
|||||||
syn match scalaAkkaFSMGotoUsing /\<goto\>/
|
syn match scalaAkkaFSMGotoUsing /\<goto\>/
|
||||||
hi link scalaAkkaFSM PreProc
|
hi link scalaAkkaFSM PreProc
|
||||||
hi link scalaAkkaFSMGotoUsing PreProc
|
hi link scalaAkkaFSMGotoUsing PreProc
|
||||||
|
|
||||||
|
let b:current_syntax = 'scala'
|
||||||
|
|
||||||
|
if main_syntax ==# 'scala'
|
||||||
|
unlet main_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
" vim:set sw=2 sts=2 ts=8 et:
|
||||||
|
|||||||
289
syntax/tmux.vim
289
syntax/tmux.vim
@@ -3,6 +3,20 @@
|
|||||||
" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net>
|
" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net>
|
||||||
" Last Change: $Date: 2010-07-27 18:29:07 $
|
" Last Change: $Date: 2010-07-27 18:29:07 $
|
||||||
" License: This file is placed in the public domain.
|
" License: This file is placed in the public domain.
|
||||||
|
"
|
||||||
|
" To install this file:
|
||||||
|
"
|
||||||
|
" - Drop the file in the syntax directory into runtimepath (such as
|
||||||
|
" ~/.vim/syntax/tmux.vim).
|
||||||
|
" - Make the filetype recognisable by adding the following to filetype.vim
|
||||||
|
" (~/.vim/filetype.vim):
|
||||||
|
"
|
||||||
|
" augroup filetypedetect
|
||||||
|
" au BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
|
||||||
|
" augroup END
|
||||||
|
"
|
||||||
|
" - Switch on syntax highlighting by adding "syntax enable" to .vimrc.
|
||||||
|
"
|
||||||
|
|
||||||
if version < 600
|
if version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
@@ -17,60 +31,237 @@ syn keyword tmuxAction any current none
|
|||||||
syn keyword tmuxBoolean off on
|
syn keyword tmuxBoolean off on
|
||||||
|
|
||||||
syn keyword tmuxCmds
|
syn keyword tmuxCmds
|
||||||
\ attach[-session] detach[-client] has[-session] kill-server
|
\ attach[-session]
|
||||||
\ kill-session lsc list-clients lscm list-commands ls list-sessions
|
\ bind[-key]
|
||||||
\ lockc lock-client locks lock-session new[-session] refresh[-client]
|
\ break-pane
|
||||||
\ rename[-session] showmsgs show-messages source[-file] start[-server]
|
\ breakp
|
||||||
\ suspendc suspend-client switchc switch-client copy-mode
|
\ capture-pane
|
||||||
\ breakp break-pane capturep capture-pane choose-client choose-session
|
\ capturep
|
||||||
\ choose-tree choose-window displayp display-panes findw find-window
|
\ choose-buffer
|
||||||
\ joinp join-pane killp kill-pane killw kill-window lastp last-pane
|
\ choose-client
|
||||||
\ last[-window] linkw link-window lsp list-panes lsw list-windows movep
|
\ choose-list
|
||||||
\ move-pane movew move-window neww new-window nextl next-layout
|
\ choose-session
|
||||||
\ next[-window] pipep pipe-pane prevl previous-layout prev[ious-window]
|
\ choose-tree
|
||||||
\ renamew rename-window resizep resize-pane respawnp respawn-pane
|
\ choose-window
|
||||||
\ respawnw respawn-window rotatew rotate-window selectl select-layout
|
\ clear-history
|
||||||
\ selectp select-pane selectw select-window splitw split-window swapp
|
\ clearhist
|
||||||
\ swap-pane swapw swap-window unlinkw unlink-window
|
\ clock-mode
|
||||||
\ bind[-key] lsk list-keys send[-keys] send-prefix unbind[-key]
|
\ command-prompt
|
||||||
\ set[-option] setw set-window-option show[-options] showw
|
\ confirm[-before]
|
||||||
\ show-window-options setenv set-environment showenv show-environment
|
\ copy-mode
|
||||||
\ command-prompt confirm[-before] display[-message]
|
\ delete-buffer
|
||||||
\ choose-buffer clearhist clear-history deleteb delete-buffer lsb
|
\ deleteb
|
||||||
\ list-buffers loadb load-buffer pasteb paste-buffer saveb save-buffer
|
\ detach[-client]
|
||||||
\ setb set-buffer showb show-buffer
|
\ display[-message]
|
||||||
\ clock-mode if[-shell] lock[-server] run[-shell] [server-]info
|
\ display-panes
|
||||||
|
\ displayp
|
||||||
|
\ find-window
|
||||||
|
\ findw
|
||||||
|
\ has[-session]
|
||||||
|
\ if[-shell]
|
||||||
|
\ join-pane
|
||||||
|
\ joinp
|
||||||
|
\ kill-pane
|
||||||
|
\ killp
|
||||||
|
\ kill-server
|
||||||
|
\ kill-session
|
||||||
|
\ kill-window
|
||||||
|
\ killw
|
||||||
|
\ last-pane
|
||||||
|
\ lastp
|
||||||
|
\ last[-window]
|
||||||
|
\ link-window
|
||||||
|
\ linkw
|
||||||
|
\ list-buffers
|
||||||
|
\ lsb
|
||||||
|
\ list-clients
|
||||||
|
\ lsc
|
||||||
|
\ list-commands
|
||||||
|
\ lscm
|
||||||
|
\ list-keys
|
||||||
|
\ lsk
|
||||||
|
\ list-panes
|
||||||
|
\ lsp
|
||||||
|
\ list-sessions
|
||||||
|
\ ls
|
||||||
|
\ list-windows
|
||||||
|
\ lsw
|
||||||
|
\ load-buffer
|
||||||
|
\ loadb
|
||||||
|
\ lock-client
|
||||||
|
\ lockc
|
||||||
|
\ lock[-server]
|
||||||
|
\ lock-session
|
||||||
|
\ locks
|
||||||
|
\ move-pane
|
||||||
|
\ movep
|
||||||
|
\ move-window
|
||||||
|
\ movew
|
||||||
|
\ new[-session]
|
||||||
|
\ next-layout
|
||||||
|
\ nextl
|
||||||
|
\ next[-window]
|
||||||
|
\ paste-buffer
|
||||||
|
\ pasteb
|
||||||
|
\ pipe-pane
|
||||||
|
\ pipep
|
||||||
|
\ previous-layout
|
||||||
|
\ prevl
|
||||||
|
\ prev[ious-window]
|
||||||
|
\ refresh[-client]
|
||||||
|
\ rename[-session]
|
||||||
|
\ rename-window
|
||||||
|
\ renamew
|
||||||
|
\ resize-pane
|
||||||
|
\ resizep
|
||||||
|
\ respawn-pane
|
||||||
|
\ respawnp
|
||||||
|
\ respawn-window
|
||||||
|
\ respawnw
|
||||||
|
\ rotate-window
|
||||||
|
\ rotatew
|
||||||
|
\ run[-shell]
|
||||||
|
\ save-buffer
|
||||||
|
\ saveb
|
||||||
|
\ select-layout
|
||||||
|
\ selectl
|
||||||
|
\ select-pane
|
||||||
|
\ selectp
|
||||||
|
\ select-window
|
||||||
|
\ selectw
|
||||||
|
\ send[-keys]
|
||||||
|
\ send-prefix
|
||||||
|
\ server-info
|
||||||
|
\ info
|
||||||
|
\ set-buffer
|
||||||
|
\ setb
|
||||||
|
\ set-environment
|
||||||
|
\ setenv
|
||||||
|
\ set[-option]
|
||||||
|
\ set-window-option
|
||||||
|
\ setw
|
||||||
|
\ show-buffer
|
||||||
|
\ showb
|
||||||
|
\ show-environment
|
||||||
|
\ showenv
|
||||||
|
\ show-messages
|
||||||
|
\ showmsgs
|
||||||
|
\ show[-options]
|
||||||
|
\ show-window-options
|
||||||
|
\ showw
|
||||||
|
\ source[-file]
|
||||||
|
\ split-window
|
||||||
|
\ splitw
|
||||||
|
\ start[-server]
|
||||||
|
\ suspend-client
|
||||||
|
\ suspendc
|
||||||
|
\ swap-pane
|
||||||
|
\ swapp
|
||||||
|
\ swap-window
|
||||||
|
\ swapw
|
||||||
|
\ switch-client
|
||||||
|
\ switchc
|
||||||
|
\ unbind[-key]
|
||||||
|
\ unlink-window
|
||||||
|
\ unlinkw
|
||||||
|
\ wait[-for]
|
||||||
|
|
||||||
syn keyword tmuxOptsSet
|
syn keyword tmuxOptsSet
|
||||||
\ buffer-limit escape-time exit-unattached exit-unattached quiet
|
\ assume-paste-time
|
||||||
|
\ base-index
|
||||||
|
\ bell-action
|
||||||
|
\ bell-on-alert
|
||||||
|
\ buffer-limit
|
||||||
|
\ default-command
|
||||||
|
\ default-shell
|
||||||
|
\ default-terminal
|
||||||
|
\ destroy-unattached
|
||||||
|
\ detach-on-destroy
|
||||||
|
\ display-panes-active-colour
|
||||||
|
\ display-panes-colour
|
||||||
|
\ display-panes-time
|
||||||
|
\ display-time
|
||||||
|
\ escape-time
|
||||||
|
\ exit-unattached
|
||||||
|
\ focus-events
|
||||||
|
\ history-limit
|
||||||
|
\ lock-after-time
|
||||||
|
\ lock-command
|
||||||
|
\ lock-server
|
||||||
|
\ message-command-style
|
||||||
|
\ message-limit
|
||||||
|
\ message-style
|
||||||
|
\ mouse-resize-pane
|
||||||
|
\ mouse-select-pane
|
||||||
|
\ mouse-select-window
|
||||||
|
\ mouse-utf8
|
||||||
|
\ pane-active-border-style
|
||||||
|
\ pane-border-style
|
||||||
|
\ prefix
|
||||||
|
\ prefix2
|
||||||
|
\ quiet
|
||||||
|
\ renumber-windows
|
||||||
|
\ repeat-time
|
||||||
\ set-clipboard
|
\ set-clipboard
|
||||||
\ base-index bell-action bell-on-alert default-command default-path
|
\ set-remain-on-exit
|
||||||
\ default-shell default-terminal destroy-unattached detach-on-destroy
|
\ set-titles
|
||||||
\ display-panes-[active-]colour display-[panes-]time history-limit
|
\ set-titles-string
|
||||||
\ lock-after-time lock-command lock-server message-[command-]attr
|
\ status
|
||||||
\ message-[command-]bg message-[command-]fg message-limit
|
\ status-interval
|
||||||
\ mouse-resize-pane mouse-select-pane mouse-select-window mouse-utf8
|
\ status-justify
|
||||||
\ pane-[active-]border-style prefix prefix2
|
\ status-keys
|
||||||
\ renumber-windows repeat-time set-remain-on-exit set-titles
|
\ status-left
|
||||||
\ set-titles-string status status-style
|
\ status-left-length
|
||||||
\ status-interval status-justify status-keys status-left
|
\ status-left-style
|
||||||
\ status-left-style status-left-length status-position status-right
|
\ status-position
|
||||||
\ status-right-style status-right-length status-utf8 terminal-overrides
|
\ status-right
|
||||||
\ update-environment visual-activity visual-bell visual-content
|
\ status-right-length
|
||||||
\ visual-silence word-separators
|
\ status-utf8
|
||||||
|
\ staus-right-style
|
||||||
|
\ terminal-overrides
|
||||||
|
\ update-environment
|
||||||
|
\ visual-activity
|
||||||
|
\ visual-bell
|
||||||
|
\ visual-content
|
||||||
|
\ visual-silence
|
||||||
|
\ word-separators
|
||||||
|
|
||||||
syn keyword tmuxOptsSetw
|
syn keyword tmuxOptsSetw
|
||||||
\ aggressive-resize alternate-screen automatic-rename
|
\ aggressive-resize
|
||||||
\ c0-change-interval c0-change-trigger clock-mode-colour
|
\ allow-rename
|
||||||
\ clock-mode-style force-height force-width layout-history-limit
|
\ alternate-screen
|
||||||
\ main-pane-height main-pane-width mode-style move-keys
|
\ automatic-rename
|
||||||
\ mode-mouse monitor-activity monitor-content monitor-silence
|
\ c0-change-interval
|
||||||
\ other-pane-height other-pane-width pane-base-index remain-on-exit
|
\ c0-change-trigger
|
||||||
\ synchronize-panes utf8 window-status-bell-style
|
\ clock-mode-colour
|
||||||
\ window-status-content-style window-status-activity-style
|
\ clock-mode-style
|
||||||
\ window-status-[current-]attr window-status-[current-]bg
|
\ force-height
|
||||||
\ window-status-[current-]fg window-status-[current-]format
|
\ force-width
|
||||||
\ window-status-separator xterm-keys wrap-search
|
\ main-pane-height
|
||||||
|
\ main-pane-width
|
||||||
|
\ mode-keys
|
||||||
|
\ mode-mouse
|
||||||
|
\ mode-style
|
||||||
|
\ monitor-activity
|
||||||
|
\ monitor-content
|
||||||
|
\ monitor-silence
|
||||||
|
\ other-pane-height
|
||||||
|
\ other-pane-width
|
||||||
|
\ pane-base-index
|
||||||
|
\ remain-on-exit
|
||||||
|
\ synchronize-panes
|
||||||
|
\ utf8
|
||||||
|
\ window-status-activity-style
|
||||||
|
\ window-status-bell-style
|
||||||
|
\ window-status-content-style
|
||||||
|
\ window-status-current-format
|
||||||
|
\ window-status-current-style
|
||||||
|
\ window-status-format
|
||||||
|
\ window-status-last-style
|
||||||
|
\ window-status-separator
|
||||||
|
\ window-status-style
|
||||||
|
\ wrap-search
|
||||||
|
\ xterm-keys
|
||||||
|
|
||||||
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
|
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
|
||||||
|
|
||||||
|
|||||||
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
|
||||||
Reference in New Issue
Block a user