Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.45 KB

goto-documentation_instructions.md

File metadata and controls

28 lines (17 loc) · 1.45 KB

How to map F1 Key in SublimeText to open AutoIt documentation for the word under the keyboard cusor.

1. Install goto-documentation plugin

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.

2. Set key binding for F1

To the file Sublime_Data_Dir\Packages\User\Default (Windows).sublime-keymap, add:

{ "keys": ["f1"], "command": "goto_documentation" },

3. Set goto-documentation command for autoit scope

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)