[PYTHON] emacs-jedi install

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:

  1. This is the main 2012-10-21 I came to Kansai Emacs
  2. Auxiliary Notes on omni completion of Python for Emacs with emacs-jedi
  3. Auxiliary November 13, 2012 I tried to set up jedi to enhance Python completion in Emacs
  4. Article JEDI: A COMPLETION LIBRARY FOR PYTHON by mickey on January 10th, 2013

install

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

Setting

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)

Comfortable to use

I think it's better than python-mode. I was surprised that the help of the function was fast.

Recommended Posts

emacs-jedi install
Install pytorch
Install Activiti 6
ArcoLinux install
install python
Install virtualenv
Install mojimoji
Install Scipy
Install Memo
Install Qiskit
Install Ansible
install keras
Install Mu
Install skt-war-result
Install Django
Install PyTorch
install pillow
ArchmanLinux Install
sudo pip install
Fedora 33 beta install
Install ffmpeg / imagemagick
CentOS8 --Install --Django
Install Python locally
Install easy_install (Windows)
Troubleshooting apt install
Install NAOqi python
Install from conda-forge
Install tensorflow. (Only!)
Install Apache Zookeeper
Install Python Control
Opencv install struggle
Install Apache Zeppelin
Install Apache ActiveMQ
BlueZ Build & Install
CentOS8 --Install --Python3
Install Numpy + atlas