specky/syntax/rdoc.vim
branchvim-stuff
changeset 29 cc3094023778
parent 28 2b198f0a86fe
equal deleted inserted replaced
28:2b198f0a86fe 29:cc3094023778
     1 "
       
     2 " specky: syntax highlighting for 'rdoc' output
       
     3 " $Id$
       
     4 
       
     5 
       
     6 " Separator lines
       
     7 "
       
     8 syntax match rdocSpeckyLines /^------\+\s\?/ contains=rdocSpeckyTarget,rdocSpeckyMultiples
       
     9 highlight link rdocSpeckyLines Comment
       
    10 
       
    11 " The class/method that we're reading
       
    12 "
       
    13 syntax match rdocSpeckyTarget / .\+/hs=s+1 contained
       
    14 highlight link rdocSpeckyTarget Underlined
       
    15 
       
    16 " When there are multiple matches to choose from.
       
    17 " This is only output by fri.
       
    18 "
       
    19 syntax match rdocSpeckyMultiples / Multiple choices/hs=s+1 contained
       
    20 highlight link rdocSpeckyMultiples WarningMsg
       
    21 
       
    22 " Secondary headers
       
    23 "
       
    24 syntax region rdocSpeckyHeader start="^\S\+.\+:$\n-\+" end="-$" keepend contains=rdocSpeckyHeaderLine
       
    25 highlight link rdocSpeckyHeader Question
       
    26 
       
    27 " Secondary header lines
       
    28 "
       
    29 syntax match rdocSpeckyHeaderLine /^-\+$/ contained 
       
    30 highlight link rdocSpeckyHeaderLine NonText
       
    31 
       
    32 " Remove the formatting characters from the display
       
    33 "
       
    34 highlight link rdocSpeckySpecials NonText
       
    35 
       
    36 " _word_ --> italic
       
    37 "
       
    38 syntax region rdocSpeckyItalic matchgroup=rdocSpeckySpecials start=" _" end="_"
       
    39 highlight link rdocSpeckyItalic Special
       
    40 
       
    41 " *word* --> bold
       
    42 "
       
    43 syntax region rdocSpeckBold matchgroup=rdocSpeckySpecials start=" \*" end="\*"
       
    44 highlight link rdocSpeckyBold Constant
       
    45 
       
    46 " +word+ --> typewriter
       
    47 "
       
    48 syntax region rdocSpeckyType matchgroup=rdocSpeckySpecials start=" +" end="+"
       
    49 highlight link rdocSpeckyType Identifier
       
    50 
       
    51 let b:current_syntax = "rdoc"
       
    52