add vim syntax highlighter

This commit is contained in:
Kitty-Cricket Piapiac 2023-06-27 17:43:58 -07:00
parent 29c53ab0da
commit b234d213eb
3 changed files with 24 additions and 0 deletions

1
vim/ftdetect/x20.vim Normal file
View File

@ -0,0 +1 @@
au BufRead,BufNewFile *.x20 setfiletype x20

8
vim/ftplugin/x20.vim Normal file
View File

@ -0,0 +1,8 @@
if exists("b:did_ftplugin")
finish
endif
setlocal commentstring={%s}
setlocal matchpairs={:},::;,!:;
let b:did_ftplugin = 1

15
vim/syntax/x20.vim Normal file
View File

@ -0,0 +1,15 @@
syn match x20com "{.*}"
syn match x20fun "-\S*"
syn match x20num "#\S*\|@\S*"
syn match x20pun ":\S*\|!\S*\|;"
syn region x20str matchgroup=x20str start=/"/ end=/"/
syn sync fromstart
hi link x20com comment
hi link x20fun type
hi link x20num number
hi link x20pun delimiter
hi link x20str string
let b:current_syntax='x20'