hirc

IRC client
Log | Files | Refs

commit 4094de1f2b28dff3711a6b8ff65d22b0fd38e127
parent 63ffed71a2e933896a2cba34779cf59478db50bc
Author: hhvn <dev@hhvn.uk>
Date:   Thu,  2 Dec 2021 13:09:43 +0000

hirc.vim: add syntax file for configs

Diffstat:
Ahirc.vim | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/hirc.vim b/hirc.vim @@ -0,0 +1,23 @@ +" hirc config syntax highlighting +" Colours comments and formats. +" I haven't done any autocmd stuff, +" so you'll likely want to tell vim +" to use this syntax (:help modeline) */ + +if exists("b:current_syntax") + finish +endif + +syn match hircComment "^[^/].*" +syn region hircFormatA start="^/format" end=/$/ contains=hircStyle,hircVariable,hircNickStyle +syn region hircFormatB start="^/set format." end=/$/ contains=hircStyle,hircVariable,hircNickStyle +syn match hircStyle "%{[^}]*}" contained +" hircNickStyle is a bit hacky and should be replaced +" by a region, but I don't know syn enough for that +syn match hircNickStyle "%{nick:\${[^}]*}}" contained contains=hircVariable +syn match hircVariable "\${[^}]*}" contained + +hi link hircComment comment +hi link hircStyle preproc +hi link hircNickStyle hircStyle +hi link hircVariable variable