Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: generic configure file |
| 3 | " Maintainer: Bram Moolenaar <Bram@vim.org> |
| 4 | " Last Change: 2001 Apr 25 |
| 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 | |
| 14 | syn keyword confTodo contained TODO FIXME XXX |
| 15 | " Avoid matching "text#text", used in /etc/disktab and /etc/gettytab |
| 16 | syn match confComment "^#.*" contains=confTodo |
| 17 | syn match confComment "\s#.*"ms=s+1 contains=confTodo |
| 18 | syn region confString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline |
| 19 | syn region confString start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline |
| 20 | |
| 21 | " Define the default highlighting. |
| 22 | " For version 5.7 and earlier: only when not done already |
| 23 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 24 | if version >= 508 || !exists("did_conf_syntax_inits") |
| 25 | if version < 508 |
| 26 | let did_conf_syntax_inits = 1 |
| 27 | command -nargs=+ HiLink hi link <args> |
| 28 | else |
| 29 | command -nargs=+ HiLink hi def link <args> |
| 30 | endif |
| 31 | |
| 32 | HiLink confComment Comment |
| 33 | HiLink confTodo Todo |
| 34 | HiLink confString String |
| 35 | |
| 36 | delcommand HiLink |
| 37 | endif |
| 38 | |
| 39 | let b:current_syntax = "conf" |
| 40 | |
| 41 | " vim: ts=8 sw=2 |