blob: 79a4dfe8217e29082e1bdb4ecd4d6a407f1f3579 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar0e6adf82021-12-16 14:41:10 +00002" Language: Texinfo (documentation format)
3" Maintainer: Robert Dodier <robert.dodier@gmail.com>
4" Latest Revision: 2021-12-15
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02006if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00007 finish
8endif
9
Bram Moolenaar0e6adf82021-12-16 14:41:10 +000010let s:cpo_save = &cpo
11set cpo&vim
12
13syn match texinfoControlSequence display '\(@end [a-zA-Z@]\+\|@[a-zA-Z@]\+\)'
14
15syn match texinfoComment display '^\s*\(@comment\|@c\)\>.*$'
16
17syn region texinfoCode matchgroup=texinfoControlSequence start="@code{" end="}" contains=ALL
18syn region texinfoVerb matchgroup=texinfoControlSequence start="@verb{" end="}" contains=ALL
19
20syn region texinfoArgument matchgroup=texinfoBrace start="{" end="}" contains=ALLBUT
21
22syn region texinfoExample matchgroup=texinfoControlSequence start="^@example\s*$" end="^@end example\s*$" contains=ALL
23
24syn region texinfoVerbatim matchgroup=texinfoControlSequence start="^@verbatim\s*$" end="^@end verbatim\s*$"
25
26syn region texinfoMenu matchgroup=texinfoControlSequence start="^@menu\s*$" end="^@end menu\s*$"
27
28if exists("g:texinfo_delimiters")
29 syn match texinfoDelimiter display '[][{}]'
Bram Moolenaar071d4272004-06-13 20:20:40 +000030endif
31
Bram Moolenaar0e6adf82021-12-16 14:41:10 +000032hi def link texinfoDelimiter Delimiter
33hi def link texinfoComment Comment
34hi def link texinfoControlSequence Identifier
35hi def link texinfoBrace Operator
36hi def link texinfoArgument Special
37hi def link texinfoExample String
38hi def link texinfoVerbatim String
39hi def link texinfoVerb String
40hi def link texinfoCode String
41hi def link texinfoMenu String
Bram Moolenaar071d4272004-06-13 20:20:40 +000042
43let b:current_syntax = "texinfo"
44
Bram Moolenaar0e6adf82021-12-16 14:41:10 +000045let &cpo = s:cpo_save
46unlet s:cpo_save