2015-12-05 02:57:01 +01:00
|
|
|
# Highlighting for common files in /etc
|
|
|
|
hook global BufCreate .*/etc/(hosts|networks|services) %{ set buffer filetype etc-hosts }
|
|
|
|
hook global BufCreate .*/etc/resolv.conf %{ set buffer filetype etc-resolv-conf }
|
|
|
|
hook global BufCreate .*/etc/shadow %{ set buffer filetype etc-shadow }
|
|
|
|
hook global BufCreate .*/etc/passwd %{ set buffer filetype etc-passwd }
|
|
|
|
hook global BufCreate .*/etc/gshadow %{ set buffer filetype etc-gshadow }
|
|
|
|
hook global BufCreate .*/etc/group %{ set buffer filetype etc-group }
|
|
|
|
hook global BufCreate .*/etc/(fs|m)tab %{ set buffer filetype etc-fstab }
|
|
|
|
hook global BufCreate .*/etc/environment %{ set buffer filetype sh }
|
|
|
|
hook global BufCreate .*/etc/env.d/.* %{ set buffer filetype sh }
|
|
|
|
hook global BufCreate .*/etc/profile(\.(csh|env))? %{ set buffer filetype sh }
|
|
|
|
hook global BufCreate .*/etc/profile\.d/.* %{ set buffer filetype sh }
|
|
|
|
|
|
|
|
# Highlighters
|
|
|
|
## /etc/resolv.conf
|
2017-10-28 05:00:51 +02:00
|
|
|
add-highlighter shared/ group etc-resolv-conf
|
|
|
|
add-highlighter shared/etc-resolv-conf regex ^#.*?$ 0:comment
|
|
|
|
add-highlighter shared/etc-resolv-conf regex ^(nameserver|server|domain|sortlist|options)[\s\t]+(.*?)$ 1:type 2:attribute
|
2015-12-05 02:57:01 +01:00
|
|
|
|
2017-10-28 05:00:51 +02:00
|
|
|
hook -group etc-resolv-conf-highlight global WinSetOption filetype=etc-resolv-conf %{ add-highlighter window ref etc-resolv-conf }
|
|
|
|
hook -group etc-resolv-conf-highlight global WinSetOption filetype=(?!etc-resolv-conf).* %{ remove-highlighter window/etc-resolv-conf }
|
2015-12-05 02:57:01 +01:00
|
|
|
|
|
|
|
## /etc/hosts
|
2017-10-28 05:00:51 +02:00
|
|
|
add-highlighter shared/ group etc-hosts
|
|
|
|
add-highlighter shared/etc-hosts regex ^(.+?)[\s\t]+?(.*?)$ 1:type 2:attribute
|
|
|
|
add-highlighter shared/etc-hosts regex '#.*?$' 0:comment
|
2015-12-05 02:57:01 +01:00
|
|
|
|
2017-10-28 05:00:51 +02:00
|
|
|
hook -group etc-hosts-highlight global WinSetOption filetype=etc-hosts %{ add-highlighter window ref etc-hosts }
|
|
|
|
hook -group etc-hosts-highlight global WinSetOption filetype=(?!etc-hosts).* %{ remove-highlighter window/etc-hosts }
|
2015-12-05 02:57:01 +01:00
|
|
|
|
|
|
|
## /etc/fstab
|
2017-10-28 05:00:51 +02:00
|
|
|
add-highlighter shared/ group etc-fstab
|
|
|
|
add-highlighter shared/etc-fstab regex ^(\S{1,})\s+?(\S{1,})\s+?(\S{1,})\s+?(\S{1,})\s+?(\S{1,})\s+?(\S{1,})(?:\s+)?$ 1:keyword 2:value 3:type 4:string 5:attribute 6:attribute
|
|
|
|
add-highlighter shared/etc-fstab regex '#.*?$' 0:comment
|
2015-12-05 02:57:01 +01:00
|
|
|
|
2017-10-28 05:00:51 +02:00
|
|
|
hook -group etc-fstab-highlight global WinSetOption filetype=etc-fstab %{ add-highlighter window ref etc-fstab }
|
|
|
|
hook -group etc-fstab-highlight global WinSetOption filetype=(?!etc-fstab).* %{ remove-highlighter window/etc-fstab }
|
2015-12-05 02:57:01 +01:00
|
|
|
|
|
|
|
## /etc/group
|
2017-10-28 05:00:51 +02:00
|
|
|
add-highlighter shared/ group etc-group
|
|
|
|
add-highlighter shared/etc-group regex ^(\S+?):(\S+?)?:(\S+?)?:(\S+?)?$ 1:keyword 2:type 3:value 4:string
|
2015-12-05 02:57:01 +01:00
|
|
|
|
2017-10-28 05:00:51 +02:00
|
|
|
hook -group etc-group-highlight global WinSetOption filetype=etc-group %{ add-highlighter window ref etc-group }
|
|
|
|
hook -group etc-group-highlight global WinSetOption filetype=(?!etc-group).* %{ remove-highlighter window/etc-group }
|
2015-12-05 02:57:01 +01:00
|
|
|
|
|
|
|
## /etc/gshadow
|
2017-10-28 05:00:51 +02:00
|
|
|
add-highlighter shared/ group etc-gshadow
|
|
|
|
add-highlighter shared/etc-gshadow regex ^(\S+?):(\S+?)?:(\S+?)?:(\S+?)?$ 1:keyword 2:type 3:value 4:string
|
2015-12-05 02:57:01 +01:00
|
|
|
|
2017-10-28 05:00:51 +02:00
|
|
|
hook -group etc-gshadow-highlight global WinSetOption filetype=etc-gshadow %{ add-highlighter window ref etc-gshadow }
|
|
|
|
hook -group etc-gshadow-highlight global WinSetOption filetype=(?!etc-gshadow).* %{ remove-highlighter window/etc-gshadow }
|
2015-12-05 02:57:01 +01:00
|
|
|
|
|
|
|
## /etc/shadow
|
2017-10-28 05:00:51 +02:00
|
|
|
add-highlighter shared/ group etc-shadow
|
|
|
|
add-highlighter shared/etc-shadow regex ^(\S+?):(\S+?):([0-9]+?):([0-9]+?)?:([0-9]+?)?:([0-9]+?)?:([0-9]+?)?:([0-9]+?)?:(.*?)?$ 1:keyword 2:type 3:value 4:value 5:value 6:value 7:value 8:value
|
2015-12-05 02:57:01 +01:00
|
|
|
|
2017-10-28 05:00:51 +02:00
|
|
|
hook -group etc-shadow-highlight global WinSetOption filetype=etc-shadow %{ add-highlighter window ref etc-shadow }
|
|
|
|
hook -group etc-shadow-highlight global WinSetOption filetype=(?!etc-shadow).* %{ remove-highlighter window/etc-shadow }
|
2015-12-05 02:57:01 +01:00
|
|
|
|
|
|
|
## /etc/passwd
|
2017-10-28 05:00:51 +02:00
|
|
|
add-highlighter shared/ group etc-passwd
|
|
|
|
add-highlighter shared/etc-passwd regex ^(\S+?):(\S+?):([0-9]+?):([0-9]+?):(.*?)?:(.+?):(.+?)$ 1:keyword 2:type 3:value 4:value 5:string 6:attribute 7:attribute
|
2015-12-05 02:57:01 +01:00
|
|
|
|
2017-10-28 05:00:51 +02:00
|
|
|
hook -group etc-passwd-highlight global WinSetOption filetype=etc-passwd %{ add-highlighter window ref etc-passwd }
|
|
|
|
hook -group etc-passwd-highlight global WinSetOption filetype=(?!etc-passwd).* %{ remove-highlighter window/etc-passwd }
|
2015-12-05 02:57:01 +01:00
|
|
|
|