Skip to content

Instantly share code, notes, and snippets.

@danieldk
Created February 1, 2011 14:51
Show Gist options
  • Save danieldk/805950 to your computer and use it in GitHub Desktop.
Save danieldk/805950 to your computer and use it in GitHub Desktop.
Handy Python settings for the reading group
;; Three handy settings for the Python mode:
;;
;; - Set indentation to two spaces.
;; - Interpret as Python 3 code.
;; - Autoindent when pressing return.
;;
(add-hook 'python-mode-hook
(lambda ()
(setq python-indent 2
python-default-version 3)
(define-key python-mode-map "\C-m" 'newline-and-indent)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment