" Vim syntax file
" Language: AutoHotkey script file
" Maintainer: Nikolai Weibull
" Latest Revision: 2008-06-22
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn case ignore
syn keyword autohotkeyTodo
\ contained
\ TODO FIXME XXX NOTE
syn cluster autohotkeyCommentGroup
\ contains=
\ autohotkeyTodo,
\ @Spell
syn match autohotkeyComment
\ display
\ contains=@autohotkeyCommentGroup
\ '`\@'
syn match autohotkeyInteger
\ contained
\ display
\ '0x\x\+\>'
syn match autohotkeyFloat
\ contained
\ display
\ '\d\+\.\d*\|\.\d\+\>'
syn keyword autohotkeyType
\ local
\ global
syn keyword autohotkeyBoolean
\ true
\ false
" TODO: Shouldn't we look for g:, b:, variables before defaulting to
" something?
if exists("g:autohotkey_syntax_sync_minlines")
let b:autohotkey_syntax_sync_minlines = g:autohotkey_syntax_sync_minlines
else
let b:autohotkey_syntax_sync_minlines = 50
endif
exec "syn sync ccomment autohotkeyComment minlines=" . b:autohotkey_syntax_sync_minlines
hi def link autohotkeyTodo Todo
hi def link autohotkeyComment Comment
hi def link autohotkeyCommentStart autohotkeyComment
hi def link autohotkeyEscape Special
hi def link autohotkeyHotkey Type
hi def link autohotkeyKey Type
hi def link autohotkeyDelimiter Delimiter
hi def link autohotkeyHotstringDefinition Type
hi def link autohotkeyHotstring Type
hi def link autohotkeyHotstringDelimiter autohotkeyDelimiter
hi def link autohotkeyHotstringOptions Special
hi def link autohotkeyString String
hi def link autohotkeyStringDelimiter autohotkeyString
hi def link autohotkeyVariable Identifier
hi def link autohotkeyVariableDelimiter autohotkeyVariable
hi def link autohotkeyBuiltinVariable Macro
hi def link autohotkeyCommand Keyword
hi def link autohotkeyFunction Function
hi def link autohotkeyStatement autohotkeyCommand
hi def link autohotkeyRepeat Repeat
hi def link autohotkeyConditional Conditional
hi def link autohotkeyPreProcStart PreProc
hi def link autohotkeyInclude Include
hi def link autohotkeyPreProc PreProc
hi def link autohotkeyMatchClass Typedef
hi def link autohotkeyNumber Number
hi def link autohotkeyInteger autohotkeyNumber
hi def link autohotkeyFloat autohotkeyNumber
hi def link autohotkeyType Type
hi def link autohotkeyBoolean Boolean
let b:current_syntax = "autohotkey"
let &cpo = s:cpo_save
unlet s:cpo_save