Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlugIn Goto-Documentation #7

Open
BugFix opened this issue Jul 19, 2014 · 2 comments
Open

PlugIn Goto-Documentation #7

BugFix opened this issue Jul 19, 2014 · 2 comments

Comments

@BugFix
Copy link
Member

BugFix commented Jul 19, 2014

Its not the best way to use Goto-documentation like written in instructions https://github.com/AutoIt/SublimeAutoItScript/blob/master/goto-documentation_instructions.md, point 3.
Better way:
Make all changes only in file: "goto_documentation.sublime-settings".
This should look like following (adapt path to AutoIt3Help.exe if required).

{
    "prefix": "", // added at the begging of the query
    "suffix": "", // added at the end of the query
    "docs": { // obj containing the docs for each scope
              // these are merged with the default ones


        // the key value pair represent scope -> doc url
        // supported placeholders:
        //  - %(query)s the selected text/word
        //  - %(scope)s the current scope
       "css": "http://devdocs.io/#q=%(scope)s+%(query)s",

       // AUTOIT        
       "autoit": {
            "command": ["C:/Program Files (x86)/AutoIt3/AutoIt3Help.exe", "%(query)s"],     // path to your help exe!
            "failTest": "Nothing",
            "changeMatch": "",
            "changeWith": "",
            "url": ""
       },

        // we can also have an object to
        // run a command for finding docs
        // inside the command you can use the same placeholders
        "python": {
            // the command to be executed
            "command": ["python", "-m", "pydoc", "%(query)s"],
            // a regex to determine if this was an invalid response from the console
            "failTest": ".*no Python documentation found for.*",
            // regex to select something from the valid response
            "changeMatch": "(Related help topics)",
            // regex to replace the matched result
            "changeWith": "-------\n\\1",
            // fallback url: if failTest returns true this will be used
            "url": "http://docs.python.org/3/search.html?q=%(query)s"
        }
    },
    // if we have no docs for the current scope
    // we will try using the fallback one,
    // to disable set to false
    "fallback_scope": "google"
}

Using the AutoIt3Help.exe is the best way. So you get help for all type of words (functions, keywords, macros a.s.o). Exactly the same behaviour like known from SciTE.

@RonildoSouza
Copy link

A menu for access to AutoIt.chm file was created.
And added some snippets and autocomplete.

@BlagoYar
Copy link

BlagoYar commented Sep 22, 2016

And how is it

 def autoit_doc(self, keyword, scope):
     cmd = ["hh.exe", r"mk:@MSITStore:e:\AutoIt\Portable\AutoIt3.chm::/html/functions/%s.htm" % keyword]
     subprocess.Popen(cmd)

Delete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants