Bram Moolenaar | 42eeac3 | 2005-06-29 22:40:58 +0000 | [diff] [blame] | 1 | " Vim syntax file |
Bram Moolenaar | 214641f | 2017-03-05 17:04:09 +0100 | [diff] [blame] | 2 | " Language: sysctl.conf(5) configuration file |
| 3 | " Previous Maintainer: Nikolai Weibull <now@bitwi.se> |
| 4 | " Latest Revision: 2011-05-02 |
Bram Moolenaar | 42eeac3 | 2005-06-29 22:40:58 +0000 | [diff] [blame] | 5 | |
| 6 | if exists("b:current_syntax") |
| 7 | finish |
| 8 | endif |
| 9 | |
| 10 | let s:cpo_save = &cpo |
| 11 | set cpo&vim |
| 12 | |
| 13 | syn match sysctlBegin display '^' |
| 14 | \ nextgroup=sysctlToken,sysctlComment skipwhite |
| 15 | |
Bram Moolenaar | 446beb4 | 2011-05-10 17:18:44 +0200 | [diff] [blame] | 16 | syn match sysctlToken contained display '[^=]\+' |
Bram Moolenaar | 42eeac3 | 2005-06-29 22:40:58 +0000 | [diff] [blame] | 17 | \ nextgroup=sysctlTokenEq skipwhite |
| 18 | |
| 19 | syn match sysctlTokenEq contained display '=' nextgroup=sysctlValue skipwhite |
| 20 | |
| 21 | syn region sysctlValue contained display oneline |
| 22 | \ matchgroup=sysctlValue start='\S' |
| 23 | \ matchgroup=Normal end='\s*$' |
| 24 | |
| 25 | syn keyword sysctlTodo contained TODO FIXME XXX NOTE |
| 26 | |
| 27 | syn region sysctlComment display oneline start='^\s*[#;]' end='$' |
| 28 | \ contains=sysctlTodo,@Spell |
| 29 | |
| 30 | hi def link sysctlTodo Todo |
| 31 | hi def link sysctlComment Comment |
| 32 | hi def link sysctlToken Identifier |
| 33 | hi def link sysctlTokenEq Operator |
| 34 | hi def link sysctlValue String |
| 35 | |
| 36 | let b:current_syntax = "sysctl" |
| 37 | |
| 38 | let &cpo = s:cpo_save |
| 39 | unlet s:cpo_save |