What is jedi This is emacs lisp that autocompletes the input when editing python with emacs. You can build a powerful and high-speed auto-completion environment for emacs with simple settings.
If it is python with emacs, it is mixed with python.el and (another) python.el, python-mode.el and ac-python.el, and if you put them all in, you can see which one is working normally. I don't like to do it. The naming is too bad.
I'm not sure about the naming of jedi, which I will introduce this time, but I thought it might be easier to use because it has unified specifications.
Main reference sites:
First, dig a place to git the jedi related files and move it. (I divide all .el files according to usage and read it from init.el. New packages are organized by package under site-lisp (Isn't it by usage!) Please like it in your own environment.)
mkdir ~/.emacs.d/site-lisp/jedi
cd ~/.emacs.d/site-lisp/jedi
Now, clone from git.
git clone git://github.com/tkf/emacs-jedi
git clone git://github.com/kiwanami/emacs-deferred
git clone git://github.com/kiwanami/emacs-epc
git clone git://github.com/kiwanami/emacs-ctable
Next, I'm not sure about virtualenv, but it seems that I need to execute the following spell with emacs-jedi. If you don't have virtualenv or pip, you need to install it first.
cd ~/.emacs.d/site-lisp/jedi/emacs-jedi
virtualenv env
source env/bin/activate
pip install jedi epc
Once that's done, write the following to a file in your load path (.emacs.d / init.el or I'm .emacs.d / input-utils.el): You have to write it to be read after the auto-complete setting.
(add-to-list 'load-path "~/.emacs.d/emacs-deferred")
(add-to-list 'load-path "~/.emacs.d/emacs-epc")
(add-to-list 'load-path "~/.emacs.d/emacs-ctable")
(add-to-list 'load-path "~/.emacs.d/emacs-jedi")
(require 'auto-complete-config)
(require 'python)
(require 'jedi)
(add-hook 'python-mode-hook 'jedi:ac-setup)
(define-key python-mode-map (kbd "<C-tab>") 'jedi:complete)
This didn't work for me, and after trial and error I settled down below.
;;;Above this is the path setting and suto-complete setting
(require 'jedi)
(add-hook 'python-mode-hook 'jedi:setup)
;;Put this in and manually jedi<C-tab>I have to start up with.
;(setq jedi:setup-keys t)
(setq jedi:complete-on-dot t)
I think it's better than python-mode. I was surprised that the help of the function was fast.
Recommended Posts