Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: Makeindex style file, *.ist |
| 3 | " Maintainer: Peter Meszaros <pmeszaros@effice.hu> |
Bram Moolenaar | 6ee8d89 | 2012-01-10 14:55:01 +0100 | [diff] [blame] | 4 | " Last Change: 2012 Jan 08 by Thilo Six |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 5 | |
| 6 | " For version 5.x: Clear all syntax items |
| 7 | " For version 6.x: Quit when a syntax file was already loaded |
| 8 | if version < 600 |
| 9 | syntax clear |
| 10 | elseif exists("b:current_syntax") |
| 11 | finish |
| 12 | endif |
| 13 | |
Bram Moolenaar | 6ee8d89 | 2012-01-10 14:55:01 +0100 | [diff] [blame] | 14 | let s:cpo_save = &cpo |
| 15 | set cpo&vim |
| 16 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 17 | if version >= 600 |
| 18 | setlocal iskeyword=$,@,48-57,_ |
| 19 | else |
| 20 | set iskeyword=$,@,48-57,_ |
| 21 | endif |
| 22 | |
| 23 | syn case ignore |
| 24 | syn keyword IstInpSpec actual arg_close arg_open encap escape |
| 25 | syn keyword IstInpSpec keyword level quote range_close range_open |
| 26 | syn keyword IstInpSpec page_compositor |
| 27 | |
| 28 | syn keyword IstOutSpec preamble postamble setpage_prefix setpage_suffix group_skip |
| 29 | syn keyword IstOutSpec headings_flag heading_prefix heading_suffix |
| 30 | syn keyword IstOutSpec lethead_flag lethead_prefix lethead_suffix |
| 31 | syn keyword IstOutSpec symhead_positive symhead_negative numhead_positive numhead_negative |
| 32 | syn keyword IstOutSpec item_0 item_1 item_2 item_01 |
| 33 | syn keyword IstOutSpec item_x1 item_12 item_x2 |
| 34 | syn keyword IstOutSpec delim_0 delim_1 delim_2 |
| 35 | syn keyword IstOutSpec delim_n delim_r delim_t |
| 36 | syn keyword IstOutSpec encap_prefix encap_infix encap_suffix |
| 37 | syn keyword IstOutSpec line_max indent_space indent_length |
| 38 | syn keyword IstOutSpec suffix_2p suffix_3p suffix_mp |
| 39 | |
| 40 | syn region IstString matchgroup=IstDoubleQuote start=+"+ skip=+\\"+ end=+"+ contains=IstSpecial |
| 41 | syn match IstCharacter "'.'" |
| 42 | syn match IstNumber "\d\+" |
| 43 | syn match IstComment "^[\t ]*%.*$" contains=IstTodo |
| 44 | syn match IstSpecial "\\\\\|{\|}\|#\|\\n" contained |
| 45 | syn match IstTodo "DEBUG\|TODO" contained |
| 46 | |
| 47 | " Define the default highlighting. |
| 48 | " For version 5.7 and earlier: only when not done already |
| 49 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 50 | if version >= 508 || !exists("did_dummy_syn_inits") |
| 51 | if version < 508 |
| 52 | let did_dummy_syn_inits = 1 |
| 53 | command -nargs=+ HiLink hi link <args> |
| 54 | else |
| 55 | command -nargs=+ HiLink hi def link <args> |
| 56 | endif |
| 57 | |
| 58 | HiLink IstInpSpec Type |
| 59 | HiLink IstOutSpec Identifier |
| 60 | HiLink IstString String |
| 61 | HiLink IstNumber Number |
| 62 | HiLink IstComment Comment |
| 63 | HiLink IstTodo Todo |
| 64 | HiLink IstSpecial Special |
| 65 | HiLink IstDoubleQuote Label |
| 66 | HiLink IstCharacter Label |
| 67 | |
| 68 | delcommand HiLink |
| 69 | endif |
| 70 | |
| 71 | let b:current_syntax = "ist" |
| 72 | |
Bram Moolenaar | 6ee8d89 | 2012-01-10 14:55:01 +0100 | [diff] [blame] | 73 | let &cpo = s:cpo_save |
| 74 | unlet s:cpo_save |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 75 | " vim: ts=8 sw=2 |