Add sxhkd support, closes #186
This commit is contained in:
parent
8bb259b1f6
commit
0134940f23
@ -117,6 +117,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [solidity](https://github.com/ethereum/vim-solidity) (syntax, indent, ftdetect)
|
- [solidity](https://github.com/ethereum/vim-solidity) (syntax, indent, ftdetect)
|
||||||
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin, ftdetect)
|
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [swift](https://github.com/keith/swift.vim) (syntax, indent, ftplugin, ftdetect)
|
- [swift](https://github.com/keith/swift.vim) (syntax, indent, ftplugin, ftdetect)
|
||||||
|
- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (syntax, ftdetect)
|
||||||
- [systemd](https://github.com/kurayama/systemd-vim-syntax) (syntax, ftdetect)
|
- [systemd](https://github.com/kurayama/systemd-vim-syntax) (syntax, ftdetect)
|
||||||
- [terraform](https://github.com/hashivim/vim-terraform) (syntax, indent, ftdetect, ftplugin)
|
- [terraform](https://github.com/hashivim/vim-terraform) (syntax, indent, ftdetect, ftplugin)
|
||||||
- [textile](https://github.com/timcharper/textile.vim) (syntax, ftplugin, ftdetect)
|
- [textile](https://github.com/timcharper/textile.vim) (syntax, ftplugin, ftdetect)
|
||||||
|
1
build
1
build
@ -183,6 +183,7 @@ PACKS="
|
|||||||
solidity:ethereum/vim-solidity
|
solidity:ethereum/vim-solidity
|
||||||
stylus:wavded/vim-stylus
|
stylus:wavded/vim-stylus
|
||||||
swift:keith/swift.vim
|
swift:keith/swift.vim
|
||||||
|
sxhkd:baskerville/vim-sxhkdrc
|
||||||
systemd:kurayama/systemd-vim-syntax
|
systemd:kurayama/systemd-vim-syntax
|
||||||
terraform:hashivim/vim-terraform
|
terraform:hashivim/vim-terraform
|
||||||
textile:timcharper/textile.vim
|
textile:timcharper/textile.vim
|
||||||
|
@ -937,6 +937,17 @@ endfunction
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" ftdetect/sxhkdrc.vim
|
||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sxhkd') == -1
|
||||||
|
|
||||||
|
if &compatible || v:version < 603
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
autocmd BufNewFile,BufRead sxhkdrc,*.sxhkdrc set ft=sxhkdrc
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
" ftdetect/systemd.vim
|
" ftdetect/systemd.vim
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemd') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemd') == -1
|
||||||
|
|
||||||
|
30
syntax/sxhkdrc.vim
Normal file
30
syntax/sxhkdrc.vim
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user