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