Skip to content

Instantly share code, notes, and snippets.

@charlesetc
Created July 5, 2017 12:41
Show Gist options
  • Save charlesetc/2b103e92e0a245c00d7466614c4a6862 to your computer and use it in GitHub Desktop.
Save charlesetc/2b103e92e0a245c00d7466614c4a6862 to your computer and use it in GitHub Desktop.
Simple syntax highlighting for Brie
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