File: nroff.vim

package info (click to toggle)
vim-rt 5.3-12
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,172 kB
  • ctags: 815
  • sloc: makefile: 857; awk: 778; ansic: 379; perl: 192; sh: 167
file content (37 lines) | stat: -rw-r--r-- 1,365 bytes parent folder | download
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