xref: /vim-8.2.3635/runtime/syntax/ist.vim (revision f37506f6)
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
42
43hi def link IstInpSpec	Type
44hi def link IstOutSpec	Identifier
45hi def link IstString	String
46hi def link IstNumber	Number
47hi def link IstComment	Comment
48hi def link IstTodo	Todo
49hi def link IstSpecial	Special
50hi def link IstDoubleQuote	Label
51hi def link IstCharacter	Label
52
53
54let b:current_syntax = "ist"
55
56let &cpo = s:cpo_save
57unlet s:cpo_save
58" vim: ts=8 sw=2
59