Add some vim syntax files
5d7204fd8daf6160fb56c01f4a698161d649dd10
1 parent
4059b81f
.vim/after/syntax/c.vim
added
+5 -0
| 1 | + | " |
|
| 2 | + | " Additional highlighting for often used C types |
|
| 3 | + | " |
|
| 4 | + | syn match cType `\<[a-z0-9_]\+_t\>` |
|
| 5 | + | syn keyword cType i8 u8 i16 u16 i32 u32 i64 u64 f32 f64 |
.vim/after/syntax/rst.vim
added
+62 -0
| 1 | + | "============================================= |
|
| 2 | + | " Name: rst.vim |
|
| 3 | + | " File: after/syntax/rst.vim |
|
| 4 | + | " Author: Rykka G.F |
|
| 5 | + | " Summary: syntax file with options. |
|
| 6 | + | " Update: 2014-08-14 |
|
| 7 | + | "============================================= |
|
| 8 | + | let s:cpo_save = &cpo |
|
| 9 | + | set cpo-=C |
|
| 10 | + | ||
| 11 | + | syn sync match rstHighlight groupthere NONE #^\_s\@!# |
|
| 12 | + | ||
| 13 | + | " Link "{{{1 |
|
| 14 | + | fun! s:def_inline_char(name, start, end, char_left, char_right) "{{{ |
|
| 15 | + | exe 'syn match rst'.a:name |
|
| 16 | + | \ '+'.a:char_left.'\zs'.a:start.'\ze[^[:space:]' |
|
| 17 | + | \.a:char_right.a:start[strlen(a:start)-1].'][^' |
|
| 18 | + | \.a:start[strlen(a:start)-1] |
|
| 19 | + | \.'\\]*'.a:end.'\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' |
|
| 20 | + | endfun "}}} |
|
| 21 | + | ||
| 22 | + | syn match rstDefinitionList `\v^(\s*)\h[^:]*\ze%(\s:\s.*)*\n\1\s+\S` |
|
| 23 | + | syn match rstBulletList `\v^\s*[-*+]\ze\s+` |
|
| 24 | + | syn match rstEnumeratedList `\v\c^\s*%(\d+|[#a-z]|[imlcxvd]+)[.)]\ze\s+` |
|
| 25 | + | syn match rstEnumeratedList `\v\c^\s*\(%(\d+|[#a-z]|[imlcxvd]+)\)\ze\s+` |
|
| 26 | + | syn match rstOptionList `\v^\s*%(-\w%( \w+)=|--[[:alnum:]_-]+%(\=\w+)=|/\u)%(, %(-\w%( \w+)=|--[[:alnum:]_.-]+%(\=\w+)=|/\u))*%( |\t)\ze\s*\S` |
|
| 27 | + | syn match rstFieldList `\v^\s*:[^:[:space:]][^:]+:\_s` |
|
| 28 | + | syn match rstRoles `\v\s:\zs\w+\ze:\`` |
|
| 29 | + | syn match rstBibliographicField `\v^\s*:(Author|Authors|Organization|Contact|Address|Version|Status|Date|Copyright|Dedication|Abstract):\_s` |
|
| 30 | + | ||
| 31 | + | syn match rstBlockQuoteAttr `\v%(\_^\s*\n)@<=\s+---=\s.*` |
|
| 32 | + | ||
| 33 | + | syn match rstCommentTitle '\v(^\s+|(^\.\.\s+)@<=):=\u\w*(\s+\u\w*)*:' contained |
|
| 34 | + | syn cluster rstCommentGroup contains=rstCommentTitle,rstTodo |
|
| 35 | + | ||
| 36 | + | hi def link rstTodoItem Include |
|
| 37 | + | hi def link rstTodoPrior Include |
|
| 38 | + | hi def link rstTodoTmBgn Number |
|
| 39 | + | hi def link rstTodoTmEnd Number |
|
| 40 | + | hi def link rstDoneRegion Comment |
|
| 41 | + | ||
| 42 | + | hi link rstStandaloneHyperlink Underlined |
|
| 43 | + | hi link rstFootnoteReference Underlined |
|
| 44 | + | hi link rstCitationReference Underlined |
|
| 45 | + | hi link rstHyperLinkReference Underlined |
|
| 46 | + | hi link rstInlineInternalTargets Keyword |
|
| 47 | + | hi link rstPhaseHyperLinkReference Underlined |
|
| 48 | + | ||
| 49 | + | hi def link rstBulletList Function |
|
| 50 | + | hi def link rstEnumeratedList Function |
|
| 51 | + | hi def link rstDefinitionList Statement |
|
| 52 | + | hi def link rstFieldList Function |
|
| 53 | + | hi def link rstBibliographicField Constant |
|
| 54 | + | hi def link rstOptionList Statement |
|
| 55 | + | hi def link rstRoles Operator |
|
| 56 | + | ||
| 57 | + | hi def link rstBlockQuoteAttr Exception |
|
| 58 | + | hi def link rstCommentTitle SpecialComment |
|
| 59 | + | ||
| 60 | + | ||
| 61 | + | let &cpo = s:cpo_save |
|
| 62 | + | unlet s:cpo_save |