Created
April 25, 2015 18:08
-
-
Save arocks/2db1cc3d8c17b451d92a to your computer and use it in GitHub Desktop.
Outline of my lightning talk "Emacs and Python" at Bangpypers April 2015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Emacs and Python | |
## Why? | |
## Intro | |
- Arun Ravindran <arunrocks.com> @arocks | |
- Emacs user for 15 years | |
- Python user for 13 years | |
- Author of "Django Design Patterns and Best Practices" | |
## Emacs | |
### Your package manager Emacs 24 or beta | |
1. On Arch: $ sudo pacman -S emacs | |
### Config is in `~/.emacs.d/init.el` | |
### M-x means Alt+x | |
### C-x means Ctrl+x (or Caps+x ?) | |
## ElPy | |
### Elpy >= Python mode+Rope+PyLint+many more | |
``` | |
Installation | |
Emacs: M-x package install ENTER elpy | |
Then in your init.el | |
(elpy-enable) | |
;; Your virtual environment? | |
Takes 5 mins... you are welcome! | |
``` | |
### Keyboard shortcuts | |
1. C-c C-c - Evaluate region/buffer by sending to inferior python | |
2. C-c C-d - Show documentation at cursor symbol | |
3. M-. - Go to definition (better than docs for Django) | |
- https://github.com/DjangoPatternsBook/superbook/blob/chapter03/src/profiles/models.py | |
4. C-c C-o - Show class/fn definitions in buffer as Occur window | |
5. C-UP/DN - Jump to prev class definition line (corresp for C-DOWN) | |
6. M-LF/RT - Move indented block starting from line where cursor is RIGHT(indent) or LEFT(unindent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Emacs and Python
Why?
Intro
Emacs
Your package manager Emacs 24 or beta
Config is in
~/.emacs.d/init.el
M-x means Alt+x
C-x means Ctrl+x (or Caps+x ?)
ElPy
Elpy >= Python mode+Rope+PyLint+many more
Keyboard shortcuts