It shouldn't/doesn't interfere with existing HTML and PHP completions. When not working with a Python file, it still shows the default/ file completions list.
At the moment I've only included standard Python functions. But, cleverly, if you're working with the ST API it adds these methods as well. However, I've only added a few ST methods (set_clipboard, set_timeout, error_message and status_message) so far. If this is a useful aspect then I can extend this idea, such that adding a library will also add the library's methods to the completions list
If you still want to include the default file completions then comment out this line at the end of the file:
- Code: Select all
py_compl = (py_compl, sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)
I've also been working on a help system ffor Python functions. Add a key-binding such as:
- Code: Select all
{ "keys": ["shift+f1"], "command": "py_help" }
Click into a Python function (dir, eval, sum, etc.) and press the key-combination to display help text in the status bar. The text is paraphrased from the Python library.
Some of the help text is a little long (but helpful). It's probably possible to change the status message delay. Personally, I just keep pressing the key-combo until I've read it all
I shall modify the completions so that they are global (or static). But, in the meantime I would appreciate any comments, suggestions (encouragement