Quick tutorial for setting up VSCode for AHK
Posted: 15 Apr 2022, 09:59
I was asked for quick instructions on how to set up VSCode for AHK use, and it was suggested I post it here as it might benefit others. It's pretty easy, but it might not be clear if you're new to VSCode:
1. Download and run the Visual Studio Code installer.
2. Install an AHK extension: Open VSCode and select Extensions by either clicking the icon on the left bar (looks like four squares with one separated from the others) or by pressing Ctrl+Shift+X. Search for AutoHotkey and select your desired extension. You can also browse extensions at the VSCode Extension Marketplace. I currently use AutoHotkey Plus Plus after also using its predecessors that it was forked from.
3. (Optional) Set the default language for AHK so the AHK extension will work before even saving the file with a .ahk file extension (i.e., AHK syntax highlighting and everything else is applied to new windows that aren't saved yet): Go to the File menu, then Preferences, then Settings, or press Ctrl+,. With the Settings open, press Ctrl+F and search for "default language" and put in ahk.
Once you have set up one instance with your settings and extensions, it's easy to sync settings across multiple machines, which I find extremely useful as I have these and many other changes such as theme settings that are instantly applied to my other machines (virtual or otherwise) when I choose.
1. Download and run the Visual Studio Code installer.
2. Install an AHK extension: Open VSCode and select Extensions by either clicking the icon on the left bar (looks like four squares with one separated from the others) or by pressing Ctrl+Shift+X. Search for AutoHotkey and select your desired extension. You can also browse extensions at the VSCode Extension Marketplace. I currently use AutoHotkey Plus Plus after also using its predecessors that it was forked from.
3. (Optional) Set the default language for AHK so the AHK extension will work before even saving the file with a .ahk file extension (i.e., AHK syntax highlighting and everything else is applied to new windows that aren't saved yet): Go to the File menu, then Preferences, then Settings, or press Ctrl+,. With the Settings open, press Ctrl+F and search for "default language" and put in ahk.
Once you have set up one instance with your settings and extensions, it's easy to sync settings across multiple machines, which I find extremely useful as I have these and many other changes such as theme settings that are instantly applied to my other machines (virtual or otherwise) when I choose.