Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I have autocomplete for python libraries in sublime

Currently when I import some code, for example:

from datetime import datetime 

I can't see what methods it has. How could I know that there is utcnow() for example. It would be great if there is some plugin for sublime so that I have this functionality , as it is in eclipse with cntr+space for methods. Also may be if there is some navigation between classes definitions , or going to property definition and etc.

Preferences plugins

like image 208
makkasi Avatar asked Feb 22 '15 09:02

makkasi


People also ask

Does Sublime Text have autocomplete for Python?

Kite integrates with Sublime Text to bring you the next-generation autocomplete for Python & JavaScript. With Multi-Line Completions, Kite helps you code faster while staying in flow.

How do I enable autocomplete in Sublime Text?

By default, Sublime Text will automatically show the completions popup when a user is editing source code or markup, but not within prose in comments, strings or markups. Pressing the Esc key will hide the completions popup. To manually show the completions popup, press Ctrl+Space.

How do I use autocomplete in Python?

(In Python Shell window, you can use TAB key besides the key combination of 'CTRL' and 'space' to invoke the built-in auto-completion feature.) Alternatively, you can choose the "Show Completions" in the main Edit menu to achieve the same as well.


2 Answers

You can have this functionality with the Anaconda Package.

enter image description here

Anaconda includes a lot more features than just auto completetion. You can install the Jedi Package. This is the auto complete that ships with Anaconda.

like image 141
Vader Avatar answered Sep 16 '22 15:09

Vader


try SublimeJEDI

step 1: ctrl+shift+p search - install package

step 2: Wait for few seconds until drop down box to appear

step 3: search Jedi - Python autocompletion and press enter

now auto completion for python will work in sublime..

Note: you can try Anaconda instead Jedi using same step.

like image 42
Mohideen bin Mohammed Avatar answered Sep 20 '22 15:09

Mohideen bin Mohammed