Links:
Jedi.el is a Python auto-completion package for Emacs. It aims at helping your Python coding in a non-destructive way. It also helps you to find information about Python objects, such as docstring, function arguments and code location.
Jedi.el uses jedi (an awesome Python auto-completion library) and EPC (an RPC stack for Emacs Lisp) and its Python binding to communicate with Python process. It also uses excellent Emacs auto-complete module to start completion automatically. As Jedi.el always calls Python function asynchronously (thanks to EPC), it will not block your Emacs while your are editing.
- EPC
- deferred.el (> v0.3)
- auto-complete
If your completion popup is broken when width of completion candidates is wide, try the newest version of popup.el.
- Jedi
- python-epc
- argparse (for Python 2.6)
Jedi.el is tested against Python 2.6, 2.7 and 3.2.
- virtualenv
- make
The easiest way to install Jedi.el is to use el-get:
just do M-x el-get-install jedi
.
You need to have virtualenv to automatically install Python module
dependencies. If your el-get does not have the recipes for Jedi.el
yet, get them from this pull request.
- Install EPC and auto-complete.
- Install Jedi.el. Download the repository of Jedi.el and add it to load-path.
- Install Jedi and python-epc by
make requirements
orpip install jedi epc
if you want to determine where to install them.
- Add
(autoload 'jedi:setup "jedi" nil t)
in your Emacs configuration.
All you need to do is to call jedi:setup in python buffer. To do that, add the following in your Emacs configuration:
(add-hook 'python-mode-hook 'jedi:setup)
If auto-completion is all you need, use jedi:ac-setup instead:
(add-hook 'python-mode-hook 'jedi:ac-setup)
To setup recommended keybinds for Jedi.el, add this to your Emacs
configuration. Note that you must set jedi:setup-keys before
loading jedi.el. See its docstring (<f1> v jedi:setup-keys
) for
more information.:
(setq jedi:setup-keys t)
Sometimes it is useful to find completion using Python interpreter. To do that in a seamless manner, you can use IPython and its Emacs binding EIN (Emacs IPython Notebook). See ein:jedi-setup in the EIN manual. Using this setup, you can run auto-completion command in Jedi.el and EIN simultaneously.