Merge remote-tracking branch 'greduan/rename-ini-highlighter'

This commit is contained in:
Maxime Coste 2016-09-28 21:46:31 +01:00
commit c77719bad0

View File

@ -2,18 +2,18 @@ hook global BufCreate .*\.(repo|service|target|socket|ini|cfg) %{
set buffer filetype ini
}
addhl -group / regions -default code ini-highlighter \
addhl -group / regions -default code ini \
comment (^|\h)\K\# $ ''
addhl -group /ini-highlighter/code regex "^\h*\[[^\]]*\]" 0:title
addhl -group /ini-highlighter/code regex "^\h*([^\[][^=\n]*=)([^\n]*)" 1:identifier 2:value
addhl -group /ini/code regex "^\h*\[[^\]]*\]" 0:title
addhl -group /ini/code regex "^\h*([^\[][^=\n]*=)([^\n]*)" 1:identifier 2:value
addhl -group /ini-highlighter/comment fill comment
addhl -group /ini/comment fill comment
hook global WinSetOption filetype=ini %{
addhl ref ini-highlighter
addhl ref ini
}
hook global WinSetOption filetype=(?!ini).* %{
rmhl ini-highlighter
rmhl ini
}