Emacs: Xah AutoHotkey Mode, xahk-mode.el
is a emacs major mode for editing AutoHotkey (AHK) scripts.
Get it by Donation
Goto paypal.com, send $32 to Xah@XahLee.org (be sure to include your correct email address. I need that to send it to you.)
Write in message area: xahk-mode.el
- Quality Syntax coloring
- Graphical menu
- Correct Comment/Uncomment code
- Code indentation
- Word completion
- Keyword Reference lookup (via autohotkey.com website)
Comment Uncomment Code
Type Alt+; (“comment-dwim”) to comment or uncomment current line or text selection in a smart way.
Press Tab (or Meta+Tab) to complete the word to the left of cursor to one of AHK's keyword. All the language's words are supported.
Tip: If you are looking for a built-in word that has a name “key” in it, but you don't remember how it starts, you can type Escape Tab on a blank line, then it will list all AHK's buildin words. Then, you can switch cursor to the completion pane and do standard search.
To lookup documentation of the word under cursor, type Ctrl+c Ctrl+r (“xahk-lookup-ahk-ref”). It'll switch you to the web browser of the function's documentation page at https://www.autohotkey.com/docs/AutoHotkey.htm
“xahk-mode” follows emacs's convention of keyboard shortcuts. Many of them are not very convenient. If you prefer easier keys, or other conveniences, put the following code in your emacs init file “.emacs”.
(defun my-xahk-mode-customizations () "Some customization for xahk-mode." (local-set-key (kbd "<f9>") 'xahk-lookup-ahk-ref) ) (add-hook 'xahk-mode-hook 'my-xahk-mode-customizations)
Select the above code, then type Alt+x eval-buffer. Then, close any ahk files and re-open them. Or, you can just restart emacs.
I also recommend:
Bugs and Wishlist
There is another AHK mode, but that mode has some problems. See: Emacs AutoHotkey Mode Problems .
If you like it, please support by Buy Xah Emacs Tutorial Buy Xah Emacs Tutorial or make a donation. Thanks!
or, buy some nice keyboard from my site. Xah Keyboard Guide