Skip to content

Instantly share code, notes, and snippets.

@jaybosamiya
Last active April 21, 2018 21:02
Show Gist options
  • Save jaybosamiya/fe30b50eb950261deb054de503dfcf43 to your computer and use it in GitHub Desktop.
Save jaybosamiya/fe30b50eb950261deb054de503dfcf43 to your computer and use it in GitHub Desktop.
My [outdated] Python configuration for Emacs

Python Autocompletion

Do the following:

M-x package-install RET jedi
M-x jedi:install-server

and then add the following lines to ~/.emacs:

(add-hook 'python-mode-hook 'jedi:setup)

Easy Python code browsing

Do the following:

M-x package-install RET jedi-direx

and then add the following lines to ~/.emacs:

(eval-after-load "python"
  '(define-key python-mode-map "\C-cx" 'jedi-direx:pop-to-buffer))
(eval-after-load "python"
  '(define-key python-mode-map "\C-c\C-x" 'jedi-direx:switch-to-buffer))
(add-hook 'jedi-mode-hook 'jedi-direx:setup)

Now, C-c x will open a new buffer to browse, and C-c C-x will change current buffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment