mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 03:17:36 +00:00
Added commentary about auto-indentation on newlines for python-mode.el users
This commit is contained in:
parent
d818ffa870
commit
57808175eb
1 changed files with 16 additions and 1 deletions
|
|
@ -54,7 +54,7 @@
|
|||
;; word. Shell completion is implemented in a manner that if you
|
||||
;; change the `python-shell-interpreter' to any other (for example
|
||||
;; IPython) it should be easy to integrate another way to calculate
|
||||
;; completions. You just need to especify your custom
|
||||
;; completions. You just need to specify your custom
|
||||
;; `python-shell-completion-setup-code' and
|
||||
;; `python-shell-completion-strings-code'
|
||||
|
||||
|
|
@ -78,6 +78,21 @@
|
|||
;; might guessed you should run `python-shell-send-buffer' from time
|
||||
;; to time to get better results too.
|
||||
|
||||
;; If you used python-mode.el you probably will miss auto-indentation
|
||||
;; when inserting newlines. To achieve the same behavior you have
|
||||
;; two options:
|
||||
|
||||
;; 1) Use GNU/Emacs' standard binding for `newline-and-indent': C-j.
|
||||
|
||||
;; 2) Add the following hook in your .emacs:
|
||||
|
||||
;; (add-hook 'python-mode-hook
|
||||
;; #'(lambda ()
|
||||
;; (define-key python-mode-map "\C-m" 'newline-and-indent)))
|
||||
|
||||
;; I'd recommend the first one since you'll get the same behavior for
|
||||
;; all modes out-of-the-box.
|
||||
|
||||
;;; Installation:
|
||||
|
||||
;; Add this to your .emacs:
|
||||
|
|
|
|||
Loading…
Reference in a new issue