diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2017-03-23 12:48:17 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-03-23 12:48:28 +0100 |
commit | 0134940f23eaf2eb4a0c9f0f88e3c1c8a0eed8ba (patch) | |
tree | 812d1014f0a46980e5d530b4524c9fa4f9926b98 /syntax | |
parent | 8bb259b1f6329837f471c6df2385f44fef02d2b4 (diff) | |
download | vim-polyglot-0134940f23eaf2eb4a0c9f0f88e3c1c8a0eed8ba.tar.gz vim-polyglot-0134940f23eaf2eb4a0c9f0f88e3c1c8a0eed8ba.zip |
Add sxhkd support, closes #186
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/sxhkdrc.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/syntax/sxhkdrc.vim b/syntax/sxhkdrc.vim new file mode 100644 index 00000000..bb8ee95b --- /dev/null +++ b/syntax/sxhkdrc.vim @@ -0,0 +1,30 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sxhkd') == -1 + +if exists("b:current_syntax") + finish +endif + +syntax include @Shell syntax/sh.vim + +syn match sxComment "^#.*$" +syn match sxHotkey "[^ #].*" contains=sxKeysym,sxModifier,sxHotkeySep,sxSequence +syn match sxCommand "^\s.*$" containedin=ALL contains=@Shell,sxSequenceShell +syn keyword sxModifier super hyper meta alt control ctrl shift mode_switch lock mod1 mod2 mod3 mod4 mod5 any contained +syn match sxKeysym "[^ :;{,}+-]\+" contained contains=sxAction +syn match sxAction "[@~/]" contained +syn match sxHotkeySep "[;:+]" contained +syn match sxSequenceSep "[,-]" contained +syn region sxSequence matchgroup=sxBrace start=/{/ end=/}/ contained keepend oneline contains=sxKeysym,sxModifier,sxHotkeySep,sxSequenceSep +syn region sxSequenceShell matchgroup=sxBrace start=/{/ end=/}/ contained keepend oneline contains=sxKeysym,sxSequenceSep + +hi def link sxComment Comment +hi def link sxModifier Keyword +hi def link sxKeysym Identifier +hi def link sxAction Special +hi def link sxBrace Special +hi def link sxHotkeySep Delimiter +hi def link sxSequenceSep Delimiter + +let b:current_syntax = "sxhkdrc" + +endif |