mirror of
https://github.com/gryf/.vim.git
synced 2025-12-17 11:30:29 +01:00
Added branch pathogen
This commit is contained in:
599
syntax/css.vim
599
syntax/css.vim
@@ -1,599 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: Cascading Style Sheets
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/css.vim
|
||||
" Last Change: 2007 Nov 06
|
||||
" CSS2 by Nikolai Weibull
|
||||
" Full CSS2, HTML4 support by Yeti
|
||||
" <20><>bg<62><67><EFBFBD><EFBFBD>6λ<36><CEBB>ʮ<EFBFBD><CAAE><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD>
|
||||
function! s:FGforBG(bg)
|
||||
" takes a 6hex color code and returns a matching color that is visible
|
||||
" substitute ɾ<><C9BE><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7>#
|
||||
let pure = substitute(a:bg,'^#','','')
|
||||
" <20><>λȡ<CEBB><C8A1>RGB
|
||||
let r = eval('0x'.pure[0].pure[1])
|
||||
let g = eval('0x'.pure[2].pure[3])
|
||||
let b = eval('0x'.pure[4].pure[5])
|
||||
if r*30 + g*59 + b*11 > 12000
|
||||
return '#000000'
|
||||
else
|
||||
return '#ffffff'
|
||||
end
|
||||
endfunction
|
||||
|
||||
function! s:SetMatcher(clr,pat)
|
||||
let group = 'cssColor'.substitute(a:clr,'^#','','')
|
||||
" Redirect messages to a variable
|
||||
redir => s:currentmatch
|
||||
silent! exe 'syn list '.group
|
||||
" End redirecting messages
|
||||
redir END
|
||||
" !~ regexp doesn't match
|
||||
if s:currentmatch !~ a:pat.'\/'
|
||||
exe 'syn match '.group.' /'.a:pat.'\>/ contained'
|
||||
exe 'syn cluster cssColors add='.group
|
||||
if has('gui_running')
|
||||
exe 'hi '.group.' guifg='.s:FGforBG(a:clr)
|
||||
exe 'hi '.group.' guibg='.a:clr
|
||||
elseif &t_Co == 256
|
||||
exe 'hi '.group.' ctermfg='.s:Rgb2xterm(s:FGforBG(a:clr))
|
||||
exe 'hi '.group.' ctermbg='.s:Rgb2xterm(a:clr)
|
||||
endif
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"" the 6 value iterations in the xterm color cube
|
||||
let s:valuerange = [ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF ]
|
||||
"
|
||||
"" 16 basic colors
|
||||
let s:basic16 = [ [ 0x00, 0x00, 0x00 ], [ 0xCD, 0x00, 0x00 ], [ 0x00, 0xCD, 0x00 ], [ 0xCD, 0xCD, 0x00 ], [ 0x00, 0x00, 0xEE ], [ 0xCD, 0x00, 0xCD ], [ 0x00, 0xCD, 0xCD ], [ 0xE5, 0xE5, 0xE5 ], [ 0x7F, 0x7F, 0x7F ], [ 0xFF, 0x00, 0x00 ], [ 0x00, 0xFF, 0x00 ], [ 0xFF, 0xFF, 0x00 ], [ 0x5C, 0x5C, 0xFF ], [ 0xFF, 0x00, 0xFF ], [ 0x00, 0xFF, 0xFF ], [ 0xFF, 0xFF, 0xFF ] ]
|
||||
:
|
||||
function! s:Xterm2rgb(color)
|
||||
" 16 basic colors
|
||||
let r=0
|
||||
let g=0
|
||||
let b=0
|
||||
if a:color<16
|
||||
let r = s:basic16[a:color][0]
|
||||
let g = s:basic16[a:color][1]
|
||||
let b = s:basic16[a:color][2]
|
||||
endif
|
||||
|
||||
" color cube color
|
||||
if a:color>=16 && a:color<=232
|
||||
let color=a:color-16
|
||||
let r = s:valuerange[(color/36)%6]
|
||||
let g = s:valuerange[(color/6)%6]
|
||||
let b = s:valuerange[color%6]
|
||||
endif
|
||||
|
||||
" gray tone
|
||||
if a:color>=233 && a:color<=253
|
||||
let r=8+(a:color-232)*0x0a
|
||||
let g=r
|
||||
let b=r
|
||||
endif
|
||||
let rgb=[r,g,b]
|
||||
return rgb
|
||||
endfunction
|
||||
|
||||
function! s:pow(x, n)
|
||||
let x = a:x
|
||||
for i in range(a:n-1)
|
||||
let x = x*a:x
|
||||
return x
|
||||
endfunction
|
||||
|
||||
let s:colortable=[]
|
||||
for c in range(0, 254)
|
||||
let color = s:Xterm2rgb(c)
|
||||
call add(s:colortable, color)
|
||||
endfor
|
||||
|
||||
" selects the nearest xterm color for a rgb value like #FF0000
|
||||
function! s:Rgb2xterm(color)
|
||||
let best_match=0
|
||||
let smallest_distance = 10000000000
|
||||
let r = eval('0x'.a:color[1].a:color[2])
|
||||
let g = eval('0x'.a:color[3].a:color[4])
|
||||
let b = eval('0x'.a:color[5].a:color[6])
|
||||
for c in range(0,254)
|
||||
let d = s:pow(s:colortable[c][0]-r,2) + s:pow(s:colortable[c][1]-g,2) + s:pow(s:colortable[c][2]-b,2)
|
||||
if d<smallest_distance
|
||||
let smallest_distance = d
|
||||
let best_match = c
|
||||
endif
|
||||
endfor
|
||||
return best_match
|
||||
endfunction
|
||||
|
||||
function! s:SetNamedColor(clr,name)
|
||||
let group = 'cssColor'.substitute(a:clr,'^#','','')
|
||||
exe 'syn keyword '.group.' '.a:name.' contained'
|
||||
exe 'syn cluster cssColors add='.group
|
||||
if has('gui_running')
|
||||
exe 'hi '.group.' guifg='.s:FGforBG(a:clr)
|
||||
exe 'hi '.group.' guibg='.a:clr
|
||||
elseif &t_Co == 256
|
||||
exe 'hi '.group.' ctermfg='.s:Rgb2xterm(s:FGforBG(a:clr))
|
||||
exe 'hi '.group.' ctermbg='.s:Rgb2xterm(a:clr)
|
||||
endif
|
||||
return 23
|
||||
endfunction
|
||||
|
||||
function! s:PreviewCSSColorInLine(where)
|
||||
" TODO use cssColor matchdata
|
||||
let foundcolor = matchstr( getline(a:where), '#[0-9A-Fa-f]\{3,6\}\>' )
|
||||
let color = ''
|
||||
if foundcolor != ''
|
||||
if foundcolor =~ '#\x\{6}$'
|
||||
let color = foundcolor
|
||||
elseif foundcolor =~ '#\x\{3}$'
|
||||
let color = substitute(foundcolor, '\(\x\)\(\x\)\(\x\)', '\1\1\2\2\3\3', '')
|
||||
else
|
||||
let color = ''
|
||||
endif
|
||||
if color != ''
|
||||
return s:SetMatcher(color,foundcolor)
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = 'css'
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn keyword cssTagName abbr acronym address applet area a b base
|
||||
syn keyword cssTagName basefont bdo big blockquote body br button
|
||||
syn keyword cssTagName caption center cite code col colgroup dd del
|
||||
syn keyword cssTagName dfn dir div dl dt em fieldset font form frame
|
||||
syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
|
||||
syn keyword cssTagName iframe img input ins isindex kbd label legend li
|
||||
syn keyword cssTagName link map menu meta noframes noscript ol optgroup
|
||||
syn keyword cssTagName option p param pre q s samp script select small
|
||||
syn keyword cssTagName span strike strong style sub sup tbody td
|
||||
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
|
||||
syn match cssTagName "\<table\>"
|
||||
syn match cssTagName "\*"
|
||||
|
||||
syn match cssTagName "@page\>" nextgroup=cssDefinition
|
||||
|
||||
syn match cssSelectorOp "[+>.]"
|
||||
syn match cssSelectorOp2 "[~|]\?=" contained
|
||||
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
|
||||
|
||||
try
|
||||
syn match cssIdentifier "#[A-Za-z<>-<2D>_@][A-Za-z<>-<2D>0-9_@-]*"
|
||||
catch /^.*/
|
||||
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
|
||||
endtry
|
||||
|
||||
|
||||
syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
|
||||
syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
|
||||
syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
|
||||
syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier
|
||||
|
||||
syn match cssValueInteger contained "[-+]\=\d\+"
|
||||
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
|
||||
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
|
||||
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
|
||||
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
|
||||
|
||||
syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
|
||||
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr
|
||||
syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>"
|
||||
syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline
|
||||
syn keyword cssFontDescriptorAttr contained all
|
||||
syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
|
||||
syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
|
||||
syn match cssUnicodeRange contained "U+\x\+-\x\+"
|
||||
|
||||
syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
|
||||
" FIXME: These are actually case-insentivie too, but (a) specs recommend using
|
||||
" mixed-case (b) it's hard to highlight the word `Background' correctly in
|
||||
" all situations
|
||||
syn case match
|
||||
syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
|
||||
syn case ignore
|
||||
syn match cssColor contained "\<transparent\>"
|
||||
syn match cssColor contained "\<white\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
|
||||
"syn match cssColor contained "\<rgb\s*(\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*)"
|
||||
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend
|
||||
|
||||
syn match cssImportant contained "!\s*important\>"
|
||||
|
||||
syn keyword cssCommonAttr contained auto none inherit
|
||||
syn keyword cssCommonAttr contained top bottom
|
||||
syn keyword cssCommonAttr contained medium normal
|
||||
|
||||
syn match cssFontProp contained "\<font\>\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\>\)\="
|
||||
syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
|
||||
syn match cssFontAttr contained "\<small\>\(-\(caps\|caption\)\>\)\="
|
||||
syn match cssFontAttr contained "\<x\{1,2\}-\(large\|small\)\>"
|
||||
syn match cssFontAttr contained "\<message-box\>"
|
||||
syn match cssFontAttr contained "\<status-bar\>"
|
||||
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
|
||||
syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
|
||||
syn keyword cssFontAttr contained bold bolder lighter larger smaller
|
||||
syn keyword cssFontAttr contained icon menu
|
||||
syn match cssFontAttr contained "\<caption\>"
|
||||
syn keyword cssFontAttr contained large smaller larger
|
||||
syn keyword cssFontAttr contained narrower wider
|
||||
|
||||
syn keyword cssColorProp contained color
|
||||
syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\="
|
||||
syn keyword cssColorAttr contained center scroll fixed
|
||||
syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
|
||||
syn match cssColorAttr contained "\<no-repeat\>"
|
||||
|
||||
syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
|
||||
syn match cssTextAttr contained "\<line-through\>"
|
||||
syn match cssTextAttr contained "\<text-indent\>"
|
||||
syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
|
||||
syn keyword cssTextAttr contained underline overline blink sub super middle
|
||||
syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
|
||||
|
||||
syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>"
|
||||
syn match cssBoxProp contained "\<\(width\|z-index\)\>"
|
||||
syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
|
||||
syn keyword cssBoxProp contained width height float clear overflow clip visibility
|
||||
syn keyword cssBoxAttr contained thin thick both
|
||||
syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssBoxAttr contained hidden visible scroll collapse
|
||||
|
||||
syn keyword cssGeneratedContentProp contained content quotes
|
||||
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
|
||||
syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
|
||||
syn match cssAuralAttr contained "\<lower\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
|
||||
syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
|
||||
syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
|
||||
syn keyword cssGeneratedContentAttr contained inside outside
|
||||
|
||||
syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
|
||||
syn keyword cssPagingProp contained size marks inside orphans widows
|
||||
syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
|
||||
|
||||
syn keyword cssUIProp contained cursor
|
||||
syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
|
||||
syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
|
||||
syn keyword cssUIAttr contained default crosshair pointer move wait help
|
||||
syn keyword cssUIAttr contained thin thick
|
||||
syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
|
||||
syn keyword cssUIAttr contained invert
|
||||
|
||||
syn match cssRenderAttr contained "\<marker\>"
|
||||
syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>"
|
||||
syn keyword cssRenderProp contained position top bottom direction
|
||||
syn match cssRenderProp contained "\<\(left\|right\)\>"
|
||||
syn keyword cssRenderAttr contained block inline compact
|
||||
syn match cssRenderAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
|
||||
syn keyword cssRenderAttr contained static relative absolute fixed
|
||||
syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
|
||||
syn match cssRenderAttr contained "\<bidi-override\>"
|
||||
|
||||
|
||||
syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
|
||||
syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>"
|
||||
syn keyword cssAuralProp contained volume during azimuth elevation stress richness
|
||||
syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>"
|
||||
syn keyword cssAuralAttr contained silent
|
||||
syn match cssAuralAttr contained "\<spell-out\>"
|
||||
syn keyword cssAuralAttr contained non mix
|
||||
syn match cssAuralAttr contained "\<\(left\|right\)-side\>"
|
||||
syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>"
|
||||
syn keyword cssAuralAttr contained leftwards rightwards behind
|
||||
syn keyword cssAuralAttr contained below level above higher
|
||||
syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
|
||||
syn keyword cssAuralAttr contained faster slower
|
||||
syn keyword cssAuralAttr contained male female child code digits continuous
|
||||
|
||||
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>"
|
||||
syn keyword cssTableAttr contained fixed collapse separate show hide once always
|
||||
|
||||
" FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
|
||||
syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
|
||||
syn match cssBraces contained "[{}]"
|
||||
syn match cssError contained "{@<>"
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
|
||||
syn match cssBraceError "}"
|
||||
|
||||
syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape
|
||||
syn keyword cssPseudoClassId contained link visited active hover focus before after left right
|
||||
syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
|
||||
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
|
||||
|
||||
syn region cssComment start="/\*" end="\*/" contains=@Spell
|
||||
|
||||
syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
|
||||
syn match cssSpecialCharQQ +\\"+ contained
|
||||
syn match cssSpecialCharQ +\\'+ contained
|
||||
syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
|
||||
syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
|
||||
|
||||
if main_syntax == "css"
|
||||
syn sync minlines=10
|
||||
endif
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_css_syn_inits")
|
||||
if version < 508
|
||||
let did_css_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink cssComment Comment
|
||||
HiLink cssTagName Statement
|
||||
HiLink cssSelectorOp Special
|
||||
HiLink cssSelectorOp2 Special
|
||||
HiLink cssFontProp StorageClass
|
||||
HiLink cssColorProp StorageClass
|
||||
HiLink cssTextProp StorageClass
|
||||
HiLink cssBoxProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssAuralProp StorageClass
|
||||
HiLink cssRenderProp StorageClass
|
||||
HiLink cssGeneratedContentProp StorageClass
|
||||
HiLink cssPagingProp StorageClass
|
||||
HiLink cssTableProp StorageClass
|
||||
HiLink cssUIProp StorageClass
|
||||
HiLink cssFontAttr Type
|
||||
HiLink cssColorAttr Type
|
||||
HiLink cssTextAttr Type
|
||||
HiLink cssBoxAttr Type
|
||||
HiLink cssRenderAttr Type
|
||||
HiLink cssAuralAttr Type
|
||||
HiLink cssGeneratedContentAttr Type
|
||||
HiLink cssPagingAttr Type
|
||||
HiLink cssTableAttr Type
|
||||
HiLink cssUIAttr Type
|
||||
HiLink cssCommonAttr Type
|
||||
HiLink cssPseudoClassId PreProc
|
||||
HiLink cssPseudoClassLang Constant
|
||||
HiLink cssValueLength Number
|
||||
HiLink cssValueInteger Number
|
||||
HiLink cssValueNumber Number
|
||||
HiLink cssValueAngle Number
|
||||
HiLink cssValueTime Number
|
||||
HiLink cssValueFrequency Number
|
||||
HiLink cssFunction Constant
|
||||
HiLink cssURL String
|
||||
HiLink cssFunctionName Function
|
||||
HiLink cssColor Constant
|
||||
HiLink cssIdentifier Function
|
||||
HiLink cssInclude Include
|
||||
HiLink cssImportant Special
|
||||
HiLink cssBraces Function
|
||||
HiLink cssBraceError Error
|
||||
HiLink cssError Error
|
||||
HiLink cssInclude Include
|
||||
HiLink cssUnicodeEscape Special
|
||||
HiLink cssStringQQ String
|
||||
HiLink cssStringQ String
|
||||
HiLink cssMedia Special
|
||||
HiLink cssMediaType Special
|
||||
HiLink cssMediaComma Normal
|
||||
HiLink cssFontDescriptor Special
|
||||
HiLink cssFontDescriptorFunction Constant
|
||||
HiLink cssFontDescriptorProp StorageClass
|
||||
HiLink cssFontDescriptorAttr Type
|
||||
HiLink cssUnicodeRange Constant
|
||||
HiLink cssClassName Function
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
" <20><><EFBFBD>ǵ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>DZ<EFBFBD><C7B1><EFBFBD><EFBFBD><EFBFBD>256ɫ<36>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>:set t_Co=256
|
||||
if has("gui_running") || &t_Co==256
|
||||
" HACK modify cssDefinition to add @cssColors to its contains
|
||||
redir => s:olddef
|
||||
silent! syn list cssDefinition
|
||||
redir END
|
||||
if s:olddef != ''
|
||||
let s:b = strridx(s:olddef,'matchgroup')
|
||||
if s:b != -1
|
||||
exe 'syn region cssDefinition '.strpart(s:olddef,s:b).',@cssColors'
|
||||
endif
|
||||
endif
|
||||
|
||||
" w3c Colors
|
||||
let i = s:SetNamedColor('#800000', 'maroon')
|
||||
let i = s:SetNamedColor('#ff0000', 'red')
|
||||
let i = s:SetNamedColor('#ffA500', 'orange')
|
||||
let i = s:SetNamedColor('#ffff00', 'yellow')
|
||||
let i = s:SetNamedColor('#808000', 'olive')
|
||||
let i = s:SetNamedColor('#800080', 'purple')
|
||||
let i = s:SetNamedColor('#ff00ff', 'fuchsia')
|
||||
let i = s:SetNamedColor('#ffffff', 'white')
|
||||
let i = s:SetNamedColor('#00ff00', 'lime')
|
||||
let i = s:SetNamedColor('#008000', 'green')
|
||||
let i = s:SetNamedColor('#000080', 'navy')
|
||||
let i = s:SetNamedColor('#0000ff', 'blue')
|
||||
let i = s:SetNamedColor('#00ffff', 'aqua')
|
||||
let i = s:SetNamedColor('#008080', 'teal')
|
||||
let i = s:SetNamedColor('#000000', 'black')
|
||||
let i = s:SetNamedColor('#c0c0c0', 'silver')
|
||||
let i = s:SetNamedColor('#808080', 'gray')
|
||||
|
||||
" extra colors
|
||||
let i = s:SetNamedColor('#F0F8FF','AliceBlue')
|
||||
let i = s:SetNamedColor('#FAEBD7','AntiqueWhite')
|
||||
let i = s:SetNamedColor('#7FFFD4','Aquamarine')
|
||||
let i = s:SetNamedColor('#F0FFFF','Azure')
|
||||
let i = s:SetNamedColor('#F5F5DC','Beige')
|
||||
let i = s:SetNamedColor('#FFE4C4','Bisque')
|
||||
let i = s:SetNamedColor('#FFEBCD','BlanchedAlmond')
|
||||
let i = s:SetNamedColor('#8A2BE2','BlueViolet')
|
||||
let i = s:SetNamedColor('#A52A2A','Brown')
|
||||
let i = s:SetNamedColor('#DEB887','BurlyWood')
|
||||
let i = s:SetNamedColor('#5F9EA0','CadetBlue')
|
||||
let i = s:SetNamedColor('#7FFF00','Chartreuse')
|
||||
let i = s:SetNamedColor('#D2691E','Chocolate')
|
||||
let i = s:SetNamedColor('#FF7F50','Coral')
|
||||
let i = s:SetNamedColor('#6495ED','CornflowerBlue')
|
||||
let i = s:SetNamedColor('#FFF8DC','Cornsilk')
|
||||
let i = s:SetNamedColor('#DC143C','Crimson')
|
||||
let i = s:SetNamedColor('#00FFFF','Cyan')
|
||||
let i = s:SetNamedColor('#00008B','DarkBlue')
|
||||
let i = s:SetNamedColor('#008B8B','DarkCyan')
|
||||
let i = s:SetNamedColor('#B8860B','DarkGoldenRod')
|
||||
let i = s:SetNamedColor('#A9A9A9','DarkGray')
|
||||
let i = s:SetNamedColor('#A9A9A9','DarkGrey')
|
||||
let i = s:SetNamedColor('#006400','DarkGreen')
|
||||
let i = s:SetNamedColor('#BDB76B','DarkKhaki')
|
||||
let i = s:SetNamedColor('#8B008B','DarkMagenta')
|
||||
let i = s:SetNamedColor('#556B2F','DarkOliveGreen')
|
||||
let i = s:SetNamedColor('#FF8C00','Darkorange')
|
||||
let i = s:SetNamedColor('#9932CC','DarkOrchid')
|
||||
let i = s:SetNamedColor('#8B0000','DarkRed')
|
||||
let i = s:SetNamedColor('#E9967A','DarkSalmon')
|
||||
let i = s:SetNamedColor('#8FBC8F','DarkSeaGreen')
|
||||
let i = s:SetNamedColor('#483D8B','DarkSlateBlue')
|
||||
let i = s:SetNamedColor('#2F4F4F','DarkSlateGray')
|
||||
let i = s:SetNamedColor('#2F4F4F','DarkSlateGrey')
|
||||
let i = s:SetNamedColor('#00CED1','DarkTurquoise')
|
||||
let i = s:SetNamedColor('#9400D3','DarkViolet')
|
||||
let i = s:SetNamedColor('#FF1493','DeepPink')
|
||||
let i = s:SetNamedColor('#00BFFF','DeepSkyBlue')
|
||||
let i = s:SetNamedColor('#696969','DimGray')
|
||||
let i = s:SetNamedColor('#696969','DimGrey')
|
||||
let i = s:SetNamedColor('#1E90FF','DodgerBlue')
|
||||
let i = s:SetNamedColor('#B22222','FireBrick')
|
||||
let i = s:SetNamedColor('#FFFAF0','FloralWhite')
|
||||
let i = s:SetNamedColor('#228B22','ForestGreen')
|
||||
let i = s:SetNamedColor('#DCDCDC','Gainsboro')
|
||||
let i = s:SetNamedColor('#F8F8FF','GhostWhite')
|
||||
let i = s:SetNamedColor('#FFD700','Gold')
|
||||
let i = s:SetNamedColor('#DAA520','GoldenRod')
|
||||
let i = s:SetNamedColor('#808080','Grey')
|
||||
let i = s:SetNamedColor('#ADFF2F','GreenYellow')
|
||||
let i = s:SetNamedColor('#F0FFF0','HoneyDew')
|
||||
let i = s:SetNamedColor('#FF69B4','HotPink')
|
||||
let i = s:SetNamedColor('#CD5C5C','IndianRed')
|
||||
let i = s:SetNamedColor('#4B0082','Indigo')
|
||||
let i = s:SetNamedColor('#FFFFF0','Ivory')
|
||||
let i = s:SetNamedColor('#F0E68C','Khaki')
|
||||
let i = s:SetNamedColor('#E6E6FA','Lavender')
|
||||
let i = s:SetNamedColor('#FFF0F5','LavenderBlush')
|
||||
let i = s:SetNamedColor('#7CFC00','LawnGreen')
|
||||
let i = s:SetNamedColor('#FFFACD','LemonChiffon')
|
||||
let i = s:SetNamedColor('#ADD8E6','LightBlue')
|
||||
let i = s:SetNamedColor('#F08080','LightCoral')
|
||||
let i = s:SetNamedColor('#E0FFFF','LightCyan')
|
||||
let i = s:SetNamedColor('#FAFAD2','LightGoldenRodYellow')
|
||||
let i = s:SetNamedColor('#D3D3D3','LightGray')
|
||||
let i = s:SetNamedColor('#D3D3D3','LightGrey')
|
||||
let i = s:SetNamedColor('#90EE90','LightGreen')
|
||||
let i = s:SetNamedColor('#FFB6C1','LightPink')
|
||||
let i = s:SetNamedColor('#FFA07A','LightSalmon')
|
||||
let i = s:SetNamedColor('#20B2AA','LightSeaGreen')
|
||||
let i = s:SetNamedColor('#87CEFA','LightSkyBlue')
|
||||
let i = s:SetNamedColor('#778899','LightSlateGray')
|
||||
let i = s:SetNamedColor('#778899','LightSlateGrey')
|
||||
let i = s:SetNamedColor('#B0C4DE','LightSteelBlue')
|
||||
let i = s:SetNamedColor('#FFFFE0','LightYellow')
|
||||
let i = s:SetNamedColor('#32CD32','LimeGreen')
|
||||
let i = s:SetNamedColor('#FAF0E6','Linen')
|
||||
let i = s:SetNamedColor('#FF00FF','Magenta')
|
||||
let i = s:SetNamedColor('#66CDAA','MediumAquaMarine')
|
||||
let i = s:SetNamedColor('#0000CD','MediumBlue')
|
||||
let i = s:SetNamedColor('#BA55D3','MediumOrchid')
|
||||
let i = s:SetNamedColor('#9370D8','MediumPurple')
|
||||
let i = s:SetNamedColor('#3CB371','MediumSeaGreen')
|
||||
let i = s:SetNamedColor('#7B68EE','MediumSlateBlue')
|
||||
let i = s:SetNamedColor('#00FA9A','MediumSpringGreen')
|
||||
let i = s:SetNamedColor('#48D1CC','MediumTurquoise')
|
||||
let i = s:SetNamedColor('#C71585','MediumVioletRed')
|
||||
let i = s:SetNamedColor('#191970','MidnightBlue')
|
||||
let i = s:SetNamedColor('#F5FFFA','MintCream')
|
||||
let i = s:SetNamedColor('#FFE4E1','MistyRose')
|
||||
let i = s:SetNamedColor('#FFE4B5','Moccasin')
|
||||
let i = s:SetNamedColor('#FFDEAD','NavajoWhite')
|
||||
let i = s:SetNamedColor('#FDF5E6','OldLace')
|
||||
let i = s:SetNamedColor('#6B8E23','OliveDrab')
|
||||
let i = s:SetNamedColor('#FF4500','OrangeRed')
|
||||
let i = s:SetNamedColor('#DA70D6','Orchid')
|
||||
let i = s:SetNamedColor('#EEE8AA','PaleGoldenRod')
|
||||
let i = s:SetNamedColor('#98FB98','PaleGreen')
|
||||
let i = s:SetNamedColor('#AFEEEE','PaleTurquoise')
|
||||
let i = s:SetNamedColor('#D87093','PaleVioletRed')
|
||||
let i = s:SetNamedColor('#FFEFD5','PapayaWhip')
|
||||
let i = s:SetNamedColor('#FFDAB9','PeachPuff')
|
||||
let i = s:SetNamedColor('#CD853F','Peru')
|
||||
let i = s:SetNamedColor('#FFC0CB','Pink')
|
||||
let i = s:SetNamedColor('#DDA0DD','Plum')
|
||||
let i = s:SetNamedColor('#B0E0E6','PowderBlue')
|
||||
let i = s:SetNamedColor('#BC8F8F','RosyBrown')
|
||||
let i = s:SetNamedColor('#4169E1','RoyalBlue')
|
||||
let i = s:SetNamedColor('#8B4513','SaddleBrown')
|
||||
let i = s:SetNamedColor('#FA8072','Salmon')
|
||||
let i = s:SetNamedColor('#F4A460','SandyBrown')
|
||||
let i = s:SetNamedColor('#2E8B57','SeaGreen')
|
||||
let i = s:SetNamedColor('#FFF5EE','SeaShell')
|
||||
let i = s:SetNamedColor('#A0522D','Sienna')
|
||||
let i = s:SetNamedColor('#87CEEB','SkyBlue')
|
||||
let i = s:SetNamedColor('#6A5ACD','SlateBlue')
|
||||
let i = s:SetNamedColor('#708090','SlateGray')
|
||||
let i = s:SetNamedColor('#708090','SlateGrey')
|
||||
let i = s:SetNamedColor('#FFFAFA','Snow')
|
||||
let i = s:SetNamedColor('#00FF7F','SpringGreen')
|
||||
let i = s:SetNamedColor('#4682B4','SteelBlue')
|
||||
let i = s:SetNamedColor('#D2B48C','Tan')
|
||||
let i = s:SetNamedColor('#D8BFD8','Thistle')
|
||||
let i = s:SetNamedColor('#FF6347','Tomato')
|
||||
let i = s:SetNamedColor('#40E0D0','Turquoise')
|
||||
let i = s:SetNamedColor('#EE82EE','Violet')
|
||||
let i = s:SetNamedColor('#F5DEB3','Wheat')
|
||||
let i = s:SetNamedColor('#F5F5F5','WhiteSmoke')
|
||||
let i = s:SetNamedColor('#9ACD32','YellowGreen')
|
||||
|
||||
|
||||
|
||||
let i = 1
|
||||
while i <= line("$")
|
||||
call s:PreviewCSSColorInLine(i)
|
||||
let i = i+1
|
||||
endwhile
|
||||
unlet i
|
||||
|
||||
autocmd CursorHold * silent call s:PreviewCSSColorInLine('.')
|
||||
autocmd CursorHoldI * silent call s:PreviewCSSColorInLine('.')
|
||||
set ut=100
|
||||
endif " has("gui_running")
|
||||
|
||||
let b:current_syntax = "css"
|
||||
|
||||
if main_syntax == 'css'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: CVS annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the cvscommand plugin. Originally written by Mathieu
|
||||
" Clabaut
|
||||
" License:
|
||||
" Copyright (c) Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match cvsDate /\d\d-...-\d\d/ contained
|
||||
syn match cvsName /(\S* /hs=s+1,he=e-1 contained nextgroup=cvsDate
|
||||
syn match cvsVer /^\d\+\(\.\d\+\)\+/ contained nextgroup=cvsName
|
||||
syn region cvsHead start="^\d\+\.\d\+" end="):" contains=cvsVer,cvsName,cvsDate
|
||||
|
||||
if !exists("did_cvsannotate_syntax_inits")
|
||||
let did_cvsannotate_syntax_inits = 1
|
||||
hi link cvsDate Comment
|
||||
hi link cvsName Type
|
||||
hi link cvsVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="CVSAnnotate"
|
||||
@@ -1,62 +0,0 @@
|
||||
" fitnesse.vim
|
||||
" @author: Dan Woodward (dan DOT woodward AT gmail.com)
|
||||
|
||||
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:fitnesseEnabled = 1
|
||||
|
||||
syntax sync minlines=2
|
||||
|
||||
syn match collapsibleSectionStart /!\*\+.*/
|
||||
syn match collapsibleSectionEnd /\*\+!.*/
|
||||
syn match bracesAndBrackets "|\|{\|}\|\[\|\]"
|
||||
syn match bang /!/
|
||||
syn match literalText /!-.\{-}-!/
|
||||
syn match openCell /|[^|]\+\n/hs=s+1
|
||||
syn region colapsableFold start="!\*\{1,}" end="\*!" fold transparent keepend extend
|
||||
syn sync fromstart
|
||||
set foldmethod=syntax
|
||||
syn region cellContents start=+|+hs=s+1 end=+|+he=e-1 oneline contains=ALL
|
||||
syn region styledText start=+\[+hs=s+1 end=+\]+he=e-1 oneline contains=ALL
|
||||
syn region styledText2 start=+{+hs=s+1 end=+}+he=e-1 oneline contains=ALL
|
||||
syn region styledText3 start=+(+hs=s+1 end=+)+he=e-1 oneline contains=ALL
|
||||
syn region Comment start=/#/ end=/\n/
|
||||
syn match String /"[^"]\+"/ contains=Identifier
|
||||
syn match String /'[^']\+'/ contains=Identifier
|
||||
syn match symbol /$\w*/
|
||||
syn match extractVariable /${[^}]*}/
|
||||
syn match bold /'''.*'''/
|
||||
syn region heading start=/!\d/ end=/\n/
|
||||
syn match widget /!\w\+[\[{(]/me=e-1,he=e-1
|
||||
syn match Keyword /!define /
|
||||
syn match Keyword /!include /
|
||||
syn keyword Keyword scenario script Query: start check reject show Comment comment !see !include !See null
|
||||
syn match scenarioVariable /@\w\+/
|
||||
syn match wikiWord /\<[A-Z][a-z]\+[A-Za-z]*[A-Z]\+[A-Za-z]*\>/
|
||||
|
||||
highlight link collapsibleSectionStart Delimiter
|
||||
highlight link collapsibleSectionEnd Delimiter
|
||||
highlight link bracesAndBrackets Delimiter
|
||||
highlight link cellContents Macro
|
||||
highlight link bang Delimiter
|
||||
highlight link styledText Type
|
||||
highlight link styledText2 Type
|
||||
highlight link styledText3 Type
|
||||
highlight link literalText Special
|
||||
highlight link symbol Identifier
|
||||
highlight link extractVariable Identifier
|
||||
highlight link bold Constant
|
||||
highlight link heading Constant
|
||||
highlight link scenarioVariable Identifier
|
||||
highlight link styleMarker Special
|
||||
highlight link widget Statement
|
||||
highlight link wikiWord Underlined
|
||||
highlight link openCell Error
|
||||
|
||||
let b:current_syntax = "fitnesse"
|
||||
@@ -1,44 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: git annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn region gitName start="(\@<=" end="\( \d\d\d\d-\)\@=" contained
|
||||
syn match gitCommit /^\^\?\x\+/ contained
|
||||
syn match gitDate /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d\d\d\d/ contained
|
||||
syn match gitLineNumber /\d\+)\@=/ contained
|
||||
syn region gitAnnotation start="^" end=") " oneline keepend contains=gitCommit,gitLineNumber,gitDate,gitName
|
||||
|
||||
if !exists("did_gitannotate_syntax_inits")
|
||||
let did_gitannotate_syntax_inits = 1
|
||||
hi link gitName Type
|
||||
hi link gitCommit Statement
|
||||
hi link gitDate Comment
|
||||
hi link gitLineNumber Label
|
||||
endif
|
||||
|
||||
let b:current_syntax="gitAnnotate"
|
||||
@@ -1,40 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: HG annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match hgVer /\d\+/ contained
|
||||
syn match hgName /^\s*\S\+/ contained
|
||||
syn match hgHead /^\s*\S\+\s\+\d\+:/ contains=hgVer,hgName
|
||||
|
||||
if !exists("did_hgannotate_syntax_inits")
|
||||
let did_hgannotate_syntax_inits = 1
|
||||
hi link hgName Type
|
||||
hi link hgVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="hgAnnotate"
|
||||
@@ -1,86 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: Mako
|
||||
" Maintainer: Armin Ronacher <armin.ronacher@active-4.com>
|
||||
" URL: http://lucumr.pocoo.org/
|
||||
" Last Change: 2008 September 12
|
||||
" Version: 0.6.1
|
||||
"
|
||||
" Thanks to Brine Rue <brian@lolapps.com> who noticed a bug in the
|
||||
" delimiter handling.
|
||||
"
|
||||
" Known Limitations
|
||||
" the <%text> block does not have correct attributes
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("main_syntax")
|
||||
let main_syntax = "html"
|
||||
endif
|
||||
|
||||
"Source the html syntax file
|
||||
ru! syntax/html.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
"Put the python syntax file in @pythonTop
|
||||
syn include @pythonTop syntax/python.vim
|
||||
|
||||
" End keywords
|
||||
syn keyword makoEnd contained endfor endwhile endif endtry enddef
|
||||
|
||||
" Block rules
|
||||
syn region makoLine matchgroup=makoDelim start=#^\s*%# end=#$# keepend contains=@pythonTop,makoEnd
|
||||
syn region makoBlock matchgroup=makoDelim start=#<%!\?# end=#%># keepend contains=@pythonTop,makoEnd
|
||||
|
||||
" Variables
|
||||
syn region makoNested start="{" end="}" transparent display contained contains=makoNested,@pythonTop
|
||||
syn region makoVariable matchgroup=makoDelim start=#\${# end=#}# contains=makoNested,@pythonTop
|
||||
|
||||
" Comments
|
||||
syn region makoComment start="^\s*##" end="$"
|
||||
syn region makoDocComment matchgroup=makoDelim start="<%doc>" end="</%doc>" keepend
|
||||
|
||||
" Literal Blocks
|
||||
syn region makoText matchgroup=makoDelim start="<%text[^>]*>" end="</%text>"
|
||||
|
||||
" Attribute Sublexing
|
||||
syn match makoAttributeKey containedin=makoTag contained "[a-zA-Z_][a-zA-Z0-9_]*="
|
||||
syn region makoAttributeValue containedin=makoTag contained start=/"/ skip=/\\"/ end=/"/
|
||||
syn region makoAttributeValue containedin=MakoTag contained start=/'/ skip=/\\'/ end=/'/
|
||||
|
||||
" Tags
|
||||
syn region makoTag matchgroup=makoDelim start="<%\(def\|call\|page\|include\|namespace\|inherit\)\>" end="/\?>"
|
||||
syn match makoDelim "</%\(def\|call\|namespace\)>"
|
||||
|
||||
" Newline Escapes
|
||||
syn match makoEscape /\\$/
|
||||
|
||||
" Default highlighting links
|
||||
if version >= 508 || !exists("did_mako_syn_inits")
|
||||
if version < 508
|
||||
let did_mako_syn_inits = 1
|
||||
com -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
com -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink makoDocComment makoComment
|
||||
HiLink makoDefEnd makoDelim
|
||||
|
||||
HiLink makoAttributeKey Type
|
||||
HiLink makoAttributeValue String
|
||||
HiLink makoText Normal
|
||||
HiLink makoDelim Preproc
|
||||
HiLink makoEnd Keyword
|
||||
HiLink makoComment Comment
|
||||
HiLink makoEscape Special
|
||||
|
||||
delc HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "eruby"
|
||||
@@ -1,71 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: OpenUI/OPL
|
||||
" Maintainer: Roman 'gryf' Dobosz
|
||||
" $Id: opl.vim,v 1.0 2011/01/09 17:34:11 vimboss Exp $
|
||||
|
||||
" Open UI Language
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn region OPLString start=+"+ end=+"+ contains=@Spell
|
||||
syn region OPLSString start=+'+ end=+'+ contains=@Spell
|
||||
syn match OPLNumber "\<\d\+\>" display
|
||||
syn match OPLFloat "\<\d\+\.\d\+\>"
|
||||
"syn match OPLFloat "\.\d\+\>"
|
||||
|
||||
syn keyword OPLCommentTodo TODO FIXME XXX TBD
|
||||
syn match OPLLineComment "\/\/.*" contains=@Spell,OPLCommentTodo
|
||||
syn region OPLComment start="/\*" end="\*/" contains=@Spell,OPLCommentTodo
|
||||
|
||||
syn keyword OPLConditional if else when goto
|
||||
syn keyword OPLRepeat for while
|
||||
syn keyword OPLConstant TRUE FALSE true false NULL
|
||||
|
||||
syn keyword OPLType OuiBooleanT OuiCharT OuiDecimalT OuiFloatT OuiIntegerT
|
||||
syn keyword OPLType OuiLongT OuiPointerT OuiShortT OuiStringT
|
||||
syn keyword OPLType array bool char const constant enum float inst
|
||||
syn keyword OPLType int long message record short string
|
||||
|
||||
syn keyword OPLStatement class of return const var module on message
|
||||
syn keyword OPLStatement initially instance private public type var
|
||||
syn keyword OPLStatement variable when while
|
||||
|
||||
syn keyword OPLOperator and in not div
|
||||
|
||||
syn keyword OPLStatement class function nextgroup=OPLFunction skipwhite
|
||||
syn match OPLFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
|
||||
syn match OPLSpecial "::\~\?\zs\h\w*\ze([^)]*\()\s*\(const\)\?\)\?"
|
||||
syn match OPLKeyword "\^\w*\~\?"
|
||||
|
||||
" Highlight Class and Function names
|
||||
syn match OPLCustomParen "(" "contains=Paren,cCppParen
|
||||
syn match OPLCustomFunction "\w\+\s*(" contains=OPLCustomParen
|
||||
"syn match OPLCustomScope "::"
|
||||
"syn match OPLCustomClass "\w\+\s*::" contains=OPLCustomScope
|
||||
|
||||
" Folding
|
||||
syn region OPLFold start="{" end="}" transparent fold
|
||||
"syn sync fromstart
|
||||
setlocal foldmethod=syntax
|
||||
setlocal nofoldenable
|
||||
|
||||
" Define the default highliting
|
||||
hi def link OPLComment Comment
|
||||
hi def link OPLLineComment Comment
|
||||
hi def link OPLNumber Number
|
||||
hi def link OPLFloat Float
|
||||
hi def link OPLFunction Function
|
||||
hi def link OPLConstant Constant
|
||||
hi def link OPLStatement Statement
|
||||
hi def link OPLString String
|
||||
hi def link OPLSString String
|
||||
hi def link OPLType Type
|
||||
hi def link OPLConditional Conditional
|
||||
hi def link OPLCommentTodo Todo
|
||||
hi def link OPLSpecial Special
|
||||
hi def link OPLKeyword Keyword
|
||||
hi def link OPLCustomFunction Special
|
||||
|
||||
let b:current_syntax = "opl"
|
||||
" vim: ts=8
|
||||
@@ -1,376 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru>
|
||||
" URL: http://www.hlabs.spb.ru/vim/python.vim
|
||||
" Last Change: 2010-04-09
|
||||
" Filenames: *.py
|
||||
" Version: 2.6.6
|
||||
"
|
||||
" Based on python.vim (from Vim 6.1 distribution)
|
||||
" by Neil Schemenauer <nas@python.ca>
|
||||
"
|
||||
" Thanks:
|
||||
"
|
||||
" Jeroen Ruigrok van der Werven
|
||||
" for the idea to highlight erroneous operators
|
||||
" Pedro Algarvio
|
||||
" for the patch to enable spell checking only for the right spots
|
||||
" (strings and comments)
|
||||
" John Eikenberry
|
||||
" for the patch fixing small typo
|
||||
" Caleb Adamantine
|
||||
" for the patch fixing highlighting for decorators
|
||||
" Andrea Riciputi
|
||||
" for the patch with new configuration options
|
||||
|
||||
"
|
||||
" Options:
|
||||
"
|
||||
" For set option do: let OPTION_NAME = 1
|
||||
" For clear option do: let OPTION_NAME = 0
|
||||
"
|
||||
" Option names:
|
||||
"
|
||||
" For highlight builtin functions and objects:
|
||||
" python_highlight_builtins
|
||||
"
|
||||
" For highlight builtin objects:
|
||||
" python_highlight_builtin_objs
|
||||
"
|
||||
" For highlight builtin funtions:
|
||||
" python_highlight_builtin_funcs
|
||||
"
|
||||
" For highlight standard exceptions:
|
||||
" python_highlight_exceptions
|
||||
"
|
||||
" For highlight string formatting:
|
||||
" python_highlight_string_formatting
|
||||
"
|
||||
" For highlight str.format syntax:
|
||||
" python_highlight_string_format
|
||||
"
|
||||
" For highlight string.Template syntax:
|
||||
" python_highlight_string_templates
|
||||
"
|
||||
" For highlight indentation errors:
|
||||
" python_highlight_indent_errors
|
||||
"
|
||||
" For highlight trailing spaces:
|
||||
" python_highlight_space_errors
|
||||
"
|
||||
" For highlight doc-tests:
|
||||
" python_highlight_doctests
|
||||
"
|
||||
" If you want all Python highlightings above:
|
||||
" python_highlight_all
|
||||
" (This option not override previously set options)
|
||||
"
|
||||
" For fast machines:
|
||||
" python_slow_sync
|
||||
"
|
||||
" For "print" builtin as function:
|
||||
" python_print_as_function
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists("python_highlight_all") && python_highlight_all != 0
|
||||
" Not override previously set options
|
||||
if !exists("python_highlight_builtins")
|
||||
if !exists("python_highlight_builtin_objs")
|
||||
let python_highlight_builtin_objs = 1
|
||||
endif
|
||||
if !exists("python_highlight_builtin_funcs")
|
||||
let python_highlight_builtin_funcs = 1
|
||||
endif
|
||||
endif
|
||||
if !exists("python_highlight_exceptions")
|
||||
let python_highlight_exceptions = 1
|
||||
endif
|
||||
if !exists("python_highlight_string_formatting")
|
||||
let python_highlight_string_formatting = 1
|
||||
endif
|
||||
if !exists("python_highlight_string_format")
|
||||
let python_highlight_string_format = 1
|
||||
endif
|
||||
if !exists("python_highlight_string_templates")
|
||||
let python_highlight_string_templates = 1
|
||||
endif
|
||||
if !exists("python_highlight_indent_errors")
|
||||
let python_highlight_indent_errors = 1
|
||||
endif
|
||||
if !exists("python_highlight_space_errors")
|
||||
let python_highlight_space_errors = 1
|
||||
endif
|
||||
if !exists("python_highlight_doctests")
|
||||
let python_highlight_doctests = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
" Keywords
|
||||
syn keyword pythonStatement break continue del
|
||||
syn keyword pythonStatement exec return
|
||||
syn keyword pythonStatement pass raise
|
||||
syn keyword pythonStatement global assert
|
||||
syn keyword pythonStatement lambda yield
|
||||
syn keyword pythonStatement with
|
||||
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
||||
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
|
||||
syn keyword pythonRepeat for while
|
||||
syn keyword pythonConditional if elif else
|
||||
syn keyword pythonPreCondit import from as
|
||||
syn keyword pythonException try except finally
|
||||
syn keyword pythonOperator and in is not or
|
||||
|
||||
if !exists("python_print_as_function") || python_print_as_function == 0
|
||||
syn keyword pythonStatement print
|
||||
endif
|
||||
|
||||
" Decorators (new in Python 2.4)
|
||||
" gryf: match also name of the decorator not only at sign.
|
||||
syn match pythonDecorator "@[a-zA-Z_][a-zA-Z0-9_]*" display nextgroup=pythonDottedName skipwhite
|
||||
"syn match pythonDecorator "@" display nextgroup=pythonDottedName skipwhite
|
||||
syn match pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
|
||||
syn match pythonDot "\." display containedin=pythonDottedName
|
||||
|
||||
" Comments
|
||||
syn match pythonComment "#.*$" display contains=pythonTodo,@Spell
|
||||
syn match pythonRun "\%^#!.*$"
|
||||
syn match pythonCoding "\%^.*\(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
|
||||
syn keyword pythonTodo TODO FIXME XXX contained
|
||||
|
||||
" Errors
|
||||
syn match pythonError "\<\d\+\D\+\>" display
|
||||
syn match pythonError "[$?]" display
|
||||
syn match pythonError "[&|]\{2,}" display
|
||||
syn match pythonError "[=]\{3,}" display
|
||||
|
||||
" TODO: Mixing spaces and tabs also may be used for pretty formatting multiline
|
||||
" statements. For now I don't know how to work around this.
|
||||
if exists("python_highlight_indent_errors") && python_highlight_indent_errors != 0
|
||||
syn match pythonIndentError "^\s*\( \t\|\t \)\s*\S"me=e-1 display
|
||||
endif
|
||||
|
||||
" Trailing space errors
|
||||
if exists("python_highlight_space_errors") && python_highlight_space_errors != 0
|
||||
syn match pythonSpaceError "\s\+$" display
|
||||
endif
|
||||
|
||||
" Strings
|
||||
syn region pythonString start=+[bB]\='+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonEscape,pythonEscapeError,@Spell
|
||||
syn region pythonString start=+[bB]\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonEscape,pythonEscapeError,@Spell
|
||||
syn region pythonString start=+[bB]\="""+ end=+"""+ keepend contains=pythonEscape,pythonEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonString start=+[bB]\='''+ end=+'''+ keepend contains=pythonEscape,pythonEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
||||
|
||||
syn match pythonEscape +\\[abfnrtv'"\\]+ display contained
|
||||
syn match pythonEscape "\\\o\o\=\o\=" display contained
|
||||
syn match pythonEscapeError "\\\o\{,2}[89]" display contained
|
||||
syn match pythonEscape "\\x\x\{2}" display contained
|
||||
syn match pythonEscapeError "\\x\x\=\X" display contained
|
||||
syn match pythonEscape "\\$"
|
||||
|
||||
" Unicode strings
|
||||
syn region pythonUniString start=+[uU]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,@Spell
|
||||
syn region pythonUniString start=+[uU]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,@Spell
|
||||
syn region pythonUniString start=+[uU]"""+ end=+"""+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonUniString start=+[uU]'''+ end=+'''+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
||||
|
||||
syn match pythonUniEscape "\\u\x\{4}" display contained
|
||||
syn match pythonUniEscapeError "\\u\x\{,3}\X" display contained
|
||||
syn match pythonUniEscape "\\U\x\{8}" display contained
|
||||
syn match pythonUniEscapeError "\\U\x\{,7}\X" display contained
|
||||
syn match pythonUniEscape "\\N{[A-Z ]\+}" display contained
|
||||
syn match pythonUniEscapeError "\\N{[^A-Z ]\+}" display contained
|
||||
|
||||
" Raw strings
|
||||
syn region pythonRawString start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawString start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawString start=+[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonRawString start=+[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
|
||||
|
||||
syn match pythonRawEscape +\\['"]+ display transparent contained
|
||||
|
||||
" Unicode raw strings
|
||||
syn region pythonUniRawString start=+[uU][rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
|
||||
syn region pythonUniRawString start=+[uU][rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
|
||||
syn region pythonUniRawString start=+[uU][rR]"""+ end=+"""+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonUniRawString start=+[uU][rR]'''+ end=+'''+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
||||
|
||||
syn match pythonUniRawEscape "\([^\\]\(\\\\\)*\)\@<=\\u\x\{4}" display contained
|
||||
syn match pythonUniRawEscapeError "\([^\\]\(\\\\\)*\)\@<=\\u\x\{,3}\X" display contained
|
||||
|
||||
if exists("python_highlight_string_formatting") && python_highlight_string_formatting != 0
|
||||
" String formatting
|
||||
syn match pythonStrFormatting "%\(([^)]\+)\)\=[-#0 +]*\d*\(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
||||
syn match pythonStrFormatting "%[-#0 +]*\(\*\|\d\+\)\=\(\.\(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
||||
endif
|
||||
|
||||
if exists("python_highlight_string_format") && python_highlight_string_format != 0
|
||||
" str.format syntax
|
||||
syn match pythonStrFormat "{{\|}}" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
||||
syn match pythonStrFormat "{\([a-zA-Z_][a-zA-Z0-9_]*\|\d\+\)\(\.[a-zA-Z_][a-zA-Z0-9_]*\|\[\(\d\+\|[^!:\}]\+\)\]\)*\(![rs]\)\=\(:\({\([a-zA-Z_][a-zA-Z0-9_]*\|\d\+\)}\|\([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*\(\.\d\+\)\=[bcdeEfFgGnoxX%]\=\)\=\)\=}" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
||||
endif
|
||||
|
||||
if exists("python_highlight_string_templates") && python_highlight_string_templates != 0
|
||||
" String templates
|
||||
syn match pythonStrTemplate "\$\$" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
||||
syn match pythonStrTemplate "\${[a-zA-Z_][a-zA-Z0-9_]*}" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
||||
syn match pythonStrTemplate "\$[a-zA-Z_][a-zA-Z0-9_]*" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
||||
endif
|
||||
|
||||
if exists("python_highlight_doctests") && python_highlight_doctests != 0
|
||||
" DocTests
|
||||
syn region pythonDocTest start="^\s*>>>" end=+'''+he=s-1 end="^\s*$" contained
|
||||
syn region pythonDocTest2 start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained
|
||||
endif
|
||||
|
||||
" Numbers (ints, longs, floats, complex)
|
||||
syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
|
||||
|
||||
syn match pythonHexNumber "\<0[xX]\x\+[lL]\=\>" display
|
||||
syn match pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
|
||||
syn match pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
|
||||
|
||||
syn match pythonNumber "\<\d\+[lLjJ]\=\>" display
|
||||
|
||||
syn match pythonFloat "\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
|
||||
syn match pythonFloat "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
|
||||
syn match pythonFloat "\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
|
||||
|
||||
syn match pythonOctError "\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
|
||||
syn match pythonBinError "\<0[bB][01]*[2-9]\d*[lL]\=\>" display
|
||||
|
||||
if exists("python_highlight_builtin_objs") && python_highlight_builtin_objs != 0
|
||||
" Builtin objects and types
|
||||
syn keyword pythonBuiltinObj True False Ellipsis None NotImplemented
|
||||
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
|
||||
endif
|
||||
|
||||
if exists("python_highlight_builtin_funcs") && python_highlight_builtin_funcs != 0
|
||||
" Builtin functions
|
||||
syn keyword pythonBuiltinFunc __import__ abs all any apply
|
||||
syn keyword pythonBuiltinFunc basestring bin bool buffer bytearray bytes callable
|
||||
syn keyword pythonBuiltinFunc chr classmethod cmp coerce compile complex
|
||||
syn keyword pythonBuiltinFunc delattr dict dir divmod enumerate eval
|
||||
syn keyword pythonBuiltinFunc execfile file filter float format frozenset getattr
|
||||
syn keyword pythonBuiltinFunc globals hasattr hash help hex id
|
||||
syn keyword pythonBuiltinFunc input int intern isinstance
|
||||
syn keyword pythonBuiltinFunc issubclass iter len list locals long map max
|
||||
syn keyword pythonBuiltinFunc min next object oct open ord
|
||||
syn keyword pythonBuiltinFunc pow property range
|
||||
syn keyword pythonBuiltinFunc raw_input reduce reload repr
|
||||
syn keyword pythonBuiltinFunc reversed round set setattr
|
||||
syn keyword pythonBuiltinFunc slice sorted staticmethod str sum super tuple
|
||||
syn keyword pythonBuiltinFunc type unichr unicode vars xrange zip
|
||||
|
||||
if exists("python_print_as_function") && python_print_as_function != 0
|
||||
syn keyword pythonBuiltinFunc print
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists("python_highlight_exceptions") && python_highlight_exceptions != 0
|
||||
" Builtin exceptions and warnings
|
||||
syn keyword pythonExClass BaseException
|
||||
syn keyword pythonExClass Exception StandardError ArithmeticError
|
||||
syn keyword pythonExClass LookupError EnvironmentError
|
||||
|
||||
syn keyword pythonExClass AssertionError AttributeError BufferError EOFError
|
||||
syn keyword pythonExClass FloatingPointError GeneratorExit IOError
|
||||
syn keyword pythonExClass ImportError IndexError KeyError
|
||||
syn keyword pythonExClass KeyboardInterrupt MemoryError NameError
|
||||
syn keyword pythonExClass NotImplementedError OSError OverflowError
|
||||
syn keyword pythonExClass ReferenceError RuntimeError StopIteration
|
||||
syn keyword pythonExClass SyntaxError IndentationError TabError
|
||||
syn keyword pythonExClass SystemError SystemExit TypeError
|
||||
syn keyword pythonExClass UnboundLocalError UnicodeError
|
||||
syn keyword pythonExClass UnicodeEncodeError UnicodeDecodeError
|
||||
syn keyword pythonExClass UnicodeTranslateError ValueError VMSError
|
||||
syn keyword pythonExClass WindowsError ZeroDivisionError
|
||||
|
||||
syn keyword pythonExClass Warning UserWarning BytesWarning DeprecationWarning
|
||||
syn keyword pythonExClass PendingDepricationWarning SyntaxWarning
|
||||
syn keyword pythonExClass RuntimeWarning FutureWarning
|
||||
syn keyword pythonExClass ImportWarning UnicodeWarning
|
||||
endif
|
||||
|
||||
if exists("python_slow_sync") && python_slow_sync != 0
|
||||
syn sync minlines=2000
|
||||
else
|
||||
" This is fast but code inside triple quoted strings screws it up. It
|
||||
" is impossible to fix because the only way to know if you are inside a
|
||||
" triple quoted string is to start from the beginning of the file.
|
||||
syn sync match pythonSync grouphere NONE "):$"
|
||||
syn sync maxlines=200
|
||||
endif
|
||||
|
||||
if version >= 508 || !exists("did_python_syn_inits")
|
||||
if version <= 508
|
||||
let did_python_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink pythonStatement Statement
|
||||
HiLink pythonPreCondit Statement
|
||||
HiLink pythonFunction Function
|
||||
HiLink pythonConditional Conditional
|
||||
HiLink pythonRepeat Repeat
|
||||
HiLink pythonException Exception
|
||||
HiLink pythonOperator Operator
|
||||
|
||||
HiLink pythonDecorator Define
|
||||
HiLink pythonDottedName Function
|
||||
HiLink pythonDot Normal
|
||||
|
||||
HiLink pythonComment Comment
|
||||
HiLink pythonCoding Special
|
||||
HiLink pythonRun Special
|
||||
HiLink pythonTodo Todo
|
||||
|
||||
HiLink pythonError Error
|
||||
HiLink pythonIndentError Error
|
||||
HiLink pythonSpaceError Error
|
||||
|
||||
HiLink pythonString String
|
||||
HiLink pythonUniString String
|
||||
HiLink pythonRawString String
|
||||
HiLink pythonUniRawString String
|
||||
|
||||
HiLink pythonEscape Special
|
||||
HiLink pythonEscapeError Error
|
||||
HiLink pythonUniEscape Special
|
||||
HiLink pythonUniEscapeError Error
|
||||
HiLink pythonUniRawEscape Special
|
||||
HiLink pythonUniRawEscapeError Error
|
||||
|
||||
HiLink pythonStrFormatting Special
|
||||
HiLink pythonStrFormat Special
|
||||
HiLink pythonStrTemplate Special
|
||||
|
||||
HiLink pythonDocTest Special
|
||||
HiLink pythonDocTest2 Special
|
||||
|
||||
HiLink pythonNumber Number
|
||||
HiLink pythonHexNumber Number
|
||||
HiLink pythonOctNumber Number
|
||||
HiLink pythonBinNumber Number
|
||||
HiLink pythonFloat Float
|
||||
HiLink pythonOctError Error
|
||||
HiLink pythonHexError Error
|
||||
HiLink pythonBinError Error
|
||||
|
||||
HiLink pythonBuiltinObj Structure
|
||||
HiLink pythonBuiltinFunc Function
|
||||
|
||||
HiLink pythonExClass Structure
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "python"
|
||||
@@ -1,19 +0,0 @@
|
||||
" Syntax highlighting for snippet files (used for snipMate.vim)
|
||||
" Hopefully this should make snippets a bit nicer to write!
|
||||
syn match snipComment '^#.*'
|
||||
syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand
|
||||
syn match tabStop '\$\d\+'
|
||||
syn match snipCommand '`.\{-}`'
|
||||
syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword
|
||||
syn match multiSnipText '\S\+ \zs.*' contained
|
||||
syn match snipKeyword '^snippet'me=s+8 contained
|
||||
syn match snipError "^[^#s\t].*$"
|
||||
|
||||
hi link snipComment Comment
|
||||
hi link multiSnipText String
|
||||
hi link snipKeyword Keyword
|
||||
hi link snipComment Comment
|
||||
hi link placeHolder Special
|
||||
hi link tabStop Special
|
||||
hi link snipCommand String
|
||||
hi link snipError Error
|
||||
@@ -1,42 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: SVK annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match svkDate /\d\{4}-\d\{1,2}-\d\{1,2}/ skipwhite contained
|
||||
syn match svkName /(\s*\zs\S\+/ contained nextgroup=svkDate skipwhite
|
||||
syn match svkVer /^\s*\d\+/ contained nextgroup=svkName skipwhite
|
||||
syn region svkHead start=/^/ end="):" contains=svkVer,svkName,svkDate oneline
|
||||
|
||||
if !exists("did_svkannotate_syntax_inits")
|
||||
let did_svkannotate_syntax_inits = 1
|
||||
hi link svkName Type
|
||||
hi link svkDate Comment
|
||||
hi link svkVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="svkAnnotate"
|
||||
@@ -1,40 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: SVN annotate output
|
||||
" Maintainer: Bob Hiestand <bob.hiestand@gmail.com>
|
||||
" Remark: Used by the vcscommand plugin.
|
||||
" License:
|
||||
" Copyright (c) Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match svnName /\S\+/ contained
|
||||
syn match svnVer /^\s*\zs\d\+/ contained nextgroup=svnName skipwhite
|
||||
syn match svnHead /^\s*\d\+\s\+\S\+/ contains=svnVer,svnName
|
||||
|
||||
if !exists("did_svnannotate_syntax_inits")
|
||||
let did_svnannotate_syntax_inits = 1
|
||||
hi link svnName Type
|
||||
hi link svnVer Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax="svnAnnotate"
|
||||
@@ -1,63 +0,0 @@
|
||||
" File: tagbar.vim
|
||||
" Description: Tagbar syntax settings
|
||||
" Author: Jan Larres <jan@majutsushi.net>
|
||||
" Licence: Vim licence
|
||||
" Website: http://majutsushi.github.com/tagbar/
|
||||
" Version: 2.3
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:ic = g:tagbar_iconchars[0]
|
||||
if s:ic =~ '[]^\\-]'
|
||||
let s:ic = '\' . s:ic
|
||||
endif
|
||||
let s:io = g:tagbar_iconchars[1]
|
||||
if s:io =~ '[]^\\-]'
|
||||
let s:io = '\' . s:io
|
||||
endif
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '] \)\@<=[^-+: ]\+[^:]\+$'
|
||||
execute "syntax match TagbarKind '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
execute "syntax match TagbarScope '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\)\@='
|
||||
execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPrivate '" . s:pattern . "'"
|
||||
|
||||
unlet s:pattern
|
||||
|
||||
syntax match TagbarNestedKind '^\s\+\[[^]]\+\]$'
|
||||
syntax match TagbarComment '^".*'
|
||||
syntax match TagbarType ' : \zs.*'
|
||||
syntax match TagbarSignature '(.*)'
|
||||
syntax match TagbarPseudoID '\*\ze :'
|
||||
|
||||
highlight default link TagbarComment Comment
|
||||
highlight default link TagbarKind Identifier
|
||||
highlight default link TagbarNestedKind TagbarKind
|
||||
highlight default link TagbarScope Title
|
||||
highlight default link TagbarType Type
|
||||
highlight default link TagbarSignature SpecialKey
|
||||
highlight default link TagbarPseudoID NonText
|
||||
highlight default link TagbarFoldIcon Statement
|
||||
highlight default link TagbarHighlight Search
|
||||
|
||||
highlight default TagbarAccessPublic guifg=Green ctermfg=Green
|
||||
highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
|
||||
highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
|
||||
|
||||
let b:current_syntax = "tagbar"
|
||||
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
103
syntax/tmux.vim
103
syntax/tmux.vim
@@ -1,103 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: tmux(1) configuration file
|
||||
" Maintainer: Tiago Cunha <me@tiagocunha.org>
|
||||
" Last Change: $Date: 2010/07/02 02:46:39 $
|
||||
" License: This file is placed in the public domain.
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal iskeyword+=-
|
||||
syntax case match
|
||||
|
||||
syn keyword tmuxAction any current none
|
||||
syn keyword tmuxBoolean off on
|
||||
|
||||
syn keyword tmuxCmds detach[-client] ls list-sessions neww new-window
|
||||
syn keyword tmuxCmds bind[-key] unbind[-key] prev[ious-window] last[-window]
|
||||
syn keyword tmuxCmds lsk list-keys set[-option] renamew rename-window selectw
|
||||
syn keyword tmuxCmds select-window lsw list-windows attach[-session]
|
||||
syn keyword tmuxCmds send-prefix refresh[-client] killw kill-window lsc
|
||||
syn keyword tmuxCmds list-clients linkw link-window unlinkw unlink-window
|
||||
syn keyword tmuxCmds next[-window] send[-keys] swapw swap-window
|
||||
syn keyword tmuxCmds rename[-session] kill-session switchc switch-client
|
||||
syn keyword tmuxCmds has[-session] copy-mode pasteb paste-buffer
|
||||
syn keyword tmuxCmds new[-session] start[-server] kill-server setw
|
||||
syn keyword tmuxCmds set-window-option show[-options] showw show-window-options
|
||||
syn keyword tmuxCmds command-prompt setb set-buffer showb show-buffer lsb
|
||||
syn keyword tmuxCmds list-buffers deleteb delete-buffer lscm list-commands
|
||||
syn keyword tmuxCmds movew move-window respawnw respawn-window
|
||||
syn keyword tmuxCmds source[-file] info server-info clock-mode lock[-server]
|
||||
syn keyword tmuxCmds saveb save-buffer downp down-pane killp
|
||||
syn keyword tmuxCmds kill-pane resizep resize-pane selectp select-pane swapp
|
||||
syn keyword tmuxCmds swap-pane splitw split-window upp up-pane choose-session
|
||||
syn keyword tmuxCmds choose-window loadb load-buffer copyb copy-buffer suspendc
|
||||
syn keyword tmuxCmds suspend-client findw find-window breakp break-pane nextl
|
||||
syn keyword tmuxCmds next-layout rotatew rotate-window confirm[-before]
|
||||
syn keyword tmuxCmds clearhist clear-history selectl select-layout if[-shell]
|
||||
syn keyword tmuxCmds display[-message] setenv set-environment showenv
|
||||
syn keyword tmuxCmds show-environment choose-client displayp display-panes
|
||||
syn keyword tmuxCmds run[-shell] lockc lock-client locks lock-session lsp
|
||||
syn keyword tmuxCmds list-panes pipep pipe-pane showmsgs show-messages capturep
|
||||
syn keyword tmuxCmds capture-pane joinp join-pane choose-buffer
|
||||
|
||||
syn keyword tmuxOptsSet prefix status status-fg status-bg bell-action
|
||||
syn keyword tmuxOptsSet default-command history-limit status-left status-right
|
||||
syn keyword tmuxOptsSet status-interval set-titles display-time buffer-limit
|
||||
syn keyword tmuxOptsSet status-left-length status-right-length message-fg
|
||||
syn keyword tmuxOptsSet message-bg lock-after-time default-path repeat-time
|
||||
syn keyword tmuxOptsSet message-attr status-attr status-keys set-remain-on-exit
|
||||
syn keyword tmuxOptsSet status-utf8 default-terminal visual-activity
|
||||
syn keyword tmuxOptsSet visual-bell visual-content status-justify
|
||||
syn keyword tmuxOptsSet terminal-overrides status-left-attr status-left-bg
|
||||
syn keyword tmuxOptsSet status-left-fg status-right-attr status-right-bg
|
||||
syn keyword tmuxOptsSet status-right-fg update-environment base-index
|
||||
syn keyword tmuxOptsSet display-panes-colour display-panes-time default-shell
|
||||
syn keyword tmuxOptsSet set-titles-string lock-command lock-server
|
||||
syn keyword tmuxOptsSet mouse-select-pane message-limit quiet escape-time
|
||||
syn keyword tmuxOptsSet pane-active-border-bg pane-active-border-fg
|
||||
syn keyword tmuxOptsSet pane-border-bg pane-border-fg
|
||||
syn keyword tmuxOptsSet display-panes-active-colour alternate-screen
|
||||
syn keyword tmuxOptsSet detach-on-destroy
|
||||
|
||||
syn keyword tmuxOptsSetw monitor-activity aggressive-resize force-width
|
||||
syn keyword tmuxOptsSetw force-height remain-on-exit uft8 mode-fg mode-bg
|
||||
syn keyword tmuxOptsSetw mode-keys clock-mode-colour clock-mode-style
|
||||
syn keyword tmuxOptsSetw xterm-keys mode-attr window-status-attr
|
||||
syn keyword tmuxOptsSetw window-status-bg window-status-fg automatic-rename
|
||||
syn keyword tmuxOptsSetw main-pane-width main-pane-height monitor-content
|
||||
syn keyword tmuxOptsSetw window-status-current-attr window-status-current-bg
|
||||
syn keyword tmuxOptsSetw window-status-current-fg mode-mouse synchronize-panes
|
||||
syn keyword tmuxOptsSetw window-status-format window-status-current-format
|
||||
syn keyword tmuxOptsSetw word-separators
|
||||
|
||||
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
|
||||
|
||||
syn match tmuxKey /\(C-\|M-\|\^\)\p/ display
|
||||
syn match tmuxNumber /\d\+/ display
|
||||
syn match tmuxOptions /\s-\a\+/ display
|
||||
syn match tmuxVariable /\w\+=/ display
|
||||
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
|
||||
|
||||
syn region tmuxComment start=/#/ end=/$/ contains=tmuxTodo display oneline
|
||||
syn region tmuxString start=/"/ end=/"/ display oneline
|
||||
syn region tmuxString start=/'/ end=/'/ display oneline
|
||||
|
||||
hi def link tmuxAction Boolean
|
||||
hi def link tmuxBoolean Boolean
|
||||
hi def link tmuxCmds Keyword
|
||||
hi def link tmuxComment Comment
|
||||
hi def link tmuxKey Special
|
||||
hi def link tmuxNumber Number
|
||||
hi def link tmuxOptions Identifier
|
||||
hi def link tmuxOptsSet Function
|
||||
hi def link tmuxOptsSetw Function
|
||||
hi def link tmuxString String
|
||||
hi def link tmuxTodo Todo
|
||||
hi def link tmuxVariable Constant
|
||||
hi def link tmuxVariableExpansion Constant
|
||||
|
||||
let b:current_syntax = "tmux"
|
||||
@@ -1,31 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: VCS commit file
|
||||
" Maintainer: Bob Hiestand (bob.hiestand@gmail.com)
|
||||
" License:
|
||||
" Copyright (c) Bob Hiestand
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to
|
||||
" deal in the Software without restriction, including without limitation the
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
" IN THE SOFTWARE.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax region vcsComment start="^VCS: " end="$"
|
||||
highlight link vcsComment Comment
|
||||
let b:current_syntax = "vcscommit"
|
||||
@@ -1,261 +0,0 @@
|
||||
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=79
|
||||
" Vimwiki syntax file
|
||||
" Author: Maxim Kim <habamax@gmail.com>
|
||||
" Home: http://code.google.com/p/vimwiki/
|
||||
|
||||
" Quit if syntax file is already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Links highlighting is controlled by vimwiki#base#highlight_links() function.
|
||||
" It is called from setup_buffer_enter() function in the BufEnter autocommand.
|
||||
|
||||
" Load concrete Wiki syntax
|
||||
execute 'runtime! syntax/vimwiki_'.VimwikiGet('syntax').'.vim'
|
||||
|
||||
" Concealed chars
|
||||
if exists("+conceallevel")
|
||||
syntax conceal on
|
||||
endif
|
||||
|
||||
syntax spell toplevel
|
||||
|
||||
syn match VimwikiLinkChar contained /\[\[/
|
||||
syn match VimwikiLinkChar contained /\]\]/
|
||||
syn match VimwikiLinkChar contained /\[\[[^\[\]\|]\{-}|\ze.\{-}]]/
|
||||
syn match VimwikiLinkChar contained /\[\[[^\[\]\|]\{-}]\[\ze.\{-}]]/
|
||||
|
||||
syn match VimwikiNoLinkChar contained /\[\[/
|
||||
syn match VimwikiNoLinkChar contained /\]\]/
|
||||
syn match VimwikiNoLinkChar contained /\[\[[^\[\]\|]\{-}|\ze.*]]/
|
||||
syn match VimwikiNoLinkChar contained /\[\[[^\[\]\|]\{-}]\[\ze.*]]/
|
||||
|
||||
execute 'syn match VimwikiBoldChar contained /'.g:vimwiki_char_bold.'/'
|
||||
execute 'syn match VimwikiItalicChar contained /'.g:vimwiki_char_italic.'/'
|
||||
execute 'syn match VimwikiBoldItalicChar contained /'.g:vimwiki_char_bolditalic.'/'
|
||||
execute 'syn match VimwikiItalicBoldChar contained /'.g:vimwiki_char_italicbold.'/'
|
||||
execute 'syn match VimwikiCodeChar contained /'.g:vimwiki_char_code.'/'
|
||||
execute 'syn match VimwikiDelTextChar contained /'.g:vimwiki_char_deltext.'/'
|
||||
execute 'syn match VimwikiSuperScript contained /'.g:vimwiki_char_superscript.'/'
|
||||
execute 'syn match VimwikiSubScript contained /'.g:vimwiki_char_subscript.'/'
|
||||
if exists("+conceallevel")
|
||||
syntax conceal off
|
||||
endif
|
||||
|
||||
" Non concealed chars
|
||||
syn match VimwikiHeaderChar contained /\%(^\s*=\+\)\|\%(=\+\s*$\)/
|
||||
execute 'syn match VimwikiBoldCharT contained /'.g:vimwiki_char_bold.'/'
|
||||
execute 'syn match VimwikiItalicCharT contained /'.g:vimwiki_char_italic.'/'
|
||||
execute 'syn match VimwikiBoldItalicCharT contained /'.g:vimwiki_char_bolditalic.'/'
|
||||
execute 'syn match VimwikiItalicBoldCharT contained /'.g:vimwiki_char_italicbold.'/'
|
||||
execute 'syn match VimwikiCodeCharT contained /'.g:vimwiki_char_code.'/'
|
||||
execute 'syn match VimwikiDelTextCharT contained /'.g:vimwiki_char_deltext.'/'
|
||||
execute 'syn match VimwikiSuperScriptT contained /'.g:vimwiki_char_superscript.'/'
|
||||
execute 'syn match VimwikiSubScriptT contained /'.g:vimwiki_char_subscript.'/'
|
||||
|
||||
|
||||
" Emoticons
|
||||
syntax match VimwikiEmoticons /\%((.)\|:[()|$@]\|:-[DOPS()\]|$@]\|;)\|:'(\)/
|
||||
|
||||
let g:vimwiki_rxTodo = '\C\%(TODO:\|DONE:\|STARTED:\|FIXME:\|FIXED:\|XXX:\)'
|
||||
execute 'syntax match VimwikiTodo /'. g:vimwiki_rxTodo .'/'
|
||||
|
||||
|
||||
" Tables
|
||||
syntax match VimwikiTableRow /^\s*|.\+|\s*$/
|
||||
\ transparent contains=VimwikiCellSeparator,VimwikiLinkT,
|
||||
\ VimwikiNoExistsLinkT,VimwikiEmoticons,VimwikiTodo,
|
||||
\ VimwikiBoldT,VimwikiItalicT,VimwikiBoldItalicT,VimwikiItalicBoldT,
|
||||
\ VimwikiDelTextT,VimwikiSuperScriptT,VimwikiSubScriptT,VimwikiCodeT,
|
||||
\ @Spell
|
||||
syntax match VimwikiCellSeparator
|
||||
\ /\%(|\)\|\%(-\@<=+\-\@=\)\|\%([|+]\@<=-\+\)/ contained
|
||||
|
||||
" List items
|
||||
execute 'syntax match VimwikiList /'.g:vimwiki_rxListBullet.'/'
|
||||
execute 'syntax match VimwikiList /'.g:vimwiki_rxListNumber.'/'
|
||||
execute 'syntax match VimwikiList /'.g:vimwiki_rxListDefine.'/'
|
||||
|
||||
execute 'syntax match VimwikiBold /'.g:vimwiki_rxBold.'/ contains=VimwikiBoldChar,@Spell'
|
||||
execute 'syntax match VimwikiBoldT /'.g:vimwiki_rxBold.'/ contained contains=VimwikiBoldCharT,@Spell'
|
||||
|
||||
execute 'syntax match VimwikiItalic /'.g:vimwiki_rxItalic.'/ contains=VimwikiItalicChar,@Spell'
|
||||
execute 'syntax match VimwikiItalicT /'.g:vimwiki_rxItalic.'/ contained contains=VimwikiItalicCharT,@Spell'
|
||||
|
||||
execute 'syntax match VimwikiBoldItalic /'.g:vimwiki_rxBoldItalic.'/ contains=VimwikiBoldItalicChar,VimwikiItalicBoldChar,@Spell'
|
||||
execute 'syntax match VimwikiBoldItalicT /'.g:vimwiki_rxBoldItalic.'/ contained contains=VimwikiBoldItalicChatT,VimwikiItalicBoldCharT,@Spell'
|
||||
|
||||
execute 'syntax match VimwikiItalicBold /'.g:vimwiki_rxItalicBold.'/ contains=VimwikiBoldItalicChar,VimwikiItalicBoldChar,@Spell'
|
||||
execute 'syntax match VimwikiItalicBoldT /'.g:vimwiki_rxItalicBold.'/ contained contains=VimwikiBoldItalicCharT,VimsikiItalicBoldCharT,@Spell'
|
||||
|
||||
execute 'syntax match VimwikiDelText /'.g:vimwiki_rxDelText.'/ contains=VimwikiDelTextChar,@Spell'
|
||||
execute 'syntax match VimwikiDelTextT /'.g:vimwiki_rxDelText.'/ contained contains=VimwikiDelTextChar,@Spell'
|
||||
|
||||
execute 'syntax match VimwikiSuperScript /'.g:vimwiki_rxSuperScript.'/ contains=VimwikiSuperScriptChar,@Spell'
|
||||
execute 'syntax match VimwikiSuperScriptT /'.g:vimwiki_rxSuperScript.'/ contained contains=VimwikiSuperScriptCharT,@Spell'
|
||||
|
||||
execute 'syntax match VimwikiSubScript /'.g:vimwiki_rxSubScript.'/ contains=VimwikiSubScriptChar,@Spell'
|
||||
execute 'syntax match VimwikiSubScriptT /'.g:vimwiki_rxSubScript.'/ contained contains=VimwikiSubScriptCharT,@Spell'
|
||||
|
||||
execute 'syntax match VimwikiCode /'.g:vimwiki_rxCode.'/ contains=VimwikiCodeChar'
|
||||
execute 'syntax match VimwikiCodeT /'.g:vimwiki_rxCode.'/ contained contains=VimwikiCodeCharT'
|
||||
|
||||
|
||||
" <hr> horizontal rule
|
||||
execute 'syntax match VimwikiHR /'.g:vimwiki_rxHR.'/'
|
||||
|
||||
execute 'syntax region VimwikiPre start=/^\s*'.g:vimwiki_rxPreStart.
|
||||
\ '/ end=/^\s*'.g:vimwiki_rxPreEnd.'\s*$/ contains=@Spell'
|
||||
|
||||
" List item checkbox
|
||||
syntax match VimwikiCheckBox /\[.\?\]/
|
||||
if g:vimwiki_hl_cb_checked
|
||||
execute 'syntax match VimwikiCheckBoxDone /'.
|
||||
\ g:vimwiki_rxListBullet.'\s*\['.g:vimwiki_listsyms[4].'\].*$/'.
|
||||
\ ' contains=VimwikiNoExistsLink,VimwikiLink'
|
||||
execute 'syntax match VimwikiCheckBoxDone /'.
|
||||
\ g:vimwiki_rxListNumber.'\s*\['.g:vimwiki_listsyms[4].'\].*$/'.
|
||||
\ ' contains=VimwikiNoExistsLink,VimwikiLink'
|
||||
endif
|
||||
|
||||
" placeholders
|
||||
syntax match VimwikiPlaceholder /^\s*%toc\%(\s.*\)\?$/ contains=VimwikiPlaceholderParam
|
||||
syntax match VimwikiPlaceholder /^\s*%nohtml\s*$/
|
||||
syntax match VimwikiPlaceholder /^\s*%title\%(\s.*\)\?$/ contains=VimwikiPlaceholderParam
|
||||
syntax match VimwikiPlaceholder /^\s*%template\%(\s.*\)\?$/ contains=VimwikiPlaceholderParam
|
||||
syntax match VimwikiPlaceholderParam /\s.*/ contained
|
||||
|
||||
" html tags
|
||||
let html_tags = join(split(g:vimwiki_valid_html_tags, '\s*,\s*'), '\|')
|
||||
exe 'syntax match VimwikiHTMLtag #\c</\?\%('.html_tags.'\)\%(\s\{-1}\S\{-}\)\{-}\s*/\?>#'
|
||||
execute 'syntax match VimwikiBold #\c<b>.\{-}</b># contains=VimwikiHTMLTag'
|
||||
execute 'syntax match VimwikiItalic #\c<i>.\{-}</i># contains=VimwikiHTMLTag'
|
||||
execute 'syntax match VimwikiUnderline #\c<u>.\{-}</u># contains=VimwikiHTMLTag'
|
||||
|
||||
execute 'syntax match VimwikiComment /'.g:vimwiki_rxComment.'/ contains=@Spell'
|
||||
|
||||
" Header levels, 1-6
|
||||
execute 'syntax match VimwikiHeader1 /'.g:vimwiki_rxH1.'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiLink,@Spell'
|
||||
execute 'syntax match VimwikiHeader2 /'.g:vimwiki_rxH2.'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiLink,@Spell'
|
||||
execute 'syntax match VimwikiHeader3 /'.g:vimwiki_rxH3.'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiLink,@Spell'
|
||||
execute 'syntax match VimwikiHeader4 /'.g:vimwiki_rxH4.'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiLink,@Spell'
|
||||
execute 'syntax match VimwikiHeader5 /'.g:vimwiki_rxH5.'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiLink,@Spell'
|
||||
execute 'syntax match VimwikiHeader6 /'.g:vimwiki_rxH6.'/ contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiLink,@Spell'
|
||||
|
||||
" group names "{{{
|
||||
|
||||
if g:vimwiki_hl_headers == 0
|
||||
hi link VimwikiHeader1 Title
|
||||
hi link VimwikiHeader2 Title
|
||||
hi link VimwikiHeader3 Title
|
||||
hi link VimwikiHeader4 Title
|
||||
hi link VimwikiHeader5 Title
|
||||
hi link VimwikiHeader6 Title
|
||||
else
|
||||
if &background == 'light'
|
||||
hi def VimwikiHeader1 guibg=bg guifg=#aa5858 gui=bold ctermfg=DarkRed term=bold cterm=bold
|
||||
hi def VimwikiHeader2 guibg=bg guifg=#507030 gui=bold ctermfg=DarkGreen term=bold cterm=bold
|
||||
hi def VimwikiHeader3 guibg=bg guifg=#1030a0 gui=bold ctermfg=DarkBlue term=bold cterm=bold
|
||||
hi def VimwikiHeader4 guibg=bg guifg=#103040 gui=bold ctermfg=Black term=bold cterm=bold
|
||||
hi def VimwikiHeader5 guibg=bg guifg=#505050 gui=bold ctermfg=Black term=bold cterm=bold
|
||||
hi def VimwikiHeader6 guibg=bg guifg=#636363 gui=bold ctermfg=Black term=bold cterm=bold
|
||||
else
|
||||
hi def VimwikiHeader1 guibg=bg guifg=#e08090 gui=bold ctermfg=Red term=bold cterm=bold
|
||||
hi def VimwikiHeader2 guibg=bg guifg=#80e090 gui=bold ctermfg=Green term=bold cterm=bold
|
||||
hi def VimwikiHeader3 guibg=bg guifg=#6090e0 gui=bold ctermfg=Blue term=bold cterm=bold
|
||||
hi def VimwikiHeader4 guibg=bg guifg=#c0c0f0 gui=bold ctermfg=White term=bold cterm=bold
|
||||
hi def VimwikiHeader5 guibg=bg guifg=#e0e0f0 gui=bold ctermfg=White term=bold cterm=bold
|
||||
hi def VimwikiHeader6 guibg=bg guifg=#f0f0f0 gui=bold ctermfg=White term=bold cterm=bold
|
||||
endif
|
||||
endif
|
||||
|
||||
hi def link VimwikiMarkers Normal
|
||||
|
||||
hi def VimwikiBold term=bold cterm=bold gui=bold
|
||||
hi def link VimwikiBoldT VimwikiBold
|
||||
|
||||
hi def VimwikiItalic term=italic cterm=italic gui=italic
|
||||
hi def link VimwikiItalicT VimwikiItalic
|
||||
|
||||
hi def VimwikiBoldItalic term=bold cterm=bold gui=bold,italic
|
||||
hi def link VimwikiItalicBold VimwikiBoldItalic
|
||||
hi def link VimwikiBoldItalicT VimwikiBoldItalic
|
||||
hi def link VimwikiItalicBoldT VimwikiBoldItalic
|
||||
|
||||
hi def VimwikiUnderline gui=underline
|
||||
|
||||
hi def link VimwikiCode PreProc
|
||||
hi def link VimwikiCodeT VimwikiCode
|
||||
|
||||
hi def link VimwikiPre PreProc
|
||||
hi def link VimwikiPreT VimwikiPre
|
||||
|
||||
hi def link VimwikiNoExistsLink SpellBad
|
||||
hi def link VimwikiNoExistsLinkT VimwikiNoExistsLink
|
||||
|
||||
hi def link VimwikiLink Underlined
|
||||
hi def link VimwikiLinkT VimwikiLink
|
||||
|
||||
hi def link VimwikiList Identifier
|
||||
hi def link VimwikiCheckBox VimwikiList
|
||||
hi def link VimwikiCheckBoxDone Comment
|
||||
hi def link VimwikiEmoticons Character
|
||||
|
||||
hi def link VimwikiDelText Constant
|
||||
hi def link VimwikiDelTextT VimwikiDelText
|
||||
|
||||
hi def link VimwikiSuperScript Number
|
||||
hi def link VimwikiSuperScriptT VimwikiSuperScript
|
||||
|
||||
hi def link VimwikiSubScript Number
|
||||
hi def link VimwikiSubScriptT VimwikiSubScript
|
||||
|
||||
hi def link VimwikiTodo Todo
|
||||
hi def link VimwikiComment Comment
|
||||
|
||||
hi def link VimwikiPlaceholder SpecialKey
|
||||
hi def link VimwikiPlaceholderParam String
|
||||
hi def link VimwikiHTMLtag SpecialKey
|
||||
|
||||
hi def link VimwikiCellSeparator VimwikiMarkers
|
||||
hi def link VimwikiBoldChar VimwikiMarkers
|
||||
hi def link VimwikiItalicChar VimwikiMarkers
|
||||
hi def link VimwikiBoldItalicChar VimwikiMarkers
|
||||
hi def link VimwikiItalicBoldChar VimwikiMarkers
|
||||
hi def link VimwikiDelTextChar VimwikiMarkers
|
||||
hi def link VimwikiSuperScriptChar VimwikiMarkers
|
||||
hi def link VimwikiSubScriptChar VimwikiMarkers
|
||||
hi def link VimwikiCodeChar VimwikiMarkers
|
||||
hi def link VimwikiHeaderChar VimwikiMarkers
|
||||
hi def link VimwikiLinkChar VimwikiLink
|
||||
hi def link VimwikiNoLinkChar VimwikiNoExistsLink
|
||||
|
||||
hi def link VimwikiBoldCharT VimwikiMarkers
|
||||
hi def link VimwikiItalicCharT VimwikiMarkers
|
||||
hi def link VimwikiBoldItalicCharT VimwikiMarkers
|
||||
hi def link VimwikiItalicBoldCharT VimwikiMarkers
|
||||
hi def link VimwikiDelTextCharT VimwikiMarkers
|
||||
hi def link VimwikiSuperScriptCharT VimwikiMarkers
|
||||
hi def link VimwikiSubScriptCharT VimwikiMarkers
|
||||
hi def link VimwikiCodeCharT VimwikiMarkers
|
||||
hi def link VimwikiHeaderCharT VimwikiMarkers
|
||||
hi def link VimwikiLinkCharT VimwikiLinkT
|
||||
hi def link VimwikiNoLinkCharT VimwikiNoExistsLinkT
|
||||
"}}}
|
||||
|
||||
let b:current_syntax="vimwiki"
|
||||
|
||||
" EMBEDDED syntax setup "{{{
|
||||
let nested = VimwikiGet('nested_syntaxes')
|
||||
if !empty(nested)
|
||||
for [hl_syntax, vim_syntax] in items(nested)
|
||||
call vimwiki#base#nested_syntax(vim_syntax,
|
||||
\ '^\s*{{{\%(.*[[:blank:][:punct:]]\)\?'.
|
||||
\ hl_syntax.'\%([[:blank:][:punct:]].*\)\?',
|
||||
\ '^\s*}}}', 'VimwikiPre')
|
||||
endfor
|
||||
endif
|
||||
"}}}
|
||||
@@ -1,85 +0,0 @@
|
||||
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=79
|
||||
" Vimwiki syntax file
|
||||
" Default syntax
|
||||
" Author: Maxim Kim <habamax@gmail.com>
|
||||
" Home: http://code.google.com/p/vimwiki/
|
||||
|
||||
" text: *strong*
|
||||
" let g:vimwiki_rxBold = '\*[^*]\+\*'
|
||||
let g:vimwiki_rxBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'\*'.
|
||||
\'\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)'.
|
||||
\'\*'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let g:vimwiki_char_bold = '*'
|
||||
|
||||
" text: _emphasis_
|
||||
" let g:vimwiki_rxItalic = '_[^_]\+_'
|
||||
let g:vimwiki_rxItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'_'.
|
||||
\'\%([^_`[:space:]][^_`]*[^_`[:space:]]\|[^_`[:space:]]\)'.
|
||||
\'_'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let g:vimwiki_char_italic = '_'
|
||||
|
||||
" text: *_bold italic_* or _*italic bold*_
|
||||
let g:vimwiki_rxBoldItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'\*_'.
|
||||
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
||||
\'_\*'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let g:vimwiki_char_bolditalic = '\*_'
|
||||
|
||||
let g:vimwiki_rxItalicBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'_\*'.
|
||||
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
||||
\'\*_'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let g:vimwiki_char_italicbold = '_\*'
|
||||
|
||||
" text: `code`
|
||||
let g:vimwiki_rxCode = '`[^`]\+`'
|
||||
let g:vimwiki_char_code = '`'
|
||||
|
||||
" text: ~~deleted text~~
|
||||
let g:vimwiki_rxDelText = '\~\~[^~`]\+\~\~'
|
||||
let g:vimwiki_char_deltext = '\~\~'
|
||||
|
||||
" text: ^superscript^
|
||||
let g:vimwiki_rxSuperScript = '\^[^^`]\+\^'
|
||||
let g:vimwiki_char_superscript = '^'
|
||||
|
||||
" text: ,,subscript,,
|
||||
let g:vimwiki_rxSubScript = ',,[^,`]\+,,'
|
||||
let g:vimwiki_char_subscript = ',,'
|
||||
|
||||
" Header levels, 1-6
|
||||
let g:vimwiki_rxH1 = '^\s*=\{1}[^=]\+.*[^=]\+=\{1}\s*$'
|
||||
let g:vimwiki_rxH2 = '^\s*=\{2}[^=]\+.*[^=]\+=\{2}\s*$'
|
||||
let g:vimwiki_rxH3 = '^\s*=\{3}[^=]\+.*[^=]\+=\{3}\s*$'
|
||||
let g:vimwiki_rxH4 = '^\s*=\{4}[^=]\+.*[^=]\+=\{4}\s*$'
|
||||
let g:vimwiki_rxH5 = '^\s*=\{5}[^=]\+.*[^=]\+=\{5}\s*$'
|
||||
let g:vimwiki_rxH6 = '^\s*=\{6}[^=]\+.*[^=]\+=\{6}\s*$'
|
||||
let g:vimwiki_rxHeader = '\%('.g:vimwiki_rxH1.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH2.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH3.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH4.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH5.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH6.'\)'
|
||||
|
||||
let g:vimwiki_char_header = '\%(^\s*=\+\)\|\%(=\+\s*$\)'
|
||||
|
||||
" <hr>, horizontal rule
|
||||
let g:vimwiki_rxHR = '^----.*$'
|
||||
|
||||
" List items start with optional whitespace(s) then '* ' or '# '
|
||||
let g:vimwiki_rxListBullet = '^\s*\%(\*\|-\)\s'
|
||||
let g:vimwiki_rxListNumber = '^\s*#\s'
|
||||
|
||||
let g:vimwiki_rxListDefine = '::\(\s\|$\)'
|
||||
|
||||
" Preformatted text
|
||||
let g:vimwiki_rxPreStart = '{{{'
|
||||
let g:vimwiki_rxPreEnd = '}}}'
|
||||
|
||||
let g:vimwiki_rxComment = '^\s*%%.*$'
|
||||
@@ -1,69 +0,0 @@
|
||||
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=79
|
||||
" Vimwiki syntax file
|
||||
" MediaWiki syntax
|
||||
" Author: Maxim Kim <habamax@gmail.com>
|
||||
" Home: http://code.google.com/p/vimwiki/
|
||||
|
||||
" text: '''strong'''
|
||||
let g:vimwiki_rxBold = "'''[^']\\+'''"
|
||||
let g:vimwiki_char_bold = "'''"
|
||||
|
||||
" text: ''emphasis''
|
||||
let g:vimwiki_rxItalic = "''[^']\\+''"
|
||||
let g:vimwiki_char_italic = "''"
|
||||
|
||||
" text: '''''strong italic'''''
|
||||
let g:vimwiki_rxBoldItalic = "'''''[^']\\+'''''"
|
||||
let g:vimwiki_rxItalicBold = g:vimwiki_rxBoldItalic
|
||||
let g:vimwiki_char_bolditalic = "'''''"
|
||||
let g:vimwiki_char_italicbold = g:vimwiki_char_bolditalic
|
||||
|
||||
" text: `code`
|
||||
let g:vimwiki_rxCode = '`[^`]\+`'
|
||||
let g:vimwiki_char_code = '`'
|
||||
|
||||
" text: ~~deleted text~~
|
||||
let g:vimwiki_rxDelText = '\~\~[^~]\+\~\~'
|
||||
let g:vimwiki_char_deltext = '\~\~'
|
||||
|
||||
" text: ^superscript^
|
||||
let g:vimwiki_rxSuperScript = '\^[^^]\+\^'
|
||||
let g:vimwiki_char_superscript = '^'
|
||||
|
||||
" text: ,,subscript,,
|
||||
let g:vimwiki_rxSubScript = ',,[^,]\+,,'
|
||||
let g:vimwiki_char_subscript = ',,'
|
||||
|
||||
" Header levels, 1-6
|
||||
let g:vimwiki_rxH1 = '^\s*=\{1}[^=]\+.*[^=]\+=\{1}\s*$'
|
||||
let g:vimwiki_rxH2 = '^\s*=\{2}[^=]\+.*[^=]\+=\{2}\s*$'
|
||||
let g:vimwiki_rxH3 = '^\s*=\{3}[^=]\+.*[^=]\+=\{3}\s*$'
|
||||
let g:vimwiki_rxH4 = '^\s*=\{4}[^=]\+.*[^=]\+=\{4}\s*$'
|
||||
let g:vimwiki_rxH5 = '^\s*=\{5}[^=]\+.*[^=]\+=\{5}\s*$'
|
||||
let g:vimwiki_rxH6 = '^\s*=\{6}[^=]\+.*[^=]\+=\{6}\s*$'
|
||||
let g:vimwiki_rxHeader = '\%('.g:vimwiki_rxH1.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH2.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH3.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH4.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH5.'\)\|'.
|
||||
\ '\%('.g:vimwiki_rxH6.'\)'
|
||||
let g:vimwiki_char_header = '\%(^\s*=\+\)\|\%(=\+\s*$\)'
|
||||
|
||||
" <hr>, horizontal rule
|
||||
let g:vimwiki_rxHR = '^----.*$'
|
||||
|
||||
" Tables. Each line starts and ends with '||'; each cell is separated by '||'
|
||||
let g:vimwiki_rxTable = '||'
|
||||
|
||||
" Bulleted list items start with whitespace(s), then '*'
|
||||
" highlight only bullets and digits.
|
||||
let g:vimwiki_rxListBullet = '^\s*\*\+\([^*]*$\)\@='
|
||||
let g:vimwiki_rxListNumber = '^\s*#\+'
|
||||
|
||||
let g:vimwiki_rxListDefine = '^\%(;\|:\)\s'
|
||||
|
||||
" Preformatted text
|
||||
let g:vimwiki_rxPreStart = '<pre>'
|
||||
let g:vimwiki_rxPreEnd = '<\/pre>'
|
||||
|
||||
let g:vimwiki_rxComment = '^\s*%%.*$'
|
||||
Reference in New Issue
Block a user