- Configure Anaconda the Right Way. Anaconda works fine out of the box (always that there is a Python interpreter configured in your path and the binary is named python) but if you want to get the max from it, you can configure multitude of options to tune it and adapt it to your needs. To take a look at the common configuration of the Anaconda powerful IDE features, take a look at the Powerful.
- This saves time. Sublime Text has an available plugin for code linters called SublimeLinter. Python has a couple of great tools available for linting, the pep8 and pyflakes packages. Pep8 checks for style violations, lines too long, extra spaces and so on.
- In this Python Tutorial, we will be setting up a development environment in Sublime Text 3. We will walk through how to install Sublime Text, install Package.
Python interpreter settings. By default SublimeJEDI will use default Python interpreter from the PATH. Also you can set different interpreter for each Sublime Project. To set project related Python interpreter you have to edit yours project config file. By default project config name is.sublime. According to the documentation referenced by the Sublime Text website itself, the embedded Python intrepreter is not intended for general development. This restricted usage recommendation even applies to ST2 for OS X, which is the only version that does use the system's Python version.
SublimeJEDI is a Sublime Text 2 and Sublime Text 3 pluginto the awesome autocomplete library Jedi
Installation
with Git
with Sublime Package Control
- Open command pallet (default:
ctrl+shift+p
) - Type
package control install
and select commandPackage Control: Install Package
- Type
jedi
and select 'SublimeJEDI'
Additonal info installations you can find here http://wbond.net/sublime_packages/package_control/usage.
Settings
Python interpreter settings
By default SublimeJEDI will use default Python interpreter from the PATH
.Also you can set different interpreter for each Sublime Project.
To set project related Python interpreter you have to edit yours project config file.By default project config name is <project name>.sublime-project
You can set Python interpreter, and additional python package directories, using for example the following:
When setting paths, Sublime Text Build System Variables and OS environment variables are automatically expanded.Note that using placeholders and substitutions, like in regular Sublime Text Build System paths is not supported.
Run Sublime Python
Autocomplete on DOT
If you want auto-completion on dot, you can define a trigger in theSublime User or Python preferences:
If you want auto-completion ONLY on dot and not while typing, you canset (additionally to the trigger above):
Jedi Goto / Go Definition
Find function / variable / class definition
Shortcuts: CTRL+SHIFT+G
Mouse binding, was disabled, becase it's hard to keep ST default behavior.Now you can bind CTRL + LeftMouseButton
by themself in this way:
Jedi Find Related Names ('Find Usages')
Find function / method / variable / class usage, definition.
Shortcut: Alt+Shift+f
.
Jedi Show Docstring
Show docstring in output panel.
Exposed command is sublime_jedi_docstring
which can be assigned to appropriate shortcut (i.e. F1
).
Jedi Show Calltip
Show calltip in status bar.
Exposed command is sublime_jedi_signature
.
Function args fill up on completion
SublimeJEDI allow fill up function parameters by default.Thanks to @krya, now you can turn it off.Function parameters completion has 3 different behaviors:
insert all function arguments on autocomplete
insert only required arguments that don't have default value (default behavior)
do not insert any arguments
Completion visibility
Sublime Text has a bit strange completion behavior and some times does not adds it's own completion suggestions.Enabling this option to try to bring more comfortable workflow.
Download Python Interpreter
Aaja aaja neele aasman ke tale mp3 ke. Suggest only Jedi completion
or
Suggest Jedi completion and Sublime completion in the end of the list
Please note, if you are using SublimeAllAutocomplete - you should not care about this option.
Logging
To change logging level of the plugin - change logging_level
value in settings.
Possible values: 'debug', 'info', 'error'
Troubleshooting
Auto-complete for import XXXX
does not works.
Sublime Change Python Interpreter
It's a common issue for ST3.All language related settings are stored in Python Package.There is a Completion Rules.tmPreferences
file where defined that completion should be canceled after some list of keywords (def, class, import & etc.).
Sublime Jedi plugin already has Completion Rules.tmPreferences
file for ST2, but ST3 ignores it.
Sublime Python Interpreter Path
Some workarounds how to update completion rules: