Skip to content

Instantly share code, notes, and snippets.

@Leandros
Created September 12, 2016 05:51
Show Gist options
  • Save Leandros/87968c1ffab0ab1468597645a62741ff to your computer and use it in GitHub Desktop.
Save Leandros/87968c1ffab0ab1468597645a62741ff to your computer and use it in GitHub Desktop.
FastBuild Vim Syntax
" fastbuild syntax
" keywords
syn keyword bffKeyword Alias Compiler Copy CopyDir CSAssembly DLL Exec
syn keyword bffKeyword Executable ForEach Library ObjectList Print RemoveDir
syn keyword bffKeyword Settings Test Unity Using VCXProject VSSSolution XCodeProject
" preprocessor
syn region bffPreproc start="^\s*#\s*\(if\|endif\)\>" skip="\\$" end="$" keepend
syn region bffPreproc start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" keepend
syn region bffPreproc start="^\s*#\s*\(import\|once\)\>" skip="\\$" end="$" keepend
syn region bffIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match bffIncluded contained "<[^>]*>"
syn match bffInclude "^\s*#\s*include\>\s*["<]" contains=bffIncluded
" strings
syn match bffEscape display contained "\^."
syn region bffString start=+L\="+ skip=+\\\\\|\^"+ end=+"+ contains=bffEscape extend
syn region bffString start=+L\='+ skip=+\\\\\|\^'+ end=+'+ contains=bffEscape extend
" comments
syn match bffComment ";.*"
syn match bffComment "//.*"
" variables / identifiers
syn match bffIdentifier "\.[a-zA-Z0-9]*"
" Actual highlighting
if version >= 508 || !exists("bff_did_init")
if version < 508
let bff_did_init = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink bffComment Comment
HiLink bffKeyword Statement
HiLink bffPreproc PreProc
HiLink bffString String
HiLink bffInclude PreProc
HiLink bffIncluded String
HiLink bffEscape Special
HiLink bffIdentifier Identifier
delcommand HiLink
endif
let b:current_syntax = "bff"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment