Home Download Buy Blog Forum Support

sublime not using my .tmLanguage file

sublime not using my .tmLanguage file

Postby barty on Thu Sep 10, 2009 3:21 pm

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
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">
<plist version="1.0">
<dict>
        <key>uuid</key>
        <string>77AC23B6-8A90-11D9-BAA4-000A9584EC8D</string>
        <key>name</key>
        <string>AutoHotKey</string>
        <key>scopeName</key>
        <string>source.ahk</string>
        <key>fileTypes</key>
        <string>ahk</string>

       
    </dict>
</plist>


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
barty
 
Posts: 47
Joined: Thu Sep 10, 2009 5:39 am

Re: sublime not using my .tmLanguage file

Postby barty on Thu Sep 10, 2009 3:48 pm

Ah, I just figured it out: fileTypes has to be an array!
barty
 
Posts: 47
Joined: Thu Sep 10, 2009 5:39 am

Re: sublime not using my .tmLanguage file

Postby rootey on Sun Nov 01, 2009 12:43 pm

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??
thanks
rootey
 
Posts: 5
Joined: Sun Nov 01, 2009 12:40 pm

Re: sublime not using my .tmLanguage file

Postby gpfsmurf on Mon Nov 02, 2009 4:28 am

AutoHotkey is similar to AutoIt so I just use "AutoIt Script" syntax. Not perfect but it works fairly well.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: sublime not using my .tmLanguage file

Postby barty on Wed Nov 04, 2009 12:03 am

here is the file. just unzip into your packages folder
Attachments
AutoHotKey.zip
unzip into your packages\ folder
(9.91 KiB) Downloaded 5734 times
barty
 
Posts: 47
Joined: Thu Sep 10, 2009 5:39 am

Re: sublime not using my .tmLanguage file

Postby ComputerSherpa on Thu Jun 17, 2010 6:04 pm

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:

::;cs::ComputerSherpa

where it should be:

::;cs::ComputerSherpa

Is there any way to fix this, or is that sort of discrimination outside the limitations of the syntax highlighter? Thanks!
ComputerSherpa
 
Posts: 1
Joined: Thu Jun 17, 2010 5:57 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 24 guests