Skip to content

AutoHotkey AHK language package for SublimeText including syntax highlighting, comments toggling, auto-completions, build system definitions, commands for ahkrun, ahkcompile, ahkrunpiped.

License

Notifications You must be signed in to change notification settings

evandroforks/SublimeAutoHotkey

 
 

Repository files navigation

SublimeAutoHotkey - Syntax Package for Sublime Text 2/3

AutoHotkey AHK language package for SublimeText including syntax highlighting, comments toggling, auto-completions, build system definitions, commands for ahkrun, ahkcompile, ahkrunpiped.

Installation

By Package Control

  1. Download & Install Sublime Text 3 (https://www.sublimetext.com/3)
  2. Go to the menu Tools -> Install Package Control, then, wait few seconds until the installation finishes up
  3. Now, Go to the menu Preferences -> Package Control
  4. Type Add Channel on the opened quick panel and press Enter
  5. Then, input the following address and press Enter
    https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json
    
  6. Go to the menu Tools -> Command Palette... (Ctrl+Shift+P)
  7. Type Preferences: Package Control Settings – User on the opened quick panel and press Enter
  8. Then, find the following setting on your Package Control.sublime-settings file:
    "channels":
    [
        "https://packagecontrol.io/channel_v3.json",
        "https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json",
    ],
  9. And, change it to the following, i.e., put the https://raw.githubusercontent... line as first:
    "channels":
    [
        "https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json",
        "https://packagecontrol.io/channel_v3.json",
    ],
    • The https://raw.githubusercontent... line must to be added before the https://packagecontrol.io... one, otherwise, you will not install this forked version of the package, but the original available on the Package Control default channel https://packagecontrol.io...
  10. Now, go to the menu Preferences -> Package Control
  11. Type Install Package on the opened quick panel and press Enter
  12. Then, search for AutoHotkey and press Enter

See also:

  1. ITE - Integrated Toolset Environment
  2. Package control docs for details.

Key Bindings

If you have the default Sublime keybindings intact, then:

  • Ctrl+B will run the current file (with AutoHotkey.exe)
  • Ctrl+Shift+B will compile the current file (with Ahk2Exe.exe)

Advanced Configuration

For the build system and ahkrun, ahkrunpiped, and ahkcompile commands, if you have a non-default installation then you will need to set your specific path to AutoHotkey.exe and Ahk2Exe.exe in a file named AutoHotkey.sublime-settings in your User folder. You can access these settings file from the Menu Preferences > Package Settings > AutoHotkey. You should make a copy of AutoHotkey Settings - Default at AutoHotkey Settings - User and modify there since then any settings defined in your User folder will take precedence and the package can still update itself without overwriting your custom settings.

ahkrunpiped

The ahkrunpiped command will allow you to run your code as a piped text string to AutoHotkey (this allows you to run snippets of code without having to save them to a file):

  • If text is selected - ahkrunpiped will pipe and run the selected text only.
  • If no text is selected - ahkrunpiped will pipe and run the entire contents of the current document.

Goto-documentation Integration

Instructions on how to configure goto-documentation plugin for AutoHotkey (F1 Hotkey will take you to documentation for word under cursor)

Credits

About

AutoHotkey AHK language package for SublimeText including syntax highlighting, comments toggling, auto-completions, build system definitions, commands for ahkrun, ahkcompile, ahkrunpiped.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%