forked from solstice/solstice
Vim syntax highlighting
This commit is contained in:
1
vim/ftdetect/solstice.vim
Normal file
1
vim/ftdetect/solstice.vim
Normal file
@@ -0,0 +1 @@
|
|||||||
|
au BufRead,BufNewFile *.sols setfiletype solstice
|
||||||
37
vim/syntax/solstice.vim
Normal file
37
vim/syntax/solstice.vim
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
" Vim highlight file for Solstice (.sols)
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Keywords
|
||||||
|
syn keyword solsticeConditional if
|
||||||
|
syn keyword solsticeRepeat while
|
||||||
|
syn keyword solsticeBoolean true false
|
||||||
|
|
||||||
|
" Built-in functions
|
||||||
|
syn keyword solsticeBuiltin puts println input
|
||||||
|
|
||||||
|
" Data Types
|
||||||
|
syn match solsticeNumber "\d\+\(\.\d\+\)\="
|
||||||
|
syn region solsticeString start=/"/ end=/"/
|
||||||
|
syn match solsticeCharacter /'[^']'/
|
||||||
|
|
||||||
|
" Operators
|
||||||
|
syn match solsticeOperator "==\|!=\|>=\|<=\|++\|--\|+\=\|-\=\|\*=\|\/="
|
||||||
|
syn match solsticeOperator "[><=+\-*/]"
|
||||||
|
|
||||||
|
" Delimiters
|
||||||
|
syn match solsticeDelimiter "[{()}]"
|
||||||
|
|
||||||
|
hi def link solsticeConditional Conditional
|
||||||
|
hi def link solsticeRepeat Repeat
|
||||||
|
hi def link solsticeBoolean Boolean
|
||||||
|
hi def link solsticeBuiltin Function
|
||||||
|
hi def link solsticeNumber Number
|
||||||
|
hi def link solsticeString String
|
||||||
|
hi def link solsticeCharacter Character
|
||||||
|
hi def link solsticeOperator Operator
|
||||||
|
hi def link solsticeDelimiter Delimiter
|
||||||
|
|
||||||
|
let b:current_syntax = "solstice"
|
||||||
Reference in New Issue
Block a user