How to map F1 Key in SublimeText to open AutoIt documentation for the word under the keyboard cusor.
Download ZIP from the goto-documentation github page and unzip files to directory: Sublime_Data_Dir\Packages\goto-documentation
.
- Note: although not specified, goto-documentation plugin works fine with both ST2 and ST3.
- If you need help finding your Sublime_Data_Dir, see here.
To the file Sublime_Data_Dir\Packages\User\Default (Windows).sublime-keymap
, add:
{ "keys": ["f1"], "command": "goto_documentation" },
To the file Sublime_Data_Dir\Packages\goto-documentation\gotodocumentation.py
, add the following indented under "class GotoDocumentationCommand" (make sure it is correctly indented under the class since python is indent-sensitive).
- To have it open in the online documentation
def autoit_doc(self, keyword, scope): open_url("http://www.autoitscript.com/autoit3/docs/functions/%s.htm" % keyword)
- To have it open in the help file documentation
def autoit_doc(self, keyword, scope): cmd = ["hh.exe", r"mk:@MSITStore:C:\Program Files\AutoIt3\AutoIt3.chm::/html/functions/%s.htm" % keyword] subprocess.Popen(cmd)