Editors for Keysharp Scripts
Any text editor can edit a Keysharp .ks or .ahk script. Keysharp includes Keyview, its cross-platform script viewer/editor utility.
Because Keysharp targets the AutoHotkey v2 language, AutoHotkey-aware editors can also make Keysharp scripts easier to read and edit. They may provide:
- Syntax highlighting, like what is used in this documentation. With syntax highlighting, words, symbols and segments of code are colour-coded to indicate their meaning. For instance, literal text, comments and variable names are displayed in different colours.
- Auto-complete, which typically offers a list of suggestions when you start typing the name of a known function or variable.
- Calltips may show you what the parameters are for a function while you are writing code to call the function.
SciTE4AutoHotkey
SciTE4AutoHotkey is a custom version of the text editor known as SciTE. Its features include:
- Syntax highlighting
- Auto-complete
- Calltips
- Smart auto-indent
- Code folding
- Interactive debugging
- Running the script by pressing a hotkey
- Other tools for AutoHotkey scripting
SciTE4AutoHotkey can be found here: https://www.autohotkey.com/scite4ahk/
Visual Studio Code (VS Code)
Visual Studio Code can be configured with a high level of AutoHotkey v2 language support that is also useful for Keysharp.
AutoHotkey2 Language Support provides many features, including:
- Syntax highlighting
- Auto-complete
- Calltips
- Smart auto-indent
- Code folding
- Running the script by pressing a hotkey
- Real-time diagnostics (detecting common errors)
- Formatting/tidying code
Additional notes:
- To run scripts with Keysharp, set the extension's interpreter path as described in Using an Editor.
- This extension only supports AutoHotkey v2, but can also detect v1 scripts and automatically switch over to a v1 extension if one is installed.
- This extension can also be used with other editors, such as vim, neovim and Sublime Text 4. For details, see Use in other editors. However, VS Code likely provides the best experience, with easiest setup.
Notepad++
Notepad++ can be configured to support the following features:
- Syntax highlighting
- Auto-complete
- Code folding
- Running the script by pressing a hotkey
See Setup Notepad++ for AutoHotkey for instructions.
Notepad4
Notepad4 supports the following for AutoHotkey v2 by default:
- Syntax highlighting
- Auto-complete
- Auto-indent
- Code folding
- Running the script by pressing a hotkey
It is available here: https://github.com/zufuliu/notepad4
Others editors
For help finding or configuring other editors, try the Editors sub-forum.
To get an editor added to this page, post in the Suggestions sub-forum or open an Issue or Pull Request at GitHub.