summaryrefslogtreecommitdiff
path: root/vim/vim-potion/syntax/potion.vim
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-05-29 20:27:28 +0200
committerMiguel <m.i@gmx.at>2018-05-29 20:27:28 +0200
commit68b54b0d1729cd036fcba1c85f85ad4af6e9e3dc (patch)
tree3d0f4e5eb1b147ae9ba193065d9c7b09f8e72f16 /vim/vim-potion/syntax/potion.vim
added vim stuff
Diffstat (limited to 'vim/vim-potion/syntax/potion.vim')
-rw-r--r--vim/vim-potion/syntax/potion.vim37
1 files changed, 37 insertions, 0 deletions
diff --git a/vim/vim-potion/syntax/potion.vim b/vim/vim-potion/syntax/potion.vim
new file mode 100644
index 0000000..2ca9dbc
--- /dev/null
+++ b/vim/vim-potion/syntax/potion.vim
@@ -0,0 +1,37 @@
+if exists("b:current_syntax")
+ finish
+endif
+
+syntax keyword potionKeyword loop times to while
+syntax keyword potionKeyword if elsif else
+syntax keyword potionKeyword class return
+syntax keyword potionFunction print join string
+
+syntax match potionOperator "\v\."
+syntax match potionOperator "\v:"
+syntax match potionOperator "\v\="
+syntax match potionOperator "\v\*"
+syntax match potionOperator "\v/"
+syntax match potionOperator "\v\+"
+syntax match potionOperator "\v-"
+syntax match potionOperator "\v\?"
+syntax match potionOperator "\v\*\="
+syntax match potionOperator "\v/\="
+syntax match potionOperator "\v\+\="
+syntax match potionOperator "\v-\="
+
+syntax match potionNumber "\v\d+"
+syntax match potionNumber "\v0x\x+"
+
+syntax region potionString start=/\v"/ skip=/\v\\./ end=/\v"/
+
+syntax match potionComment "\v#.*$"
+
+highlight link potionString String
+highlight link potionOperator Operator
+highlight link potionKeyword Keyword
+highlight link potionFunction Function
+highlight link potionComment Comment
+highlight link potionNumber Number
+
+let b:current_syntax = "potion"