Sublime Forum

Sublime not using my .tmLanguage file


I’m trying to make a syntax highlighter for autohotkey. I got the file from a textmate bundle. Created a folder called autohotkey in

C:\Users<name>\AppData\Roaming\Sublime Text\Packages

Renamed the syntax file from the textmake bundle to AutoHotkey.tmLanguage and placed it there. Whittled the file down til I got no error. However, I still did not see it listed under View > Apply syntax. I whittled the file all the way down to this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">


Still no go. It creates a .cache file in the same folder and recreates it when I shut down, delete the .cache file, and restart sublime. So it does see and parse the file.

What am I missing? Thanks



Ah, I just figured it out: fileTypes has to be an array!



I’d love to get syntax highlighting, auto-complete, & script launching working for autohotkey files.
It seems like you got your syntax highlighting working; Is it possible you could post some more detailed info as to how to get it setup??



AutoHotkey is similar to AutoIt so I just use “AutoIt Script” syntax. Not perfect but it works fairly well.



here is the file. just unzip into your packages folder (9.91 KB)



This is wonderful and extremely useful! I have a minor bug report: I like to use a semicolon at the beginning of my hotstrings, since it’s conveniently on the home row and never occurs naturally at the beginning of a word. However, your syntax highlighter interprets anything after a semicolon as a comment, even where AutoHotkey does not. It looks like:


where it should be:


Is there any way to fix this, or is that sort of discrimination outside the limitations of the syntax highlighter? Thanks!