Skip to content

Instantly share code, notes, and snippets.

@aji
Created June 12, 2012 01:00
Show Gist options
  • Select an option

  • Save aji/2913744 to your computer and use it in GitHub Desktop.

Select an option

Save aji/2913744 to your computer and use it in GitHub Desktop.
Vim syntax file for editing groff manpage sources
" Vim syntax file
" Language: Groff manpage macros
" Maintainer: Alex Iadicicco
" Latest Revision: 11 June 2012
if exists("b:current_syntax")
finish
endif
syn match gmComment /^\.\\" .*$/
syn match gmEscape /\\(..\|\\./
syn match gmStyle /^\.\(SM\|SB\|BI\|IB\|RI\|IR\|BR\|RB\|B\|I\)/ contains=TOP
syn match gmSection /^\.S[HS] .*$/ contains=TOP
syn match gmTitle /^\.TH .*$/ contains=TOP
syn match gmParagraph /^\.\(LP\|PP\|P\|IP\|HP\).*$/ contains=TOP
syn region gmParagraph2 start=/^\.TP/ end=/[^\\]$/ contains=TOP
let b:current_syntax = "groffman"
hi def link gmComment Comment
hi def link gmEscape Special
hi def link gmStyle Identifier
hi def link gmSection Keyword
hi def link gmTitle Title
hi def link gmParagraph Statement
hi def link gmParagraph2 Statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment