sxhkd-vim-rc.diff (1459B)
1 --- a/syntax/sxhkd.vim 2022-01-15 10:51:58.142679809 +0000 2 +++ b/syntax/sxhkd.vim 2022-01-15 11:01:41.486029000 +0000 3 @@ -2,25 +2,24 @@ 4 finish 5 endif 6 7 -let b:current_syntax = "sxhkd" 8 9 -syntax match sxhkd_binding "\v^.*$" contains=sxhkd_on_release,sxhkd_binding_pass 10 +syntax match sxhkd_binding "\v^.*$" contains=sxhkd_on_release,sxhkd_binding_pass,sxhkd_brace 11 syntax match sxhkd_on_release "\v^\@" contained 12 syntax match sxhkd_binding_pass "\v^\~" contained 13 -syntax match sxhkd_exec "\v^\s+.*" contains=@sxhkd_shell 14 +syntax match sxhkd_exec "\v^\s+.*" contains=@sxhkd_rc,sxhkd_brace 15 syntax match sxhkd_comment "\v#.*$" 16 +syntax match sxhkd_brace "\[[^\]]*\]" contained 17 18 highlight link sxhkd_comment Comment 19 highlight link sxhkd_binding Identifier 20 highlight link sxhkd_binding_on_release Conditional 21 highlight link sxhkd_binding_pass Constant 22 -highlight link sxhkd_exec Macro 23 - 24 -" match shell command 25 -let s:current_syntax = b:current_syntax 26 -unlet b:current_syntax 27 +highlight link sxhkd_brace Macro 28 29 -syntax include @sxhkd_shell syntax/sh.vim 30 -let b:current_syntax = s:current_syntax 31 +" match rc 32 +" - https://github.com/weakish/rcshell.vim 33 +" - gopher://hhvn.uk/1/git/o/rcshell.vim 34 +syntax include @sxhkd_rc syntax/rcshell.vim 35 +syntax region rcLine matchgroup=sxhkd_exec start=/\v^\s+\s/ end=/\v$/ contains=@sxhkd_rc 36 37 -syntax region shLine matchgroup=sxhkd_exec start=/\v^\s+\s/ end=/\v$/ contains=@sxhkd_shell 38 +let b:current_syntax = "sxhkd"