Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
autodoc.vim102 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	Autodoc3" Maintainer:	Stephen R. van den Berg <srb@cuci.nl>4" Last Change:	2018 Jan 235" Version:	2.96" Remark:       Included by pike.vim, cmod.vim and optionally c.vim7" Remark:       In order to make c.vim use it, set: c_autodoc8 9" Quit when a (custom) syntax file was already loaded10if exists("b:current_syntax")11  finish12endif13 14let s:cpo_save = &cpo15set cpo&vim16 17syn case match18 19" A bunch of useful autodoc keywords20syn keyword autodocStatement contained appears belongs global21syn keyword autodocStatement contained decl directive inherit22syn keyword autodocStatement contained deprecated obsolete bugs23syn keyword autodocStatement contained copyright example fixme note param returns24syn keyword autodocStatement contained seealso thanks throws constant25syn keyword autodocStatement contained member index elem26syn keyword autodocStatement contained value type item27 28syn keyword autodocRegion contained enum mapping code multiset array29syn keyword autodocRegion contained int string section mixed ol ul dl30syn keyword autodocRegion contained class module namespace31syn keyword autodocRegion contained endenum endmapping endcode endmultiset32syn keyword autodocRegion contained endarray endint endstring endsection33syn keyword autodocRegion contained endmixed endol endul enddl34syn keyword autodocRegion contained endclass endmodule endnamespace35 36syn keyword autodocIgnore contained ignore endignore37 38syn keyword autodocStatAcc contained b i u tt url pre sub sup39syn keyword autodocStatAcc contained ref rfc xml dl expr image40 41syn keyword	autodocTodo		contained TODO FIXME XXX42 43syn match autodocLineStart	display "\(//\|/\?\*\)\@2<=!"44syn match autodocWords "[^!@{}[\]]\+" display contains=@Spell45 46syn match autodocLink "@\[[^[\]]\+]"hs=s+2,he=e-1 display contains=autodocLead47syn match autodocAtStmt "@[a-z]\+\%(\s\|$\)\@="hs=s+1 display contains=autodocStatement,autodocIgnore,autodocLead,autodocRegion48 49" Due to limitations of the matching algorithm, we cannot highlight50" nested autodocNStmtAcc structures correctly51syn region autodocNStmtAcc start="@[a-z]\+{" end="@}" contains=autodocStatAcc,autodocLead keepend52 53syn match autodocUrl contained display ".\+"54syn region autodocAtUrlAcc start="{"ms=s+1 end="@}"he=e-1,me=e-2 contained display contains=autodocUrl,autodocLead keepend55syn region autodocNUrlAcc start="@url{" end="@}" contains=autodocStatAcc,autodocAtUrlAcc,autodocLead transparent56 57syn match autodocSpecial "@@" display58syn match autodocLead "@" display contained59 60"when wanted, highlight trailing white space61if exists("c_space_errors")62  if !exists("c_no_trail_space_error")63    syn match	autodocSpaceError	display excludenl "\s\+$"64  endif65  if !exists("c_no_tab_space_error")66    syn match	autodocSpaceError	display " \+\t"me=e-167  endif68endif69 70if exists("c_minlines")71  let b:c_minlines = c_minlines72else73  if !exists("c_no_if0")74    let b:c_minlines = 50	" #if 0 constructs can be long75  else76    let b:c_minlines = 15	" mostly for () constructs77  endif78endif79exec "syn sync ccomment autodocComment minlines=" . b:c_minlines80 81" Define the default highlighting.82" Only used when an item doesn't have highlighting yet83hi def link autodocStatement	Statement84hi def link autodocStatAcc	Statement85hi def link autodocRegion	Structure86hi def link autodocAtStmt	Error87hi def link autodocNStmtAcc	Identifier88hi def link autodocLink		Type89hi def link autodocTodo		Todo90hi def link autodocSpaceError	Error91hi def link autodocLineStart	SpecialComment92hi def link autodocSpecial	SpecialChar93hi def link autodocUrl		Underlined94hi def link autodocLead		Statement95hi def link autodocIgnore	Delimiter96 97let b:current_syntax = "autodoc"98 99let &cpo = s:cpo_save100unlet s:cpo_save101" vim: ts=8102 
codekingpro/portable-devtools · Team Ai