Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto import modules with emacs-jedi

With ropemacs you can do something like this:

M-x rope-auto-import

This analyze the code (I presume) and imports missing modules, for example if I write:

datetime.now()

it should do the import for me by add this line:

from datetime import datetime

(it always uses the from ... import ... form)

Is there a similar function in emacs-jedi?

like image 804
qed Avatar asked Jun 10 '14 16:06

qed


1 Answers

Jedi doesn't support auto imports, yet. (And therefore obviously emacs-jedi does neither)

There are discussions ongoing to implement refactorings as well (which includes auto imports). However, it will probably take another year or so.

like image 140
Dave Halter Avatar answered Sep 21 '22 21:09

Dave Halter