xref: /vim-8.2.3635/runtime/syntax/ist.vim (revision 89bcfda6)
1" Vim syntax file
2" Language:	Makeindex style file, *.ist
3" Maintainer:	Peter Meszaros <[email protected]>
4" Last Change:	2012 Jan 08 by Thilo Six
5
6" quit when a syntax file was already loaded
7if exists("b:current_syntax")
8  finish
9endif
10
11let s:cpo_save = &cpo
12set cpo&vim
13
14setlocal iskeyword=$,@,48-57,_
15
16syn case ignore
17syn keyword IstInpSpec  actual  arg_close arg_open encap       escape
18syn keyword IstInpSpec  keyword level     quote    range_close range_open
19syn keyword IstInpSpec  page_compositor
20
21syn keyword IstOutSpec	preamble	 postamble	  setpage_prefix   setpage_suffix   group_skip
22syn keyword IstOutSpec	headings_flag	 heading_prefix   heading_suffix
23syn keyword IstOutSpec	lethead_flag	 lethead_prefix   lethead_suffix
24syn keyword IstOutSpec	symhead_positive symhead_negative numhead_positive numhead_negative
25syn keyword IstOutSpec	item_0		 item_1		  item_2	   item_01
26syn keyword IstOutSpec	item_x1		 item_12	  item_x2
27syn keyword IstOutSpec	delim_0		 delim_1	  delim_2
28syn keyword IstOutSpec	delim_n		 delim_r	  delim_t
29syn keyword IstOutSpec	encap_prefix	 encap_infix	  encap_suffix
30syn keyword IstOutSpec	line_max	 indent_space	  indent_length
31syn keyword IstOutSpec	suffix_2p	 suffix_3p	  suffix_mp
32
33syn region  IstString	   matchgroup=IstDoubleQuote start=+"+ skip=+\\"+ end=+"+ contains=IstSpecial
34syn match   IstCharacter   "'.'"
35syn match   IstNumber	   "\d\+"
36syn match   IstComment	   "^[\t ]*%.*$"	 contains=IstTodo
37syn match   IstSpecial	   "\\\\\|{\|}\|#\|\\n"  contained
38syn match   IstTodo	   "DEBUG\|TODO"	 contained
39
40" Define the default highlighting.
41" Only when an item doesn't have highlighting yet
42command -nargs=+ HiLink hi def link <args>
43
44HiLink IstInpSpec	Type
45HiLink IstOutSpec	Identifier
46HiLink IstString	String
47HiLink IstNumber	Number
48HiLink IstComment	Comment
49HiLink IstTodo	Todo
50HiLink IstSpecial	Special
51HiLink IstDoubleQuote	Label
52HiLink IstCharacter	Label
53
54delcommand HiLink
55
56let b:current_syntax = "ist"
57
58let &cpo = s:cpo_save
59unlet s:cpo_save
60" vim: ts=8 sw=2
61