PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/syntax/autohotkey.vim

https://github.com/silentdragonz/vim
Vim Script | 278 lines | 237 code | 37 blank | 4 comment | 1 complexity | a34a17b3cd94a870235eb43c857c8d24 MD5 | raw file
  1. " Vim syntax file
  2. " Language: AutoHotkey script file
  3. " Maintainer: Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision: 2007-05-09
  5. if exists("b:current_syntax")
  6. finish
  7. endif
  8. let s:cpo_save = &cpo
  9. set cpo&vim
  10. syn case ignore
  11. syn keyword autohotkeyTodo
  12. \ contained
  13. \ TODO FIXME XXX NOTE
  14. syn cluster autohotkeyCommentGroup
  15. \ contains=
  16. \ autohotkeyTodo,
  17. \ @Spell
  18. syn match autohotkeyComment
  19. \ display
  20. \ contains=@autohotkeyCommentGroup
  21. \ '`\@<!;.*$'
  22. syn region autohotkeyComment
  23. \ contains=@autohotkeyCommentGroup
  24. \ matchgroup=autohotkeyCommentStart
  25. \ start='/\*'
  26. \ end='\*/'
  27. syn match autohotkeyEscape
  28. \ display
  29. \ '`.'
  30. syn match autohotkeyHotkey
  31. \ contains=autohotkeyKey,
  32. \ autohotkeyHotkeyDelimiter
  33. \ display
  34. \ '^.\{-}::'
  35. syn match autohotkeyKey
  36. \ contained
  37. \ display
  38. \ '^.\{-}'
  39. syn match autohotkeyDelimiter
  40. \ contained
  41. \ display
  42. \ '::'
  43. syn match autohotkeyHotstringDefinition
  44. \ contains=autohotkeyHotstring,
  45. \ autohotkeyHotstringDelimiter
  46. \ display
  47. \ '^:\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)*:.\{-}::'
  48. syn match autohotkeyHotstring
  49. \ contained
  50. \ display
  51. \ '.\{-}'
  52. syn match autohotkeyHotstringDelimiter
  53. \ contained
  54. \ display
  55. \ '::'
  56. syn match autohotkeyHotstringDelimiter
  57. \ contains=autohotkeyHotstringOptions
  58. \ contained
  59. \ display
  60. \ ':\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\):'
  61. syn match autohotkeyHotstringOptions
  62. \ contained
  63. \ display
  64. \ '\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)'
  65. syn region autohotkeyString
  66. \ display
  67. \ oneline
  68. \ matchgroup=autohotkeyStringDelimiter
  69. \ start=+"+
  70. \ end=+"+
  71. \ contains=autohotkeyEscape
  72. syn region autohotkeyVariable
  73. \ display
  74. \ oneline
  75. \ contains=autohotkeyBuiltinVariable
  76. \ matchgroup=autohotkeyVariableDelimiter
  77. \ start="%"
  78. \ end="%"
  79. \ keepend
  80. syn keyword autohotkeyBuiltinVariable
  81. \ A_Space A_Tab
  82. \ A_WorkingDir A_ScriptDir A_ScriptName A_ScriptFullPath A_LineNumber
  83. \ A_LineFile A_AhkVersion A_AhkPAth A_IsCompiled A_ExitReason
  84. \ A_YYYY A_MM A_DD A_MMMM A_MMM A_DDDD A_DDD A_WDay A_YWeek A_Hour A_Min
  85. \ A_Sec A_MSec A_Now A_NowUTC A_TickCount
  86. \ A_IsSuspended A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed
  87. \ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_STringCaseSense
  88. \ A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay
  89. \ A_MouseDelay A_DefaultMouseSpeed A_IconHidden A_IconTip A_IconFile
  90. \ A_IconNumber
  91. \ A_TimeIdle A_TimeIdlePhysical
  92. \ A_Gui A_GuiControl A_GuiWidth A_GuiHeight A_GuiX A_GuiY A_GuiEvent
  93. \ A_GuiControlEvent A_EventInfo
  94. \ A_ThisMenuItem A_ThisMenu A_ThisMenuItemPos A_ThisHotkey A_PriorHotkey
  95. \ A_TimeSinceThisHotkey A_TimeSincePriorHotkey A_EndChar
  96. \ ComSpec A_Temp A_OSType A_OSVersion A_Language A_ComputerName A_UserName
  97. \ A_WinDir A_ProgramFiles ProgramFiles A_AppData A_AppDataCommon A_Desktop
  98. \ A_DesktopCommon A_StartMenu A_StartMenuCommon A_Programs
  99. \ A_ProgramsCommon A_Startup A_StartupCommon A_MyDocuments A_IsAdmin
  100. \ A_ScreenWidth A_ScreenHeight A_IPAddress1 A_IPAddress2 A_IPAddress3
  101. \ A_IPAddress4
  102. \ A_Cursor A_CaretX A_CaretY Clipboard ClipboardAll ErrorLevel A_LastError
  103. \ A_Index A_LoopFileName A_LoopRegName A_LoopReadLine A_LoopField
  104. syn match autohotkeyBuiltinVariable
  105. \ contained
  106. \ display
  107. \ '%\d\+%'
  108. syn keyword autohotkeyCommand
  109. \ ClipWait EnvGet EnvSet EnvUpdate
  110. \ Drive DriveGet DriveSpaceFree FileAppend FileCopy FileCopyDir
  111. \ FileCreateDir FileCreateShortcut FileDelete FileGetAttrib
  112. \ FileGetShortcut FileGetSize FileGetTime FileGetVersion FileInstall
  113. \ FileMove FileMoveDir FileReadLine FileRead FileRecycle FileRecycleEmpty
  114. \ FileRemoveDir FileSelectFolder FileSelectFile FileSetAttrib FileSetTime
  115. \ IniDelete IniRead IniWrite SetWorkingDir
  116. \ SplitPath
  117. \ Gui GuiControl GuiControlGet IfMsgBox InputBox MsgBox Progress
  118. \ SplashImage SplashTextOn SplashTextOff ToolTip TrayTip
  119. \ Hotkey ListHotkeys BlockInput ControlSend ControlSendRaw GetKeyState
  120. \ KeyHistory KeyWait Input Send SendRaw SendInput SendPlay SendEvent
  121. \ SendMode SetKeyDelay SetNumScrollCapsLockState SetStoreCapslockMode
  122. \ EnvAdd EnvDiv EnvMult EnvSub Random SetFormat Transform
  123. \ AutoTrim BlockInput CoordMode Critical Edit ImageSearch
  124. \ ListLines ListVars Menu OutputDebug PixelGetColor PixelSearch
  125. \ SetBatchLines SetEnv SetTimer SysGet Thread Transform URLDownloadToFile
  126. \ Click ControlClick MouseClick MouseClickDrag MouseGetPos MouseMove
  127. \ SetDefaultMouseSpeed SetMouseDelay
  128. \ Process Run RunWait RunAs Shutdown Sleep
  129. \ RegDelete RegRead RegWrite
  130. \ SoundBeep SoundGet SoundGetWaveVolume SoundPlay SoundSet
  131. \ SoundSetWaveVolume
  132. \ FormatTime IfInString IfNotInString Sort StringCaseSense StringGetPos
  133. \ StringLeft StringRight StringLower StringUpper StringMid StringReplace
  134. \ StringSplit StringTrimLeft StringTrimRight
  135. \ Control ControlClick ControlFocus ControlGet ControlGetFocus
  136. \ ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw
  137. \ ControlSetText Menu PostMessage SendMessage SetControlDelay
  138. \ WinMenuSelectItem GroupActivate GroupAdd GroupClose GroupDeactivate
  139. \ DetectHiddenText DetectHiddenWindows SetTitleMatchMode SetWinDelay
  140. \ StatusBarGetText StatusBarWait WinActivate WinActivateBottom WinClose
  141. \ WinGet WinGetActiveStats WinGetActiveTitle WinGetClass WinGetPos
  142. \ WinGetText WinGetTitle WinHide WinKill WinMaximize WinMinimize
  143. \ WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet
  144. \ WinSetTitle WinShow WinWait WinWaitActive WinWaitNotActive WinWaitClose
  145. syn keyword autohotkeyFunction
  146. \ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr
  147. \ DllCall VarSetCapacity WinActive WinExist IsLabel OnMessage
  148. \ Abs Ceil Exp Floor Log Ln Mod Round Sqrt Sin Cos Tan ASin ACos ATan
  149. \ FileExist GetKeyState
  150. syn keyword autohotkeyStatement
  151. \ Break Continue Exit ExitApp Gosub Goto OnExit Pause Return
  152. \ Suspend Reload
  153. syn keyword autohotkeyRepeat
  154. \ Loop
  155. syn keyword autohotkeyConditional
  156. \ IfExist IfNotExist If IfEqual IfLess IfGreater Else
  157. syn match autohotkeyPreProcStart
  158. \ nextgroup=
  159. \ autohotkeyInclude,
  160. \ autohotkeyPreProc
  161. \ skipwhite
  162. \ display
  163. \ '^\s*\zs#'
  164. syn keyword autohotkeyInclude
  165. \ contained
  166. \ Include
  167. \ IncludeAgain
  168. syn keyword autohotkeyPreProc
  169. \ contained
  170. \ HotkeyInterval HotKeyModifierTimeout
  171. \ Hotstring
  172. \ IfWinActive IfWinNotActive IfWinExist IfWinNotExist
  173. \ MaxHotkeysPerInterval MaxThreads MaxThreadsBuffer MaxThreadsPerHotkey
  174. \ UseHook InstallKeybdHook InstallMouseHook
  175. \ KeyHistory
  176. \ NoTrayIcon SingleInstance
  177. \ WinActivateForce
  178. \ AllowSameLineComments
  179. \ ClipboardTimeout
  180. \ CommentFlag
  181. \ ErrorStdOut
  182. \ EscapeChar
  183. \ MaxMem
  184. \ NoEnv
  185. \ Persistent
  186. syn keyword autohotkeyMatchClass
  187. \ ahk_group ahk_class ahk_id ahk_pid
  188. syn match autohotkeyNumbers
  189. \ display
  190. \ transparent
  191. \ contains=
  192. \ autohotkeyInteger,
  193. \ autohotkeyFloat
  194. \ '\<\d\|\.\d'
  195. syn match autohotkeyInteger
  196. \ contained
  197. \ display
  198. \ '\d\+\>'
  199. syn match autohotkeyInteger
  200. \ contained
  201. \ display
  202. \ '0x\x\+\>'
  203. syn match autohotkeyFloat
  204. \ contained
  205. \ display
  206. \ '\d\+\.\d*\|\.\d\+\>'
  207. syn keyword autohotkeyType
  208. \ local
  209. \ global
  210. hi def link autohotkeyTodo Todo
  211. hi def link autohotkeyComment Comment
  212. hi def link autohotkeyCommentStart autohotkeyComment
  213. hi def link autohotkeyEscape Special
  214. hi def link autohotkeyHotkey Type
  215. hi def link autohotkeyKey Type
  216. hi def link autohotkeyDelimiter Delimiter
  217. hi def link autohotkeyHotstringDefinition Type
  218. hi def link autohotkeyHotstring Type
  219. hi def link autohotkeyHotstringDelimiter autohotkeyDelimiter
  220. hi def link autohotkeyHotstringOptions Special
  221. hi def link autohotkeyString String
  222. hi def link autohotkeyStringDelimiter autohotkeyString
  223. hi def link autohotkeyVariable Identifier
  224. hi def link autohotkeyVariableDelimiter autohotkeyVariable
  225. hi def link autohotkeyBuiltinVariable Macro
  226. hi def link autohotkeyCommand Keyword
  227. hi def link autohotkeyFunction Function
  228. hi def link autohotkeyStatement autohotkeyCommand
  229. hi def link autohotkeyRepeat Repeat
  230. hi def link autohotkeyConditional Conditional
  231. hi def link autohotkeyPreProcStart PreProc
  232. hi def link autohotkeyInclude Include
  233. hi def link autohotkeyPreProc PreProc
  234. hi def link autohotkeyMatchClass Typedef
  235. hi def link autohotkeyNumber Number
  236. hi def link autohotkeyInteger autohotkeyNumber
  237. hi def link autohotkeyFloat autohotkeyNumber
  238. hi def link autohotkeyType Type
  239. let b:current_syntax = "autohotkey"
  240. let &cpo = s:cpo_save
  241. unlet s:cpo_save