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