home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / mac / vim55rt.sit / runtime / syntax / nroff.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  1.3 KB  |  40 lines  |  [TEXT/VIM!]

  1. " VIM syntax file
  2. " Language: Nroff/Troff
  3. " Maintainer: Matthias Burian <burian@grabner-instruments.com>
  4. " Last change: Aug. 09, 1999
  5.  
  6. syn clear
  7.  
  8. syn match nroffCommand "^\.[a-zA-Z]" nextgroup=nroffCmdArg
  9. syn match nroffCommand "^\.[a-zA-Z][a-zA-Z0-9\\]\+" nextgroup=nroffCmdArg
  10.  
  11. syn match nroffCmdArg contained ".*" contains=nroffString,nroffComArg
  12. syn region nroffString contained start=/"/ end=/"/ contains=nroffFont
  13. syn region nroffString contained start=/'/ end=/'/ contains=nroffFont
  14. syn match nroffComArg +\\["#].*+
  15. syn match nroffComment +^\.\\".*+
  16.  
  17. syn region nroffFont start="\\f[A-Z]"hs=s+3 end="\\f[A-Z]"he=e-3 end="$"
  18. syn region nroffFont start="\\\*<"hs=s+3 end="\\\*>"he=e-3
  19. syn region nroffDefine start="\.ds\ [A-Za-z_]\+" end="$" contains=ALL
  20. syn region nroffSize start="\\s[0-9]*" end="\\s[0-9]*"
  21. syn region nroffSpecial start="^\.[TP]S$" end="^\.[TP]E$"
  22. syn region nroffSpecial start="^\.EQ$" end="^\.EN$"
  23.  
  24. if !exists("did_nroff_syntax_inits")
  25.   let did_nroff_syntax_inits = 1
  26.   " The default methods for highlighting.  Can be overridden later
  27.   hi link nroffCommand            Statement
  28.   hi link nroffComment            Comment
  29.   hi link nroffComArg            Comment
  30.   hi link nroffFont            PreProc
  31.   hi link nroffSize            PreProc
  32.   hi link nroffDefine            String
  33.   hi link nroffString            String
  34.   hi link nroffSpecial            Question
  35. endif
  36.  
  37. let b:current_syntax = "nroff"
  38.  
  39. " vim: ts=8
  40.