add vim syntax
This commit is contained in:
parent
8c30e2fd2f
commit
5300cf7c16
2 changed files with 18 additions and 0 deletions
|
@ -9,6 +9,9 @@ func main { mega |
|
||||||
"make sure its executable";
|
"make sure its executable";
|
||||||
[ "sudo" "chmod" "a+rx" "/bin/spl" ] command-wait;
|
[ "sudo" "chmod" "a+rx" "/bin/spl" ] command-wait;
|
||||||
|
|
||||||
|
"add vim syntax";
|
||||||
|
[ "sudo" "cp" "spl.vim" "/usr/share/*vim*/runtime/syntax/spl.vim"] command-wait;
|
||||||
|
|
||||||
"SPL is now installed!" println
|
"SPL is now installed!" println
|
||||||
|
|
||||||
0
|
0
|
||||||
|
|
15
spl.vim
Normal file
15
spl.vim
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn match Comment /".*?";/
|
||||||
|
syn match Number /\<[0-9._]*\>/
|
||||||
|
syn match Function /\<func[ \n]\+[^ ]\+[ \n]\+{ .*[ ]*|\|{ .*[ ]*|\|{\|}/
|
||||||
|
syn keyword Keyword while if exit eq lt gt neg or and not + - * ++ -- % / with
|
||||||
|
syn match Keyword /;/
|
||||||
|
syn keyword Type pop dup swap
|
||||||
|
syn match Type /=[a-zA-Z0-9_\-]\+\|\<_[a-zA-Z0-9_\-]\+\>/
|
||||||
|
syn match Identifier /[a-zA-Z0-9_\-]\+:\|\<this\>/
|
||||||
|
syn match String /"[^"]*"/
|
||||||
|
syn match Typedef /\<def[ \n]\+[^ ]*\|construct/
|
Loading…
Add table
Reference in a new issue