Syntax file updates. (Charles Campbell)
This commit is contained in:
@ -2,11 +2,11 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Apr 12, 2010
|
||||
" Version: 112
|
||||
" Last Change: Jul 29, 2010
|
||||
" Version: 113
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from <EFBFBD>ric Brunet (eric.brunet@ens.fr)
|
||||
" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
|
||||
|
||||
" For version 5.x: Clear all syntax items {{{1
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@ -100,12 +100,12 @@ syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDer
|
||||
" Echo: {{{1
|
||||
" ====
|
||||
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct
|
||||
syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
|
||||
syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
|
||||
syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
|
||||
syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment
|
||||
syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]'
|
||||
|
||||
" This must be after the strings, so that ... \" will be correct
|
||||
syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shDoubleQuote,shCharClass,shCtrlSeq
|
||||
syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shDoubleQuote,shCharClass,shCtrlSeq
|
||||
|
||||
" Alias: {{{1
|
||||
" =====
|
||||
@ -211,12 +211,12 @@ else
|
||||
endif
|
||||
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
|
||||
if exists("b:is_bash")
|
||||
syn region shCaseExSingleQuote matchgroup=shOperator start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
else
|
||||
syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
endif
|
||||
syn region shCaseSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseDoubleQuote matchgroup=shOperator start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseDoubleQuote matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+]+ contained
|
||||
|
||||
@ -268,12 +268,12 @@ if exists("b:is_bash")
|
||||
syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
syn region shExSingleQuote matchgroup=shOperator start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial
|
||||
syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial
|
||||
else
|
||||
syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=@Spell
|
||||
syn region shDoubleQuote matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial
|
||||
@ -341,13 +341,13 @@ syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained
|
||||
syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier
|
||||
syn match shSetIdentifier "=" contained nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote,shExSingleQuote
|
||||
if exists("b:is_bash")
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
elseif exists("b:is_kornshell")
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
else
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
|
||||
endif
|
||||
|
||||
" Functions: {{{1
|
||||
@ -419,8 +419,8 @@ if exists("b:is_bash") || exists("b:is_kornshell")
|
||||
syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
|
||||
syn match shDerefEscape contained '\%(\\\\\)*\\.'
|
||||
endif
|
||||
syn region shDerefString contained matchgroup=shOperator start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
|
||||
syn region shDerefString contained matchgroup=shOperator start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
|
||||
syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
|
||||
|
||||
if exists("b:is_bash")
|
||||
@ -448,7 +448,7 @@ syn keyword shCondError elif else then
|
||||
" Useful ksh Keywords: {{{1
|
||||
" ====================
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup print printf r stop suspend times true type unalias whence
|
||||
syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence
|
||||
if exists("g:is_posix")
|
||||
syn keyword shStatement command
|
||||
else
|
||||
@ -492,6 +492,7 @@ hi def link shCaseBar shConditional
|
||||
hi def link shCaseCommandSub shCommandSub
|
||||
hi def link shCaseDoubleQuote shDoubleQuote
|
||||
hi def link shCaseIn shConditional
|
||||
hi def link shQuote shOperator
|
||||
hi def link shCaseSingleQuote shSingleQuote
|
||||
hi def link shCaseStart shConditional
|
||||
hi def link shCmdSubRegion shShellVariables
|
||||
@ -500,12 +501,14 @@ hi def link shDerefOp shOperator
|
||||
hi def link shDerefPOL shDerefOp
|
||||
hi def link shDerefPPS shDerefOp
|
||||
hi def link shDeref shShellVariables
|
||||
hi def link shDerefDelim shOperator
|
||||
hi def link shDerefSimple shDeref
|
||||
hi def link shDerefSpecial shDeref
|
||||
hi def link shDerefString shDoubleQuote
|
||||
hi def link shDerefVar shDeref
|
||||
hi def link shDoubleQuote shString
|
||||
hi def link shEcho shString
|
||||
hi def link shEchoDelim shOperator
|
||||
hi def link shEchoQuote shString
|
||||
hi def link shEmbeddedEcho shString
|
||||
hi def link shEscape shCommandSub
|
||||
@ -522,6 +525,7 @@ hi def link shPosnParm shShellVariables
|
||||
hi def link shQuickComment shComment
|
||||
hi def link shRange shOperator
|
||||
hi def link shRedir shOperator
|
||||
hi def link shSetListDelim shOperator
|
||||
hi def link shSetOption shOption
|
||||
hi def link shSingleQuote shString
|
||||
hi def link shSource shOperator
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
" Language: TeX
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: Jul 28, 2010
|
||||
" Version: 51
|
||||
" Version: 52
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Notes: {{{1
|
||||
@ -37,6 +37,7 @@ if version < 600
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
scriptencoding utf-8
|
||||
|
||||
" Define the default highlighting. {{{1
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
@ -53,6 +54,14 @@ if exists("g:tex_tex") && !exists("g:tex_no_error")
|
||||
let g:tex_no_error= 1
|
||||
endif
|
||||
|
||||
" let user determine which classes of concealment will be supported
|
||||
" a=accents/ligatures m=math symbols g=Greek s=superscripts/subscripts
|
||||
if !exists("g:tex_conceal")
|
||||
let s:tex_conceal= 'amgs'
|
||||
else
|
||||
let s:tex_conceal= g:tex_conceal
|
||||
endif
|
||||
|
||||
" Determine whether or not to use "*.sty" mode {{{1
|
||||
" The user may override the normal determination by setting
|
||||
" g:tex_stylish to 1 (for "*.sty" mode)
|
||||
@ -358,7 +367,13 @@ if !exists("tex_no_math")
|
||||
|
||||
" \left..something.. and \right..something.. support: {{{2
|
||||
syn match texMathDelimBad contained "\S"
|
||||
syn match texMathDelim contained "\\\(left\|right\|[bB]igg\=[lr]\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad
|
||||
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'm'
|
||||
syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
|
||||
syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=}
|
||||
else
|
||||
syn match texMathDelim contained "\\\(left\|right\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad
|
||||
endif
|
||||
syn match texMathDelim contained "\\\([bB]igg\=[lr]\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad
|
||||
syn match texMathDelim contained "\\\(left\|right\)arrow\>\|\<\([aA]rrow\|brace\)\=vert\>"
|
||||
syn match texMathDelim contained "\\lefteqn\>"
|
||||
syn match texMathDelimSet2 contained "\\" nextgroup=texMathDelimKey,texMathDelimBad
|
||||
@ -480,21 +495,93 @@ endif
|
||||
if has("conceal") && &enc == 'utf-8'
|
||||
|
||||
" Math Symbols {{{2
|
||||
syn match texMathSymbol '\\left(' contained conceal cchar=(
|
||||
syn match texMathSymbol '\\right)' contained conceal cchar=)
|
||||
syn match texMathSymbol '\\left{' contained conceal cchar={
|
||||
syn match texMathSymbol '\\right}' contained conceal cchar=}
|
||||
if s:tex_conceal =~ 'm'
|
||||
syn match texMathSymbol '\\approx\>' contained conceal cchar=≈
|
||||
syn match texMathSymbol '\\ast\>' contained conceal cchar=∗
|
||||
syn match texMathSymbol '\\bigtriangledown\>' contained conceal cchar=∇
|
||||
syn match texMathSymbol '\\bigvee\>' contained conceal cchar=⋁
|
||||
syn match texMathSymbol '\\bigwedge\>' contained conceal cchar=⋀
|
||||
syn match texMathSymbol '\\blacksquare\>' contained conceal cchar=∎
|
||||
syn match texMathSymbol '\\cap\>' contained conceal cchar=∩
|
||||
syn match texMathSymbol '\\cdot\>' contained conceal cchar=·
|
||||
syn match texMathSymbol '\\leq\>' contained conceal cchar=≤
|
||||
syn match texMathSymbol '\\geq\>' contained conceal cchar=≥
|
||||
syn match texMathSymbol '\\cdot\>' contained conceal cchar=·
|
||||
syn match texMathSymbol '\\times\>' contained conceal cchar=×
|
||||
syn match texMathSymbol '\\div\>' contained conceal cchar=÷
|
||||
syn match texMathSymbol '\\pm\>' contained conceal cchar=±
|
||||
syn match texMathSymbol '\\neq\>' contained conceal cchar=≠
|
||||
syn match texMathSymbol '\\circ\>' contained conceal cchar=∘
|
||||
syn match texMathSymbol '\\circledcirc\>' contained conceal cchar=⊚
|
||||
syn match texMathSymbol '\\cong\>' contained conceal cchar=≅
|
||||
syn match texMathSymbol '\\cup\>' contained conceal cchar=∪
|
||||
syn match texMathSymbol '\\diamond\>' contained conceal cchar=⋄
|
||||
syn match texMathSymbol '\\div\>' contained conceal cchar=÷
|
||||
syn match texMathSymbol '\\doteq\>' contained conceal cchar=≐
|
||||
syn match texMathSymbol '\\dotsb\>' contained conceal cchar=⋯
|
||||
syn match texMathSymbol '\\emptyset\>' contained conceal cchar=∅
|
||||
syn match texMathSymbol '\\equiv\>' contained conceal cchar=≡
|
||||
syn match texMathSymbol '\\forall\>' contained conceal cchar=∀
|
||||
syn match texMathSymbol '\\geq\>' contained conceal cchar=≥
|
||||
syn match texMathSymbol '\\geq\>' contained conceal cchar=≥
|
||||
syn match texMathSymbol '\\gg\>' contained conceal cchar=⟫
|
||||
syn match texMathSymbol '\\gtreqless\>' contained conceal cchar=⋛
|
||||
syn match texMathSymbol '\\gtrless\>' contained conceal cchar=≷
|
||||
syn match texMathSymbol '\\Im\>' contained conceal cchar=ℑ
|
||||
syn match texMathSymbol '\\in\>' contained conceal cchar=∈
|
||||
syn match texMathSymbol '\\infty\>' contained conceal cchar=∞
|
||||
syn match texMathSymbol '\\lceil\>' contained conceal cchar=⌈
|
||||
syn match texMathSymbol '\\leftarrow\>' contained conceal cchar=⟶
|
||||
syn match texMathSymbol '\\Leftarrow\>' contained conceal cchar=⟹
|
||||
syn match texMathSymbol '\\left(' contained conceal cchar=(
|
||||
syn match texMathSymbol '\\left\[' contained conceal cchar=[
|
||||
syn match texMathSymbol '\\left\\{' contained conceal cchar={
|
||||
syn match texMathSymbol '\\leq\>' contained conceal cchar=≤
|
||||
syn match texMathSymbol '\\leq\>' contained conceal cchar=≤
|
||||
syn match texMathSymbol '\\lesseqgtr\>' contained conceal cchar=⋚
|
||||
syn match texMathSymbol '\\lfloor\>' contained conceal cchar=⌊
|
||||
syn match texMathSymbol '\\ll\>' contained conceal cchar=⟪
|
||||
syn match texMathSymbol '\\mapsto\>' contained conceal cchar=↦
|
||||
syn match texMathSymbol '\\mp\>' contained conceal cchar=∓
|
||||
syn match texMathSymbol '\\neq\>' contained conceal cchar=≠
|
||||
syn match texMathSymbol '\\ngeq\>' contained conceal cchar=≱
|
||||
syn match texMathSymbol '\\ngtr\>' contained conceal cchar=≯
|
||||
syn match texMathSymbol '\\nleq\>' contained conceal cchar=≰
|
||||
syn match texMathSymbol '\\nless\>' contained conceal cchar=≮
|
||||
syn match texMathSymbol '\\notin\>' contained conceal cchar=∉
|
||||
syn match texMathSymbol '\\odot\>' contained conceal cchar=⊙
|
||||
syn match texMathSymbol '\\oint\>' contained conceal cchar=∮
|
||||
syn match texMathSymbol '\\oplus\>' contained conceal cchar=⊕
|
||||
syn match texMathSymbol '\\oslash\>' contained conceal cchar=⊘
|
||||
syn match texMathSymbol '\\otimes\>' contained conceal cchar=⊗
|
||||
syn match texMathSymbol '\\partial\>' contained conceal cchar=∂
|
||||
syn match texMathSymbol '\\perp\>' contained conceal cchar=⊥
|
||||
syn match texMathSymbol '\\pm\>' contained conceal cchar=±
|
||||
syn match texMathSymbol '\\prec\>' contained conceal cchar=≺
|
||||
syn match texMathSymbol '\\prod\>' contained conceal cchar=∏
|
||||
syn match texMathSymbol '\\propto\>' contained conceal cchar=∝
|
||||
syn match texMathSymbol '\\rceil\>' contained conceal cchar=⌉
|
||||
syn match texMathSymbol '\\Re\>' contained conceal cchar=ℜ
|
||||
syn match texMathSymbol '\\rfloor\>' contained conceal cchar=⌋
|
||||
syn match texMathSymbol '\\rightarrow\>' contained conceal cchar=⟵
|
||||
syn match texMathSymbol '\\Rightarrow\>' contained conceal cchar=⟸
|
||||
syn match texMathSymbol '\\right)' contained conceal cchar=)
|
||||
syn match texMathSymbol '\\right]' contained conceal cchar=]
|
||||
syn match texMathSymbol '\\right\\}' contained conceal cchar=}
|
||||
syn match texMathSymbol '\\sqcap\>' contained conceal cchar=⊓
|
||||
syn match texMathSymbol '\\sqcup\>' contained conceal cchar=⊔
|
||||
syn match texMathSymbol '\\subset\>' contained conceal cchar=⊂
|
||||
syn match texMathSymbol '\\subseteq\>' contained conceal cchar=⊆
|
||||
syn match texMathSymbol '\\subsetneq\>' contained conceal cchar=⊊
|
||||
syn match texMathSymbol '\\succ\>' contained conceal cchar=≻
|
||||
syn match texMathSymbol '\\sum\>' contained conceal cchar=∑
|
||||
syn match texMathSymbol '\\supseteq\>' contained conceal cchar=⊇
|
||||
syn match texMathSymbol '\\supsetneq\>' contained conceal cchar=⊋
|
||||
syn match texMathSymbol '\\surd\>' contained conceal cchar=√
|
||||
syn match texMathSymbol '\\therefore\>' contained conceal cchar=∴
|
||||
syn match texMathSymbol '\\times\>' contained conceal cchar=×
|
||||
syn match texMathSymbol '\\to\>' contained conceal cchar=→
|
||||
syn match texMathSymbol '\\trianglelefteq\>' contained conceal cchar=⊴
|
||||
syn match texMathSymbol '\\trianglerighteq\>' contained conceal cchar=⊵
|
||||
syn match texMathSymbol '\\vartriangle\>' contained conceal cchar=∆
|
||||
syn match texMathSymbol '\\vdots\>' contained conceal cchar=⋮
|
||||
endif
|
||||
|
||||
" Greek {{{2
|
||||
if s:tex_conceal =~ 'g'
|
||||
fun! s:Greek(group,pat,cchar)
|
||||
exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar
|
||||
endfun
|
||||
@ -538,10 +625,12 @@ if has("conceal") && &enc == 'utf-8'
|
||||
call s:Greek('texGreek','\\Psi\>' ,'Ψ')
|
||||
call s:Greek('texGreek','\\Omega\>' ,'Ω')
|
||||
delfun s:Greek
|
||||
endif
|
||||
|
||||
" Superscripts/Subscripts {{{2
|
||||
syn region texSuperscript matchgroup=Delimiter start='\^{' end='}' contained concealends contains=texSuperscripts
|
||||
syn region texSubscript matchgroup=Delimiter start='_{' end='}' contained concealends contains=texSubscripts
|
||||
if s:tex_conceal =~ 's'
|
||||
syn region texSuperscript matchgroup=Delimiter start='\^{' end='}' contained concealends contains=texSuperscripts,texStatement
|
||||
syn region texSubscript matchgroup=Delimiter start='_{' end='}' contained concealends contains=texSubscripts,texStatement
|
||||
fun! s:SuperSub(group,leader,pat,cchar)
|
||||
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
|
||||
exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
|
||||
@ -638,8 +727,10 @@ if has("conceal") && &enc == 'utf-8'
|
||||
call s:SuperSub('texSubscript','_','\\gamma\>','ᵧ')
|
||||
call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ')
|
||||
delfun s:SuperSub
|
||||
endif
|
||||
|
||||
" Accented characters: {{{2
|
||||
if s:tex_conceal =~ 'a'
|
||||
if b:tex_stylish
|
||||
syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1
|
||||
syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1
|
||||
@ -696,6 +787,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
syn match texLigature '\\ss\>' conceal cchar=ß
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LaTeX synchronization: {{{1
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.3 script
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Jul 19, 2010
|
||||
" Version: 7.3-02
|
||||
" Last Change: Jul 28, 2010
|
||||
" Version: 7.3-03
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@ -532,19 +532,43 @@ syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' e
|
||||
|
||||
" Scripts : perl,ruby : Benoit Cerrina {{{2
|
||||
" ======= python,tcl: Johannes Zellner
|
||||
" lua
|
||||
|
||||
" Allows users to specify the type of embedded script highlighting
|
||||
" they want: (perl/python/ruby/tcl support)
|
||||
" g:vimsyn_embed == 0 : don't embed any scripts
|
||||
" g:vimsyn_embed ~= 'l' : embed lua (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it)
|
||||
if !exists("g:vimsyn_embed")
|
||||
let g:vimsyn_embed= "mpPr"
|
||||
let g:vimsyn_embed= "lmpPr"
|
||||
endif
|
||||
|
||||
" [-- lua --] {{{3
|
||||
let s:luapath= expand("<sfile>:p:h")."/lua.vim"
|
||||
if !filereadable(s:luapath)
|
||||
let s:luapath= globpath(&rtp,"syntax/lua.vim")
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'p' && has("lua")) && filereadable(s:luapath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimLuaScript ".s:luapath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l'
|
||||
syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
|
||||
syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript
|
||||
else
|
||||
syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
|
||||
syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript
|
||||
endif
|
||||
syn cluster vimFuncBodyList add=vimLuaRegion
|
||||
else
|
||||
syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+
|
||||
syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+
|
||||
endif
|
||||
unlet s:luapath
|
||||
|
||||
" [-- perl --] {{{3
|
||||
let s:perlpath= expand("<sfile>:p:h")."/perl.vim"
|
||||
if !filereadable(s:perlpath)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Yacc
|
||||
" Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Oct 21, 2008
|
||||
" Version: 7
|
||||
" Last Change: Aug 2, 2010
|
||||
" Version: 8
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Options: {{{1
|
||||
@ -35,7 +35,7 @@ endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Yacc Clusters: {{{1
|
||||
syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment
|
||||
syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam
|
||||
syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@ -49,6 +49,10 @@ HiFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$'
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Yacc Commands: {{{1
|
||||
syn match yaccDefines '^%define\s\+.*$'
|
||||
syn match yaccParseParam '%parse-param\>' skipwhite nextgroup=yaccParseParamStr
|
||||
syn region yaccParseParamStr contained matchgroup=Delimiter start='{' end='}' contains=cStructure
|
||||
|
||||
syn match yaccDelim "[:|]" contained
|
||||
syn match yaccOper "@\d\+" contained
|
||||
|
||||
@ -91,6 +95,8 @@ if !exists("did_yacc_syn_inits")
|
||||
HiLink yaccComment Comment
|
||||
HiLink yaccCurly Delimiter
|
||||
HiLink yaccCurlyError Error
|
||||
HiLink yaccDefines cDefine
|
||||
HiLink yaccParseParam cDefine
|
||||
HiLink yaccNonterminal Function
|
||||
HiLink yaccDelim Delimiter
|
||||
HiLink yaccKeyActn Special
|
||||
|
||||
Reference in New Issue
Block a user