blob: f3f005bf00917cc42c2f5e63780383d036c06611 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: Makeindex style file, *.ist
3" Maintainer: Peter Meszaros <pmeszaros@effice.hu>
Bram Moolenaar6ee8d892012-01-10 14:55:01 +01004" Last Change: 2012 Jan 08 by Thilo Six
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02006" quit when a syntax file was already loaded
7if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00008 finish
9endif
10
Bram Moolenaar6ee8d892012-01-10 14:55:01 +010011let s:cpo_save = &cpo
12set cpo&vim
13
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020014setlocal iskeyword=$,@,48-57,_
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
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.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020041" Only when an item doesn't have highlighting yet
42command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000043
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020044HiLink 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000053
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020054delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000055
56let b:current_syntax = "ist"
57
Bram Moolenaar6ee8d892012-01-10 14:55:01 +010058let &cpo = s:cpo_save
59unlet s:cpo_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000060" vim: ts=8 sw=2