add gmqcc additions
This commit is contained in:
parent
eca685e8f9
commit
803a00db32
|
@ -1,81 +1,57 @@
|
||||||
" Vim syntax file
|
if exists("b:current_syntax")
|
||||||
" Language: QuakeC
|
finish
|
||||||
" Maintainer: Robert Siska <github.com/RobSis>
|
|
||||||
" Last Change: 2013 Mar 03
|
|
||||||
|
|
||||||
" Quit when a (custom) syntax file was already loaded
|
|
||||||
if version < 600
|
|
||||||
syntax clear
|
|
||||||
elseif exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
syn keyword qcStatement goto break return continue
|
||||||
|
syn keyword qcConditional if else switch
|
||||||
|
syn keyword qcRepeat while for do
|
||||||
|
syn keyword qcLabel case default
|
||||||
|
syn keyword qcStructure struct union enum typedef
|
||||||
|
|
||||||
" Keywords and statements
|
syn keyword qcTodo contained TODO FIXME XXX
|
||||||
syn keyword qcStatement if else while do return
|
syn keyword qcQuaked contained QUAKED
|
||||||
syn keyword qcTodo contained TODO FIXME XXX
|
|
||||||
syn keyword qcQuaked contained QUAKED
|
|
||||||
|
|
||||||
syn keyword qcType void float vector string entity
|
syn keyword qcType void float vector string entity
|
||||||
syn keyword qcStorageClass local
|
syn keyword qcStorageClass local var const
|
||||||
|
|
||||||
syn keyword qcConstant TRUE FALSE
|
syn keyword qcConstant TRUE FALSE
|
||||||
|
|
||||||
|
syn match qcNumbers display transparent "\<\d\|\.\d" contains=qcNumber,qcHexNumber
|
||||||
|
syn match qcHexNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||||
|
syn match qcNumber display contained "\([0-9]\+\(\.[0-9]*f\=\)\=\|\.[0-9]\+f\=\)\>"
|
||||||
|
syn region qcVector display oneline start=+'+ end=+'+ keepend contains=@Spell
|
||||||
|
|
||||||
" Literals
|
syn region qcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=qcSpecial,@Spell
|
||||||
syn match qcNumbers display transparent "\<\d\|\.\d" contains=qcNumber,qcHexNumber
|
syn match qcSpecial display contained "\\\(x\x\+\|.\|$\)"
|
||||||
syn match qcHexNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
|
||||||
syn match qcNumber display contained "\([0-9]\+\(\.[0-9]*f\=\)\=\|\.[0-9]\+f\=\)\>"
|
|
||||||
syn region qcVector display oneline start=+'+ end=+'+ keepend contains=@Spell
|
|
||||||
|
|
||||||
syn region qcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=qcSpecial,@Spell
|
syn match qcBuiltin display "\#\d\+"
|
||||||
syn match qcSpecial display contained "\\\(x\x\+\|.\|$\)"
|
syn match qcFrame display "\$[^\d\W]\w*\>"
|
||||||
|
syn match qcPragma display "\$\(flags\|base\|cd\|frame\|modelname\|origin\|scale\|skin\)\>"
|
||||||
|
|
||||||
syn match qcBuiltin display "\#\d\+"
|
syn cluster qcCommentGroup contains=qcTodo,qcQuaked
|
||||||
syn match qcFrame display "\$[^\d\W]\w*\>"
|
syn region qcLineComment start="//" skip="\\$" end="$" keepend contains=@qcCommentGroup,@Spell
|
||||||
syn match qcPragma display "\$\(flags\|base\|cd\|frame\|modelname\|origin\|scale\|skin\)\>"
|
syn region qcComment start="/\*" end="\*/" contains=@qcCommentGroup,@Spell fold extend
|
||||||
|
|
||||||
|
syn sync ccomment qcComment minlines=10
|
||||||
|
|
||||||
" Comments
|
hi def link qcLineComment qcComment
|
||||||
syn cluster qcCommentGroup contains=qcTodo,qcQuaked
|
hi def link qcComment Comment
|
||||||
syn region qcLineComment start="//" skip="\\$" end="$" keepend contains=@qcCommentGroup,@Spell
|
hi def link qcConditional Conditional
|
||||||
syn region qcComment start="/\*" end="\*/" contains=@qcCommentGroup,@Spell fold extend
|
hi def link qcRepeat Repeat
|
||||||
|
hi def link qcString String
|
||||||
|
hi def link qcSpecial SpecialChar
|
||||||
|
hi def link qcNumber Number
|
||||||
|
hi def link qcVector String
|
||||||
|
hi def link qcFrame Number
|
||||||
|
hi def link qcBuiltin PreProc
|
||||||
|
hi def link qcPragma PreProc
|
||||||
|
hi def link qcType Type
|
||||||
|
hi def link qcStorageClass StorageClass
|
||||||
|
hi def link qcStatement Statement
|
||||||
|
hi def link qcConstant Constant
|
||||||
|
|
||||||
" Match comments that start out of screen
|
hi def link qcTodo Todo
|
||||||
if !exists("quakec_minlines")
|
hi def link qcQuaked Label
|
||||||
let quakec_minlines = 10
|
hi def link qcLabel Label
|
||||||
endif
|
|
||||||
exec "syn sync ccomment qcComment minlines=" . quakec_minlines
|
|
||||||
|
|
||||||
|
|
||||||
" Define the default highlighting.
|
|
||||||
" Only used when an item doesn't have highlighting yet
|
|
||||||
if version >= 508 || !exists("did_quakec_syn_inits")
|
|
||||||
if version < 508
|
|
||||||
let did_quakec_syn_inits = 1
|
|
||||||
command -nargs=+ HiLink hi link <args>
|
|
||||||
else
|
|
||||||
command -nargs=+ HiLink hi def link <args>
|
|
||||||
endif
|
|
||||||
|
|
||||||
HiLink qcLineComment qcComment
|
|
||||||
HiLink qcComment Comment
|
|
||||||
HiLink qcString String
|
|
||||||
HiLink qcSpecial SpecialChar
|
|
||||||
HiLink qcNumber Number
|
|
||||||
HiLink qcVector String
|
|
||||||
HiLink qcFrame Number
|
|
||||||
HiLink qcBuiltin PreProc
|
|
||||||
HiLink qcPragma PreProc
|
|
||||||
HiLink qcType Type
|
|
||||||
HiLink qcStorageClass StorageClass
|
|
||||||
HiLink qcStatement Statement
|
|
||||||
HiLink qcConstant Constant
|
|
||||||
|
|
||||||
HiLink qcTodo Todo
|
|
||||||
HiLink qcQuaked Label
|
|
||||||
|
|
||||||
delcommand HiLink
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax = "quakec"
|
let b:current_syntax = "quakec"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user