A try for AHK Sublime Text

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
FredOoo
Posts: 186
Joined: 07 May 2019, 21:58
Location: Paris

A try for AHK Sublime Text

17 Jun 2019, 06:28

Comments are sometime to unactivat code (grey), sometime to explain code (green).
img_comments.png
img_comments.png (6.03 KiB) Viewed 1513 times
String escapes:
img_strings_and_escapes.png
img_strings_and_escapes.png (12.18 KiB) Viewed 1513 times
Colorize types is usefull in unreadable dllCall:
img_types.png
img_types.png (12.53 KiB) Viewed 1513 times
Flow control is better when highly visible

Comparison operators are almost flow control:


Trocadero.tmLanguage

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
	FredOoo: AHK_Trocadero
 -->
<plist version="1.0">
<dict>
<!-- 	Global settings
 -->
	<key>fileTypes</key>
	<array>
		<string>ahk</string>
	</array>
	<key>name</key>
		<string>AHK_Trocadero</string>
	<key>scopeName</key>
		<string>source.ahk</string>
	<key>uuid</key>
		<string>77AC23B6-8A90-11D9-BAA4-000A9584EC8D</string>

<!-- 	Language syntaxe
 -->
	<key>patterns</key>
	<array>

	<!-- Comments -->
		<dict>
			<key>captures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.ahk</string>
					</dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>comment.shebang.ahk</string>
					</dict>
				</dict>
			<key>match</key>
			<string>^(;)(#\!)</string>
			<key>name</key>      <!-- shebang -->
			<string>comment.directive.shebang.ahk</string>
		</dict>
		<dict><!-- comment.line.stronger.ahk -->
			<key>captures</key>
				<dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.ahk</string>
					</dict>
					<key>3</key>
					<dict>
						<key>name</key><!-- line.stronger -->
						<string>comment.line.stronger.ahk</string>
					</dict>
				</dict>
			<key>match</key>
			<string>(^\s*|\s+)(;;)(.*)$</string>
			<key>name</key>
			<string>comment.line.ahk</string>
		</dict>
		<dict><!-- comment.line.ahk -->
			<key>captures</key>
				<dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.ahk</string>
					</dict>
					<key>3</key>
					<dict>
						<key>name</key>
						<string>comment.line.ahk</string>
					</dict>
				</dict>
			<key>match</key>
			<string>(^\s*|\s+)(;)(.*)$</string>
			<key>name</key>
			<string>comment.line.ahk</string>
		</dict>
		<dict><!-- comment.block.stronger.ahk -->
			<key>begin</key>
			<string>^(/\*\*)</string>
			<key>beginCaptures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.ahk</string>
					</dict>
				</dict>
			<key>end</key>
			<string>^.*(\*/)</string>
			<key>endCaptures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.ahk</string>
					</dict>
				</dict>
			<key>name</key>
			<string>comment.block.stronger.ahk</string>
		</dict>
		<dict><!-- comment.block.ahk -->
			<key>begin</key>
			<string>^(/\*)</string>
			<key>beginCaptures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.ahk</string>
					</dict>
				</dict>
			<key>end</key>
			<string>^.*(\*/)</string>
			<key>endCaptures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.comment.ahk</string>
					</dict>
				</dict>
			<key>name</key>
			<string>comment.block.ahk</string>
		</dict>

	<!-- Functions, arguments, labels, hotkeys -->
		<dict>
			<key>captures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>entity.name.function.ahk</string>
					</dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>punctuation.bracket.parenthesis.ahk</string>
					</dict>
					<key>3</key>
					<dict>
						<key>name</key><!-- (.*) -->
						<string>string.function.arguments.ahk</string>
					</dict>
					<key>4</key>
					<dict>
						<key>name</key>
						<string>punctuation.bracket.parenthesis.ahk</string>
					</dict>
					<key>5</key>
					<dict>
						<key>name</key>
						<string>punctuation.bracket.curly.ahk</string>
					</dict>
					<key>6</key>
					<dict>
						<key>name</key>
						<string>comment.line.semicolon.functionline.ahk</string>
					</dict>
				</dict>
			<key>match</key>
			<string>^(?i)\s*((?!if|while)\w+)(\()(.*)(\))\s*({)</string><!-- endOff: \s*(;?.*)$ -->
			       <!-- try: (?:(.*[^=])\s*(=\.,?)?) -->
			<key>name</key>
			<string>functionline.ahk</string>
		</dict>

	<!-- hotkeyline -->
		<dict>
			<key>captures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>entity.name.function.label.ahk</string>
					</dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.equals.colon</string>
					</dict>
				</dict>
			<key>match</key>
			<string>^\s*(.[^\s]+)(::)</string>
			<key>name</key>
			<string>hotkeyline.ahk</string>
		</dict>

		<dict>
			<key>captures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>entity.name.function.label.ahk</string>
					</dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>punctuation.colon.ahk</string>
					</dict>
					<key>3</key>
					<dict>
						<key>name</key>
						<string>comment.line.semicolon.label.ahk</string>
					</dict>
				</dict>
			<key>match</key>
			<string>^\s*(\w+)(:(?!:|=))</string><!-- ^\s*(\w+)(:)\s*(;.*)?$ -->
			<key>name</key>
			<string>labelline.ahk</string>
		</dict>

	<!-- Operators -->
        <dict>
            <key>match</key>
            <string>(:|\.|\+|-|\*|/|//|\||&amp;|\^|&lt;&lt;|&gt;&gt;)=|(\+\+|--)</string>
            <key>name</key>
            <string>keyword.operator.assignment.ahk</string>
        </dict>
		<dict>
			<key>match</key>
			<string>\+|-|/|//|\*|\.</string>
			<key>name</key>
			<string>keyword.operator.arithmetic.ahk</string>
		</dict>
		<dict>
			<key>match</key>
			<string>&amp;(?!&amp;|\s)</string>
			<key>name</key>
			<string>keyword.operator.address.ahk</string>
		</dict>
		<dict>
			<key>match</key>
			<string>&amp;(?!&amp;)|\|(?!\|)|\^|&lt;&lt;|&gt;&gt;</string>
			<key>name</key>
			<string>keyword.operator.bits.ahk</string>
		</dict>
		<dict>
			<key>match</key>
			<string>=|/|==|!=|~|&lt;|&gt;|&lt;&gt;|&amp;&amp;|\|\||!|[^\w]not[^\w]|[^\w]or[^\w]|[^\w]and[^\w]|:(?!:)|\?</string>
			<key>name</key>
			<string>keyword.operator.comparison.ahk</string>
		</dict>

	<!-- keywords -->
		<dict>
			<key>captures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>keyword.control.import.ahk</string>
					</dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>keyword.directives.ahk</string>
					</dict>
					<key>3</key>
					<dict>
						<key>name</key>
						<string>entity.name.section.namespace.ahk</string>
					</dict>
					<key>4</key>
					<dict>
						<key>name</key>
						<string>comment.line.semicolon.label.ahk</string>
					</dict>
				</dict>
			<key>match</key>
			<string>^\s*(#)((?i:includeagain|include))\s+(.*?)</string>
			<key>name</key><!-- \s*(;.*)?$ -->
			<string>importline.ahk</string>
		</dict>

		<dict>
			<key>captures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>keyword.control.ahk</string>
					</dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>keyword.directives.ahk</string>
					</dict>
					<key>3</key>
					<dict>
						<key>name</key>
						<!-- <string>keyword.operator</string> -->
						<string>string.ahk</string>
					</dict>
					<key>4</key>
					<dict>
						<key>name</key>
						<string>comment.line.semicolon.label.ahk</string>
					</dict>
				</dict>
			<key>match</key>
			<string>^\s*(#)((?i:singleinstance|Warn|allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|iftimeout|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|if|inputlevel|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreadsbuffer|maxthreadsperhotkey|maxthreads|menumaskkey|noenv|notrayicon|persistent|usehook|winactivateforce)),*?\s*?(.*?)</string>
			<key>name</key><!-- \s*(;.*)?$ -->
			<string>preprocessordirective.ahk</string>
		</dict>

		<dict>
			<key>match</key>
			<string>\b(?i:Gui|Menu|IniFile|File|Object|Array|Text|Picture|Pic|GroupBox|Button|CheckBox|Radio|DropDownlist|ddl|ComboBox|ListBox|ListView|DateTime|monthcal|updown|Slider|Tab|Tab2|StatusBar|TreeView|autotrim|blockinput|click|clipwait|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|detecthiddentext|detecthiddenwindows|driveget|drivespacefree|drive|edit|envadd|envdiv|envget|envmult|envset|envsub|envupdate|fileappend|filecopydir|filecopy|filecreatedir|filecreateshortcut|filedelete|fileencoding|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemovedir|filemove|filereadline|fileread|filerecycleempty|filerecycle|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|groupactivate|groupadd|groupclose|groupdeactivate|guicontrol|guicontrolget|hotkey|imagesearch|inidelete|iniread|iniwrite|inputbox|input|keyhistory|keywait|listhotkeys|listlines|listvars|mouseclickdrag|mouseclick|mousegetpos|mousemove|msgbox|onExit|onMessage|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|run|runas|runwait|sendevent|sendinput|sendlevel|sendmessage|sendmode|sendplay|sendraw|send|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|setregview|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundgetwavevolume|soundget|soundplay|soundsetwavevolume|soundset|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|winactivatebottom|winactivate|winclose|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winget|winhide|winkill|winmaximize|winmenuselectitem|winminimizeallundo|winminimizeall|winminimize|winmove|winrestore|winsettitle|winset|winshow|winwaitactive|winwaitclose|winwaitnotactive|winwait)\b</string>
			<key>name</key>
			<string>support.function.ahk</string>
		</dict>
		<dict><!-- Keyword - Functions -->
			<key>match</key>
			<string>\b(?i:abs|acos|asc|sin|asin|atan|ceil|chr|cos|comobjcreate|comobjactive|comobjarray|comobjconnect|comobjenwrap|comobjerror|comobjflags|comobjget|comobjmissing|comobjparameter|comobjquery|comobjtype|comobjunwrap|comobjvalue|dllcall|exp|fileexist|fileopen|floor|format|func|getkeyname|getkeyvk|getkeysc|getkeystate|il_add|il_create|il_destroy|instr|isbyref|isfunc|islabel|isobject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modifycol|lv_modify|lv_setimagelist|mod|numget|numput|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sqrt|strget|strLen|strput|strsplit|strreplace|subStr|tan|trim|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)(?=\()\b</string>
			<key>name</key>
			<string>support.function.ahk</string>
		</dict>
		<dict><!-- Keyword - Object.Method -->
			<key>match</key>
			<string>\b(?&lt;=\.)(?i:read|write|readline|writeline|readuint|readint|readint64|readshort|readushort|readchar|readuchar|readdouble|readfloat|writeuint|writeint|writeint64|writeshort|writeushort|writechar|writeuchar|writedouble|writefloat|rawread|rawwrite|seek|tell|close|insert|remove|minindex|maxindex|setcapacity|getcapacity|getaddress|newenum|haskey|clone|isoptional|__new|__call|__get|__set|__delete)(?=\()\b</string>
			<key>name</key>
			<string>support.function.ahk</string>
		</dict>
		<dict><!-- Keyword - Object.Property -->
			<key>match</key>
			<string>\b(?&lt;=\.)(?i:length|ateof|encoding|__handle|name|isbuiltin|isvariadic|minparams|maxparams|position|pos)(?!\[|\(|\.)\b</string>
			<key>name</key>
			<string>support.function.ahk</string>
		</dict>

		<dict><!-- Constant - Built-in Variables -->
			<key>match</key>
			<string>\b(?i:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles|true|false)\b</string> <!-- fred types ! uintp -->
			<key>name</key>
			<string>constant.language.builtin.ahk</string>
		</dict>

		<dict><!-- Types -->
			<key>match</key>
			<string>\b(?i:class|Str|AStr|WStr|Int|UInt|Int64|UInt64|Short|UShort|Char|UChar|Float|Double|Ptr|UIntP|alpha|number|digit|xdigit|upper|lower|alnum|time|date)\b</string>
			<key>name</key>
			<string>language.type.ahk</string>
		</dict>
		<dict>
			<key>match</key>
			<string>\b(?i:extends|static|global|local|byRef)\b</string>
			<key>name</key>
			<string>language.typeRelative.ahk</string>
		</dict>

		<dict>
			<key>match</key>
			<string>\b(?&lt;!\.)(?i:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|containsinteger|integerfast|floatfast|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|seconds|minutes|hours|days|read|logoff|close|error|single|tray|add|force|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian|alwayson|alwaysoff|dpiscale|parent)(?!\[|\(|\.)\b</string>
			<key>name</key>
			<string>constant.language.builtin.ahk</string>
		</dict>

		<dict>
			<key>match</key>
			<string>\b(?i:shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2)\b</string>
			<key>name</key>
			<string>constant.language.hotkey.ahk</string>
		</dict>

	<!-- keyword.control -->
		<dict>
			<key>match</key>
			<string>\b(?&lt;!\.)(?i:if|else|return|loop|parse|break|for|while|catch|throw|try|until|continue|critical|exit|exitapp|gosub|goto|is|in)\b</string>
			<key>name</key>
			<string>keyword.control.ahk</string>
		</dict>
		<dict>
			<key>match</key>
			<string>\b(?&lt;!\.)(?i:ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist)\b</string>
			<key>name</key>
			<string>keyword.control.italic.ahk</string>
		</dict>

	<!-- numeric -->
		<dict>
			<key>match</key>
			<string>(?x) \b
			((0(x|X)[0-9a-fA-F]*)
			|(
			  ([0-9]+\.?[0-9]*)
			  |(\.[0-9]+)
			 )((e|E)(\+|-)?[0-9]+)?
			)\b
			</string>
			<key>name</key>
			<string>constant.numeric.ahk</string>
		</dict>

	<!-- punctuation -->
		<dict>
			<key>match</key>
			<string>:=|\.=|=|::</string>
			<key>name</key>
			<string>punctuation.definition.equals.ahk</string>
		</dict>

		<dict>
			<key>match</key>
			<string>&lt;|&gt;|&lt;&gt;|[&lt;&gt;=]=|!=</string>
			<key>name</key>
			<string>punctuation.definition.comparison.ahk</string>
		</dict>

		<dict>
			<key>match</key>
			<string>:|\?|`|,</string>
			<key>name</key>
			<string>punctuation.ahk</string>
		</dict>

		<dict>
			<key>match</key>
			<string>[\[\](){}]</string>
			<key>name</key>
			<string>punctuation.bracket.ahk</string>
		</dict>

		<dict>
			<key>match</key>
			<string>%</string>
			<key>name</key>
			<string>punctuation.definition.variable.percent.ahk</string>
		</dict>

	<!-- string -->
		<dict>
			<key>begin</key>
			<string>(")</string><!-- 1: punctuation.definition.string.begin.ahk -->
			<key>beginCaptures</key>
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.string.begin.ahk</string>
					</dict>
				</dict>

			<key>end</key><!-- [^"`\\](")(?!")|^ -->
			<string>("[^"])|[^"`\\](")(?!")|^</string><!-- 1: punctuation.definition.string.end.ahk -->
			<key>endCaptures</key>                    <!-- 2: punctuation.definition.string.end.ahk -->
				<dict>
					<key>1</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.string.end.ahk</string>
					</dict>
					<key>2</key>
					<dict>
						<key>name</key>
						<string>punctuation.definition.string.end.ahk</string>
					</dict>
				</dict>

			<key>name</key>
			<string>string.quoted.double.ahk</string>
			<key>patterns</key>
			<array>
				<dict>
					<key>captures</key>
						<dict>
							<key>1</key>
							<dict>
								<key>name</key>
								<string>escape.character.escape.ahk</string>
							</dict>
						</dict>
					<key>match</key>
					<string>(")"</string><!-- 1: escape.character.escape.ahk -->
				</dict>
				<dict>
					<key>captures</key>
						<dict>
							<key>1</key>
							<dict>
								<key>name</key>
								<string>escape.character.escape.ahk</string>
							</dict>
						</dict>
					<key>match</key>
					<string>(`)(`|"|\\)</string><!-- 1: escape.character.escape.ahk -->
				</dict>
				<dict>
					<key>captures</key>
						<dict>
							<key>1</key>
							<dict>
								<key>name</key>
								<string>escape.character.escape.ahk</string>
							</dict>
						</dict>
					<key>match</key>
					<string>(\\)(`|"|\\)</string><!-- 1: escape.character.escape.ahk -->
				</dict>
				<dict>
					<key>captures</key>
						<dict>
							<key>1</key>
							<dict>
								<key>name</key>
								<string>escape.character.escape.ahk</string>
							</dict>
							<key>2</key>
							<dict>
								<key>name</key>
								<string>escape.word</string>
							</dict>
						</dict>
					<key>match</key>
					<string>(`|\\)(n|r|t)</string><!-- 1: escape.character.escape.ahk -->
				</dict>                           <!-- 1: escape.word -->
			</array>
		</dict>

	</array>
</dict>
</plist>



Trocadero.tmTheme

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
	From: https://gist.github.com/budRich/6044362
	FredOoo: AHK_Trocadero
 -->
<plist version="1.0">
<dict>
	<key>name</key>
	<string>Trocadero</string>
	<key>settings</key>
	<array>
		<dict>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#111313</string>
				<key>caret</key>
				<string>#F8F8F0</string>
				<key>foreground</key>
				<string>#CBCBAB</string>
				<key>invisibles</key>
				<string>#3B3A32</string>
				<key>lineHighlight</key>
				<string>#262626</string>
				<key>selection</key>
				<string>#49483E</string>
				<key>findHighlight</key>
				<string>#FFE792</string>
				<key>findHighlightForeground</key>
				<string>#000000</string>
				<key>selectionBorder</key>
				<string>#222218</string>
				<key>activeGuide</key>
				<string>#9D550FB0</string>

				<key>bracketsForeground</key>
				<string>#F8F8F2A5</string>
				<key>bracketsOptions</key>
				<string>underline</string>

				<key>bracketContentsForeground</key>
				<string>#F8F8F2A5</string>
				<key>bracketContentsOptions</key>
				<string>underline</string>

				<key>tagsOptions</key>
				<string>stippled_underline</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>String</string>
			<key>scope</key>
			<string>string</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF0000</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Number</string>
			<key>scope</key>
			<string>constant.numeric</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F7C081</string>
			</dict>
		</dict>

		<dict>
			<key>name</key>
			<string>Built-in constant</string>
			<key>scope</key>
			<string>constant.language</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Built-in constant</string>
			<key>scope</key>
			<string>constant.language.hotkey</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F7EF81</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Built-in type</string>
			<key>scope</key>
			<string>language.type.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F065CD</string>
				<key>fontStyle</key>
				<string>italic</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Built-in typeRelative</string>
			<key>scope</key>
			<string>language.typeRelative.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F065CD</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>User-defined constant</string>
			<key>scope</key>
			<string>escape.character, constant.other</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FFFFFF</string>
				<key>fontStyle</key>
				<string>bold</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>User-defined constant</string>
			<key>scope</key>
			<string>escape.word, constant.other</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FFFFFF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Variable</string>
			<key>scope</key>
			<string>variable</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>KeywordItalic</string>
			<key>scope</key>
			<string>keyword.control.italic</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#E82166</string>
				<key>fontStyle</key>
				<string>italic</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Keyword</string>
			<key>scope</key>
			<string>keyword.control</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Storage</string>
			<key>scope</key>
			<string>storage</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Storage type</string>
			<key>scope</key>
			<string>storage.type</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Class name</string>
			<key>scope</key>
			<string>entity.name.class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>underline</string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Inherited class</string>
			<key>scope</key>
			<string>entity.other.inherited-class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic underline</string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Function name</string>
			<key>scope</key>
			<string>entity.name.function</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#317FF5</string>
				<key>fontStyle</key>
				<string>bold</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Function name</string>
			<key>scope</key>
			<string>entity.name.function.label</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#317FF5</string>
				<key>fontStyle</key>
				<string>bold</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Function argument</string>
			<key>scope</key>
			<string>variable.parameter</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#FD971F</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Tag name</string>
			<key>scope</key>
			<string>entity.name.tag</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Tag attribute</string>
			<key>scope</key>
			<string>entity.other.attribute-name</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>String function arguments</string>
			<key>scope</key>
			<string>string.function.arguments_justTry</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#00FF00</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library function</string>
			<key>scope</key>
			<string>support.function</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library constant</string>
			<key>scope</key>
			<string>support.constant</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library class/type</string>
			<key>scope</key>
			<string>support.type, support.class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library variable</string>
			<key>scope</key>
			<string>support.other.variable</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Invalid</string>
			<key>scope</key>
			<string>invalid</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#F92672</string>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F8F8F0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Invalid deprecated</string>
			<key>scope</key>
			<string>invalid.deprecated</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#AE81FF</string>
				<key>foreground</key>
				<string>#F8F8F0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>JSON String</string>
			<key>scope</key>
			<string>meta.structure.dictionary.json string.quoted.double.json</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#CFCFC2</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>JSON String</string>
			<key>scope</key>
			<string>punctuation.definition.string.begin.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#CBCBAB</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>JSON String</string>
			<key>scope</key>
			<string>punctuation.definition.string.end.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#CBCBAB</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>JSON String</string>
			<key>scope</key>
			<string>string.quoted.double.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FD971F</string>
			</dict>
		</dict>

		<dict>
			<key>name</key>
			<string>diff.header</string>
			<key>scope</key>
			<string>meta.diff, meta.diff.header</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#75715E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.deleted</string>
			<key>scope</key>
			<string>markup.deleted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.inserted</string>
			<key>scope</key>
			<string>markup.inserted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.changed</string>
			<key>scope</key>
			<string>markup.changed</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#E6DB74</string>
			</dict>
		</dict>

		<dict>
			<key>scope</key>
			<string>constant.numeric.line-number.find-in-files - match</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>entity.name.filename.find-in-files</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#E6DB74</string>
			</dict>
		</dict>



		<dict>
			<key>name</key>
			<string>String</string>
			<key>scope</key>
			<string>string</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#BBBBBB</string>
			</dict>
		</dict>


		<dict>
			<key>scope</key>
			<string>punctuation.definition.comment</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#756846</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>comment.line.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#756846</string><!-- 00BB00 -->
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>comment.line.stronger.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#00BB00</string>
				<!-- <key>fontStyle</key>
				<string>bold</string> -->
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>comment.directive.shebang.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>comment.block</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#756846</string><!-- 00BB00 -->
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>comment.block.stronger</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#00BB00</string>
				<!-- <key>fontStyle</key>
				<string>bold</string> -->
			</dict>
		</dict>



		<dict>
			<key>scope</key>
			<string>keyword.operator.assignment.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#DB5C88</string> <!-- DB5C88 -->
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.operator.arithmetic.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#ffffff</string> <!-- F09EC0 -->
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.operator.address.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FFE945</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.operator.bits.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FFE945</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.operator.comparison.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF0000</string><!-- F09EC0 -->
			</dict>
		</dict>



		<dict>
			<key>scope</key>
			<string>label.line.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#C23669</string>
			</dict>
		</dict>

		<dict>
			<key>scope</key>
			<string>keyword.ifs.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.flow.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.command.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF0000</string><!-- F79B57 -->
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.function.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#7CC8CF</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.directives.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#CBCBAB</string>
				<key>fontStyle</key>
				<string>bold</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.keys.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#CB8DD9</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>variable.predefined.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF2679</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.other.ahk</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#C8AC00</string>
			</dict>
		</dict>


	</array>
	<key>uuid</key>
	<string>D8D5E82E-3D5B-46B5-B38E-8C841C21347D</string>
</dict>
</plist>


Trocadero.sublime-settings

Code: Select all

{
	"word_separators": "./\\()\"'-:,.;<>~!@#$^&*|+=[]{}`~?%", // added %
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"color_scheme": "Packages/AHK_Trocadero/Trocadero.tmTheme",

}

themeTest.ahk

Code: Select all

/*
	From: https://gist.github.com/budRich/6044337
	Block comment
*/
/**
	Block comment stronger
*/
;Line Comment
;;Line Comment stronger

;Directives
#SingleInstance force
#Hotstring #InstallKeybdHook #InstallMouseHook
#Warn ;;Comment
#ClipBoardTimeout
#unknown ;;No red sharp and no bold

;Directives include includeAgain (importline.ahk)
#Include ..\Lib\func.ahk ;;Comment
#Include <..\Lib\func.ahk> ;;Comment

;Default (everything not below: spaces, untyped parameters)
Allan med ballan från halland

;Function (entity.name.function)
if(toto) { ;Not a function
fun(){ ;;Comment

;Label (entity.name.function)
fun_label: ;;Comment

;Hotkeys & Hotstrings
xhotkey:: ;;Comment
^+::  ;;Comment

;string.function.arguments.ahk (Todo)
FileGetVersionInfo( FileName ="theName", value:=123 ) {
/*
	= or :=   -> Operators assignment
	"theName" -> String
	123       -> Number
*/

;Operators arithmetic
+ - / // * ** . ;;Dot is "arithmetic" on strings to concatenate

;Operators assignment
:= += -= *= /= //= .= ++ --   &= |= ^= <<= >>=

;Operators bits
& | ^ << >>

;Operator address
&BUFFER

;Operators comparison
 = == != <> < <= > >= ! not && and || or ? : ;;Red because flow control
 if var1<var2

;String
"Heavy`"Metal"" is 'the' L\"aw! or `\thi\`s" ;;Escape is white, Excaped is string color
path := "..\\Lib\\func.ahk"
"toto" var ;;Comment
"" str := "
(LTrim
	line one  ;;Todo: Should be orange string color
	line two
)"

;Escape (escape.character)                          ;;Todo: Error below in comment
"line`nnewline `or`ttab o``r `r or\n or \\ or `r`n" ;;Comment: Escape meaning chars are white
`E

;Object, Array
{ aa:11, bb:22, cc:"text" }
[ 11, 22, "text" ]

;Error (unclosed string) - Todo: Colorize errors
"asdlkjasd

;Number
666 0x00fe 0.5

;Identifier (variable & function call)
%StonerRock%

;Keyword - Flow control
if else return loop for while until continue break goto gosub try catch throw exit exitApp
parse is in
ifEqual ifExist ifGreater ifGreaterOrEqual ifInString ifLess ifLessOrEqual ifMsgBox ifnotequal ifnotexist ifnotinstring ifwinactive ifwinexist ifWinNotActive ifWinNotExist
#IfWinActive  ;;| Are both directive and function
#IfWinExist   ;;|
Loop {
    ...
} Until expression

;Types (language.type, language.typeRelative)
class Int UInt Float Str Ptr
alpha number digit xdigit upper lower alnum time date
extends global local static byRef ;;Feel like var info, close to type
dllCall( "VerQueryValue", UInt,&BUFFER, Str,"\VarFileInfo", UIntP,Trans:=0, UInt,0 )

;Class is a type
class CItem extends {
	__new()
}

;Objects
Gui Menu File IniFile Array Object Control
Gui, Add, Button,, % "Please enter your name:"

;Keyword - Command
MsgBox ToolTip AutoTrim ClipWait ControlFocus ControlGet
Control ;;Is also a key name

;Keyword - Functions
OnExit OnMessage subStr() sin() .write()

;Keyword - Object.Method
.write() .close() .__new() .__call() .__get()

;Keyword - Object.Property
 .length .ateof .encoding

;Keyword - Functions ??
_Addref _Clone _GetAddress _GetCapacity _SetCapacity _Haskey _Insert _MaxIndex _MinIndex _NewEnum

;Variable keyword (built-in) dereferencing %A_xxx% - ?? Is % an operator?
MsgBox % "hello"
arr%a_Index%
arr%variable%

;Keys & buttons names (constant.language.hotkey)
WheelDown WheelLeft WheelRight WheelUp XButton1 XButton2 Shift Control
WheelDown: ;;Here as a function label

;Constant - Built-in Variables
true, false, on, off, all
a_AhkVersion a_AppData a_ScriptName a_CaretX
;; a_ is just a prefix, so lowercase

;Keywords - Special parameters
ahk_Class ahk_Group ahk_Id ahk_PId
Abort Add AltSubmit AltTab Pixel Screen
CoordMode, ToolTip, Screen
;; ahk_ is just a prefix, so lowercase

(Alan Turing) « What would be the point of saying that A = B if it was really the same thing? »
(Albert Camus) « Misnaming things is to add to the misfortunes of the world. »
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: A try for AHK Sublime Text

17 Jun 2019, 07:15

FredOoo wrote:
17 Jun 2019, 06:28
String escapes:

img_strings_and_escapes.png
i really like your string escapes coloring, i may try to port that to Vim. however the escapes `" and `/ and \\ are invalid in AHK
https://www.autohotkey.com/docs/commands/_EscapeChar.htm

you should run this to test:

Code: Select all

MsgBox, % "Heavy`"Metal"" is 'the' L\"aw! or `\thi\`s" ;;Escape is white, Excaped is string color

might want to post this in the Editors subforum:

https://www.autohotkey.com/boards/viewforum.php?f=60

User avatar
FredOoo
Posts: 186
Joined: 07 May 2019, 21:58
Location: Paris

Re: A try for AHK Sublime Text

17 Jun 2019, 08:14

Yes, you are right about the escapes. I'll change that.
It's a try and not finished work. It's my first config in Sublime Text and I'm new at AHK.
Tell me if you see any other mistakes, I know there are.

But I also have this:
img_operators.png
img_operators.png (10.89 KiB) Viewed 1467 times
img_flow_control.png
img_flow_control.png (11.57 KiB) Viewed 1467 times
img_functions.png
img_functions.png (15.58 KiB) Viewed 1467 times
(Alan Turing) « What would be the point of saying that A = B if it was really the same thing? »
(Albert Camus) « Misnaming things is to add to the misfortunes of the world. »
User avatar
FredOoo
Posts: 186
Joined: 07 May 2019, 21:58
Location: Paris

Re: A try for AHK Sublime Text

17 Jun 2019, 08:18

(Yes I'll post next version in the « Editors subforum »)
(Alan Turing) « What would be the point of saying that A = B if it was really the same thing? »
(Albert Camus) « Misnaming things is to add to the misfortunes of the world. »

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: makdc96 and 153 guests