Created
July 5, 2017 12:41
-
-
Save charlesetc/2b103e92e0a245c00d7466614c4a6862 to your computer and use it in GitHub Desktop.
Simple syntax highlighting for Brie
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists("b:current_syntax") | |
finish | |
endif | |
" Keywords | |
syntax keyword brieKeyword class define case self method field require | |
highlight link brieKeyword Keyword | |
" Block | |
syntax region brieBlock start='\[' end='\]' fold transparent contains=ALL containedin=TOP | |
" syntax match brieBraces "[()[\]{}]" | |
highlight link brieBlock Statement | |
" Strings without string interpolation | |
syntax region brieString start=/\v"/ skip=/\v\\./ end=/\v"/ | |
highlight link brieString String | |
" Comments | |
syntax match brieComment "--.*$" | |
highlight link brieComment Comment | |
" Booleans | |
syntax keyword brieBoolean true false | |
hi def link brieBoolean Boolean | |
" Idendation for [ ] blocks | |
set cindent | |
set cinkeys=0[,0],0),:,0#,!^F,o,O,e | |
let b:current_syntax = "brie" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment