Permalink
Browse files

Version 0.6@1: Added rudamentary syntax highlighting for rdoc output.

  • Loading branch information...
1 parent 1de6e92 commit d5ff7958261528e5b903a4d744e9155c49c1b245 @mahlonsmith mahlonsmith committed with vim-scripts Aug 10, 2008
Showing with 52 additions and 0 deletions.
  1. +52 −0 syntax/rdoc.vim
View
@@ -0,0 +1,52 @@
+"
+" specky: syntax highlighting for 'rdoc' output
+" $Id: rdoc.vim 93 2008-08-11 02:25:18Z mahlon $
+
+
+" Separator lines
+"
+syntax match rdocSpeckyLines /^------\+\s\?/ contains=rdocSpeckyTarget,rdocSpeckyMultiples
+highlight link rdocSpeckyLines Comment
+
+" The class/method that we're reading
+"
+syntax match rdocSpeckyTarget / .\+/hs=s+1 contained
+highlight link rdocSpeckyTarget Underlined
+
+" When there are multiple matches to choose from.
+" This is only output by fri.
+"
+syntax match rdocSpeckyMultiples / Multiple choices/hs=s+1 contained
+highlight link rdocSpeckyMultiples WarningMsg
+
+" Secondary headers
+"
+syntax region rdocSpeckyHeader start="^\S\+.\+:$\n-\+" end="-$" keepend contains=rdocSpeckyHeaderLine
+highlight link rdocSpeckyHeader Question
+
+" Secondary header lines
+"
+syntax match rdocSpeckyHeaderLine /^-\+$/ contained
+highlight link rdocSpeckyHeaderLine NonText
+
+" Remove the formatting characters from the display
+"
+highlight link rdocSpeckySpecials NonText
+
+" _word_ --> italic
+"
+syntax region rdocSpeckyItalic matchgroup=rdocSpeckySpecials start=" _" end="_"
+highlight link rdocSpeckyItalic Special
+
+" *word* --> bold
+"
+syntax region rdocSpeckBold matchgroup=rdocSpeckySpecials start=" \*" end="\*"
+highlight link rdocSpeckyBold Constant
+
+" +word+ --> typewriter
+"
+syntax region rdocSpeckyType matchgroup=rdocSpeckySpecials start=" +" end="+"
+highlight link rdocSpeckyType Identifier
+
+let b:current_syntax = "rdoc"
+

0 comments on commit d5ff795

Please sign in to comment.