change C-j to newline,indent,one indention back?
Alexander Schmolck
a.schmolck at gmx.net
Fri Oct 18 17:41:15 EDT 2002
More information about the Python-list mailing list
Fri Oct 18 17:41:15 EDT 2002
- Previous message (by thread): change C-j to newline,indent,one indention back?
- Next message (by thread): change C-j to newline,indent,one indention back?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
eugene kim <eugene1977 at hotmail.com> writes: > hi.. > > i'm wondering if i can avoid hitting backspace key > > for i in something : > for j in something: > statement1 > statement2 # C-j here > |<-- cursor here & i would have to do 'backspace' > |<-- can C-j be changed to place cursor here? > > return/C-j/C-m all do the same newline-indent.. I guess adding the following to your .emacs should work (not properly tested): (defun my-python-key-hook () (define-key py-mode-map "\C-j" '(lambda () (interactive) (py-newline-and-indent) (py-electric-backspace 1))) (add-hook 'python-mode-hook 'my-python-key-hook) alex
- Previous message (by thread): change C-j to newline,indent,one indention back?
- Next message (by thread): change C-j to newline,indent,one indention back?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list