annotate runtime/syntax/autohotkey.vim @ 33776:9503dc55b5ed v9.0.2108

patch 9.0.2108: [security]: overflow with count for :s command Commit: https://github.com/vim/vim/commit/ac63787734fda2e294e477af52b3bd601517fa78 Author: Christian Brabandt <cb@256bit.org> Date: Tue Nov 14 20:45:48 2023 +0100 patch 9.0.2108: [security]: overflow with count for :s command Problem: [security]: overflow with count for :s command Solution: Abort the :s command if the count is too large If the count after the :s command is larger than what fits into a (signed) long variable, abort with e_value_too_large. Adds a test with INT_MAX as count and verify it correctly fails. It seems the return value on Windows using mingw compiler wraps around, so the initial test using :s/./b/9999999999999999999999999990 doesn't fail there, since the count is wrapping around several times and finally is no longer larger than 2147483647. So let's just use 2147483647 in the test, which hopefully will always cause a failure Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 16 Nov 2023 22:15:10 +0100
parents 34c1f4cd0c18
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
1 " Vim syntax file
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
2 " Language: AutoHotkey script file
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
3 " Maintainer: Michael Wong
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
4 " https://github.com/mmikeww/autohotkey.vim
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
5 " Latest Revision: 2022-07-25
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
6 " Previous Maintainers: SungHyun Nam <goweol@gmail.com>
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
7 " Nikolai Weibull <now@bitwi.se>
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
8
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
9 if exists("b:current_syntax")
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
10 finish
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
11 endif
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
12
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
13 let s:cpo_save = &cpo
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
14 set cpo&vim
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
15
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
16 syn case ignore
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
17
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
18 syn keyword autohotkeyTodo
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
19 \ contained
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
20 \ TODO FIXME XXX NOTE
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
21
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
22 " only these chars are valid as escape sequences: ,%`;nrbtvaf
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
23 " https://autohotkey.com/docs/commands/_EscapeChar.htm
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
24 syn match autohotkeyEscape
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
25 \ display
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
26 \ '`[,%`;nrbtvaf]'
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
27
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
28 syn region autohotkeyString
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
29 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
30 \ oneline
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
31 \ matchgroup=autohotkeyStringDelimiter
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
32 \ start=+"+
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
33 \ end=+"+
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
34 \ contains=autohotkeyEscape,autohotkeyMatchClass
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
35
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
36 syn match autohotkeyVariable
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
37 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
38 \ oneline
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
39 \ contains=autohotkeyBuiltinVariable
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
40 \ keepend
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
41 \ '%\S\{-}%'
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
42
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
43 syn keyword autohotkeyBuiltinVariable
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
44 \ A_Space A_Tab
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
45 \ A_WorkingDir A_ScriptDir A_ScriptName A_ScriptFullPath A_ScriptHwnd A_LineNumber
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
46 \ A_LineFile A_ThisFunc A_ThisLabel A_AhkVersion A_AhkPath A_IsUnicode A_IsCompiled A_ExitReason
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
47 \ A_YYYY A_MM A_DD A_MMMM A_MMM A_DDDD A_DDD A_WDay A_YDay A_YWeek A_Hour A_Min
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
48 \ A_Mon A_Year A_MDay A_NumBatchLines
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
49 \ A_Sec A_MSec A_Now A_NowUTC A_TickCount
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
50 \ A_IsSuspended A_IsPaused A_IsCritical A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
51 \ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_StringCaseSense
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
52 \ A_FileEncoding A_FormatInteger A_FormatFloat A_WinDelay A_ControlDelay
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
53 \ A_SendMode A_SendLevel A_StoreCapsLockMode A_KeyDelay A_KeyDuration
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
54 \ A_KeyDelayPlay A_KeyDurationPlay A_MouseDelayPlay
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
55 \ A_MouseDelay A_DefaultMouseSpeed A_RegView A_IconHidden A_IconTip A_IconFile
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
56 \ A_CoordModeToolTip A_CoordModePixel A_CoordModeMouse A_CoordModeCaret A_CoordModeMenu
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
57 \ A_IconNumber
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
58 \ A_TimeIdle A_TimeIdlePhysical A_DefaultGui A_DefaultListView A_DefaultTreeView
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
59 \ A_Gui A_GuiControl A_GuiWidth A_GuiHeight A_GuiX A_GuiY A_GuiEvent
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
60 \ A_GuiControlEvent A_EventInfo
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
61 \ A_ThisMenuItem A_ThisMenu A_ThisMenuItemPos A_ThisHotkey A_PriorHotkey
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
62 \ A_PriorKey A_TimeSinceThisHotkey A_TimeSincePriorHotkey A_EndChar
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
63 \ ComSpec A_Temp A_OSType A_OSVersion A_Language A_ComputerName A_UserName
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
64 \ A_Is64BitOS A_PtrSize
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
65 \ A_WinDir A_ProgramFiles ProgramFiles A_AppData A_AppDataCommon A_Desktop
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
66 \ A_DesktopCommon A_StartMenu A_StartMenuCommon A_Programs
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
67 \ A_ProgramsCommon A_Startup A_StartupCommon A_MyDocuments A_IsAdmin
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
68 \ A_ScreenWidth A_ScreenHeight A_ScreenDPI A_IPAddress1 A_IPAddress2 A_IPAddress3
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
69 \ A_IPAddress4
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
70 \ A_Cursor A_CaretX A_CaretY Clipboard ClipboardAll ErrorLevel A_LastError
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
71 \ A_Index A_LoopFileName A_LoopRegName A_LoopReadLine A_LoopField
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
72 \ A_LoopFileExt A_LoopFileFullPath A_LoopFileLongPath A_LoopFileShortPath
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
73 \ A_LoopFileShortName A_LoopFileDir A_LoopFileTimeModified A_LoopFileTimeCreated
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
74 \ A_LoopFileTimeAccessed A_LoopFileAttrib A_LoopFileSize A_LoopFileSizeKB A_LoopFileSizeMB
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
75 \ A_LoopRegType A_LoopRegKey A_LoopRegSubKey A_LoopRegTimeModified
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
76 \ A_TimeIdleKeyboard A_TimeIdleMouse A_ListLines A_ComSpec A_LoopFilePath A_Args
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
77
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
78 syn match autohotkeyBuiltinVariable
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
79 \ contained
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
80 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
81 \ '%\d\+%'
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
82
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
83 syn keyword autohotkeyCommand
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
84 \ ClipWait EnvGet EnvSet EnvUpdate
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
85 \ Drive DriveGet DriveSpaceFree FileAppend FileCopy FileCopyDir
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
86 \ FileCreateDir FileCreateShortcut FileDelete FileGetAttrib FileEncoding
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
87 \ FileGetShortcut FileGetSize FileGetTime FileGetVersion FileInstall
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
88 \ FileMove FileMoveDir FileReadLine FileRead FileRecycle FileRecycleEmpty
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
89 \ FileRemoveDir FileSelectFolder FileSelectFile FileSetAttrib FileSetTime
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
90 \ IniDelete IniRead IniWrite SetWorkingDir
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
91 \ SplitPath
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
92 \ Gui GuiControl GuiControlGet IfMsgBox InputBox MsgBox Progress
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
93 \ SplashImage SplashTextOn SplashTextOff ToolTip TrayTip
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
94 \ Hotkey ListHotkeys BlockInput ControlSend ControlSendRaw GetKeyState
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
95 \ KeyHistory KeyWait Input Send SendRaw SendInput SendPlay SendEvent
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
96 \ SendMode SetKeyDelay SetNumScrollCapsLockState SetStoreCapslockMode
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
97 \ EnvAdd EnvDiv EnvMult EnvSub Random SetFormat Transform
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
98 \ AutoTrim BlockInput CoordMode Critical Edit ImageSearch
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
99 \ ListLines ListVars Menu OutputDebug PixelGetColor PixelSearch
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
100 \ SetBatchLines SetEnv SetTimer SysGet Thread Transform URLDownloadToFile
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
101 \ Click ControlClick MouseClick MouseClickDrag MouseGetPos MouseMove
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
102 \ SetDefaultMouseSpeed SetMouseDelay
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
103 \ Process Run RunWait RunAs Shutdown Sleep
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
104 \ RegDelete RegRead RegWrite
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
105 \ SoundBeep SoundGet SoundGetWaveVolume SoundPlay SoundSet
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
106 \ SoundSetWaveVolume
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
107 \ FormatTime IfInString IfNotInString Sort StringCaseSense StringGetPos
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
108 \ StringLeft StringRight StringLower StringUpper StringMid StringReplace
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
109 \ StringSplit StringTrimLeft StringTrimRight StringLen
11347
4aae8146c21f Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10734
diff changeset
110 \ StrSplit StrReplace Throw
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
111 \ Control ControlClick ControlFocus ControlGet ControlGetFocus
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
112 \ ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
113 \ ControlSetText Menu PostMessage SendMessage SetControlDelay
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
114 \ WinMenuSelectItem GroupActivate GroupAdd GroupClose GroupDeactivate
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
115 \ DetectHiddenText DetectHiddenWindows SetTitleMatchMode SetWinDelay
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
116 \ StatusBarGetText StatusBarWait WinActivate WinActivateBottom WinClose
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
117 \ WinGet WinGetActiveStats WinGetActiveTitle WinGetClass WinGetPos
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
118 \ WinGetText WinGetTitle WinHide WinKill WinMaximize WinMinimize
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
119 \ WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
120 \ WinSetTitle WinShow WinWait WinWaitActive WinWaitNotActive WinWaitClose
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
121 \ SetCapsLockState SetNumLockState SetScrollLockState
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
122 \ Hotstring LoadPicture MenuGetHandle MenuGetName OnError OnClipboardChange
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
123
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
124 syn keyword autohotkeyFunction
11347
4aae8146c21f Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10734
diff changeset
125 \ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr Func
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
126 \ DllCall VarSetCapacity WinActive WinExist IsLabel OnMessage
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
127 \ Abs Ceil Exp Floor Log Ln Mod Round Sqrt Sin Cos Tan ASin ACos ATan
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
128 \ FileExist GetKeyState NumGet NumPut StrGet StrPut RegisterCallback
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
129 \ IsFunc Trim LTrim RTrim IsObject Object Array FileOpen
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
130 \ ComObjActive ComObjArray ComObjConnect ComObjCreate ComObjGet
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
131 \ ComObjError ComObjFlags ComObjQuery ComObjType ComObjValue ComObject
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
132 \ Format Exception Ord InputHook
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
133
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
134 syn keyword autohotkeyStatement
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
135 \ Break Continue Exit ExitApp Gosub Goto OnExit Pause Return
11347
4aae8146c21f Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10734
diff changeset
136 \ Suspend Reload new class extends
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
137
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
138 syn keyword autohotkeyRepeat
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
139 \ Loop
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
140
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
141 syn keyword autohotkeyConditional
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
142 \ IfExist IfNotExist If IfEqual IfLess IfGreater Else
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
143 \ IfWinExist IfWinNotExist IfWinActive IfWinNotActive
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
144 \ IfNotEqual IfLessOrEqual IfGreaterOrEqual
29533
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
145 \ while until for in try catch finally not
34c1f4cd0c18 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11347
diff changeset
146 \ switch case default
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
147
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
148 syn match autohotkeyPreProcStart
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
149 \ nextgroup=
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
150 \ autohotkeyInclude,
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
151 \ autohotkeyPreProc
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
152 \ skipwhite
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
153 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
154 \ '^\s*\zs#'
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
155
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
156 syn keyword autohotkeyInclude
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
157 \ contained
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
158 \ Include
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
159 \ IncludeAgain
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
160
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
161 syn keyword autohotkeyPreProc
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
162 \ contained
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
163 \ HotkeyInterval HotKeyModifierTimeout
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
164 \ Hotstring
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
165 \ IfWinActive IfWinNotActive IfWinExist IfWinNotExist
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
166 \ If IfTimeout
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
167 \ MaxHotkeysPerInterval MaxThreads MaxThreadsBuffer MaxThreadsPerHotkey
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
168 \ UseHook InstallKeybdHook InstallMouseHook
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
169 \ KeyHistory
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
170 \ NoTrayIcon SingleInstance
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
171 \ WinActivateForce
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
172 \ AllowSameLineComments
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
173 \ ClipboardTimeout
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
174 \ CommentFlag
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
175 \ ErrorStdOut
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
176 \ EscapeChar
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
177 \ MaxMem
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
178 \ NoEnv
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
179 \ Persistent
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
180 \ LTrim
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
181 \ InputLevel
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
182 \ MenuMaskKey
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
183 \ Warn
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
184
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
185 syn keyword autohotkeyMatchClass
11347
4aae8146c21f Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10734
diff changeset
186 \ ahk_group ahk_class ahk_id ahk_pid ahk_exe
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
188 syn match autohotkeyNumbers
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
189 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
190 \ transparent
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
191 \ contains=
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
192 \ autohotkeyInteger,
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
193 \ autohotkeyFloat
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
194 \ '\<\d\|\.\d'
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
195
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
196 syn match autohotkeyInteger
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
197 \ contained
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
198 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
199 \ '\d\+\>'
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
200
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
201 syn match autohotkeyInteger
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
202 \ contained
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
203 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
204 \ '0x\x\+\>'
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
205
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
206 syn match autohotkeyFloat
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
207 \ contained
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
208 \ display
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
209 \ '\d\+\.\d*\|\.\d\+\>'
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
210
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
211 syn keyword autohotkeyType
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
212 \ local
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
213 \ global
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
214 \ static
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
215 \ byref
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
216
1618
46bbe11644e0 updated for version 7.2a
vimboss
parents: 1187
diff changeset
217 syn keyword autohotkeyBoolean
46bbe11644e0 updated for version 7.2a
vimboss
parents: 1187
diff changeset
218 \ true
46bbe11644e0 updated for version 7.2a
vimboss
parents: 1187
diff changeset
219 \ false
46bbe11644e0 updated for version 7.2a
vimboss
parents: 1187
diff changeset
220
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
221 syn match autohotkeyHotkey
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
222 \ contains=autohotkeyKey,
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
223 \ autohotkeyHotkeyDelimiter
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
224 \ display
11347
4aae8146c21f Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10734
diff changeset
225 \ '^\s*\S*\%( Up\)\?::'
10734
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
226
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
227 syn match autohotkeyKey
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
228 \ contained
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
229 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
230 \ '^.\{-}'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
231
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
232 syn match autohotkeyDelimiter
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
233 \ contained
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
234 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
235 \ '::'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
236
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
237 " allowable hotstring options:
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
238 " https://autohotkey.com/docs/Hotstrings.htm
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
239 syn match autohotkeyHotstringDefinition
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
240 \ contains=autohotkeyHotstring,
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
241 \ autohotkeyHotstringDelimiter
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
242 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
243 \ '^\s*:\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*:.\{-}::'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
244
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
245 syn match autohotkeyHotstring
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
246 \ contained
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
247 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
248 \ '.\{-}'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
249
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
250 syn match autohotkeyHotstringDelimiter
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
251 \ contained
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
252 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
253 \ '::'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
254
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
255 syn match autohotkeyHotstringDelimiter
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
256 \ contains=autohotkeyHotstringOptions
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
257 \ contained
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
258 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
259 \ ':\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*:'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
260
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
261 syn match autohotkeyHotstringOptions
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
262 \ contained
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
263 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
264 \ '\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
265
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
266 syn cluster autohotkeyCommentGroup
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
267 \ contains=
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
268 \ autohotkeyTodo,
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
269 \ @Spell
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
270
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
271 syn match autohotkeyComment
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
272 \ display
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
273 \ contains=@autohotkeyCommentGroup
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
274 \ '\%(^;\|\s\+;\).*$'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
275
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
276 syn region autohotkeyComment
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
277 \ contains=@autohotkeyCommentGroup
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
278 \ matchgroup=autohotkeyCommentStart
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
279 \ start='^\s*/\*'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
280 \ end='^\s*\*/'
523cd59d6db0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 7183
diff changeset
281
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
282 " TODO: Shouldn't we look for g:, b:, variables before defaulting to
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
283 " something?
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
284 if exists("g:autohotkey_syntax_sync_minlines")
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
285 let b:autohotkey_syntax_sync_minlines = g:autohotkey_syntax_sync_minlines
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
286 else
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
287 let b:autohotkey_syntax_sync_minlines = 50
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
288 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
289 exec "syn sync ccomment autohotkeyComment minlines=" . b:autohotkey_syntax_sync_minlines
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
290
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
291 hi def link autohotkeyTodo Todo
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
292 hi def link autohotkeyComment Comment
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
293 hi def link autohotkeyCommentStart autohotkeyComment
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
294 hi def link autohotkeyEscape Special
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
295 hi def link autohotkeyHotkey Type
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
296 hi def link autohotkeyKey Type
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
297 hi def link autohotkeyDelimiter Delimiter
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
298 hi def link autohotkeyHotstringDefinition Type
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
299 hi def link autohotkeyHotstring Type
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
300 hi def link autohotkeyHotstringDelimiter autohotkeyDelimiter
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
301 hi def link autohotkeyHotstringOptions Special
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
302 hi def link autohotkeyString String
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
303 hi def link autohotkeyStringDelimiter autohotkeyString
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
304 hi def link autohotkeyVariable Identifier
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
305 hi def link autohotkeyVariableDelimiter autohotkeyVariable
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
306 hi def link autohotkeyBuiltinVariable Macro
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
307 hi def link autohotkeyCommand Keyword
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
308 hi def link autohotkeyFunction Function
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
309 hi def link autohotkeyStatement autohotkeyCommand
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
310 hi def link autohotkeyRepeat Repeat
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
311 hi def link autohotkeyConditional Conditional
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
312 hi def link autohotkeyPreProcStart PreProc
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
313 hi def link autohotkeyInclude Include
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
314 hi def link autohotkeyPreProc PreProc
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
315 hi def link autohotkeyMatchClass Typedef
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
316 hi def link autohotkeyNumber Number
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
317 hi def link autohotkeyInteger autohotkeyNumber
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
318 hi def link autohotkeyFloat autohotkeyNumber
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
319 hi def link autohotkeyType Type
1618
46bbe11644e0 updated for version 7.2a
vimboss
parents: 1187
diff changeset
320 hi def link autohotkeyBoolean Boolean
1187
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
321
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
322 let b:current_syntax = "autohotkey"
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
323
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
324 let &cpo = s:cpo_save
f89c43568067 updated for version 7.1b
vimboss
parents:
diff changeset
325 unlet s:cpo_save