Python korea(emacs)

2,350 views

Published on

Emacs for python programmers in Python Korea Community seminar.
Mostly derived from Vinod Kurup's material

Python korea(emacs)

  1. 1. Emacs for Python Programming Johnny Cho( 조민재 ) @popeye92 June 29th, 2014
  2. 2. First ...
  3. 3. Special thanks to Vinod Kurup
  4. 4. But first ...
  5. 5. How to safely play with Emacs • Control-x Control-c to quit (C-x C-c) • C-g is your friend • Plan to mess up vinod:~$ rm -r .emacs.d .emacs vinod:~$ emacs You're good to go again!
  6. 6. Emacs Sucks! but only if you use the default settings
  7. 7. Emacs Tutorial C-h t RET M-x help-with-toturial-spec-language RET Korean RET
  8. 8. Emacs Starter Kit M -x package-installRET starter-kitRET
  9. 9. Packages for Emacs python programmers ido-settings.el; auto-complete; jedi.el; flycheck; autopair; optional ipython;
  10. 10. Installation Packages (require 'package) (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/")))
  11. 11. Installation Packages M-x package-list-packages M-x package-install RET autopair RET
  12. 12. Emacs Python IDE
  13. 13. Features • Syntax highlighting • Auto-Indentation • Code completion • Documentation lookup • Code lookup / navigation • Error highlighting (on-the-fly) • Code runner • Test runner • Debugging
  14. 14. Major mode Python's is a bit of a mess
  15. 15. Use python-mode.el M-x package-install RET python-mode RET ( < Emacs24.2 ) Emacs24 .2 이후 기본 패키지
  16. 16. Syntax highlighting
  17. 17. Automatic indentation
  18. 18. Code completion
  19. 19. Documentation lookup
  20. 20. Code lookup
  21. 21. Error highlighting
  22. 22. Code runner • Send the current buffer to Python C-c C-c • Choose your interpreter (setq python-python-command "ipython") • Choose your virtualenv (virtualenv-workon "myproject") or M-x virtualenv-workon RET myproject RET
  23. 23. Test runner
  24. 24. Debugging
  25. 25. Useful links Python Programming in Emacs ● www.emacswiki.org/emacs/PythonProgrammingInEmacs ● wiki.python.org/moin/EmacsEditor
  26. 26. Non-python stuffs
  27. 27. Magit mode
  28. 28. Dired mode
  29. 29. Keyboard Macros
  30. 30. Pretty Themes
  31. 31. Shell modes
  32. 32. And more!! • Kill ring • yasnippet • Org-mode • ace-jump • erc
  33. 33. Help in emacs • C-h t=> tutorial • C-h f=> function docs • C-h v => variable docs • C-h k => keybindings Emacs can teach you emacs
  34. 34. 감사합니다 . popeye92@gmail.com @popeye92

×