Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-indenting new function signatures to the right after pressing enter #142

Open
lsh-0 opened this issue Feb 21, 2015 · 2 comments
Open

Comments

@lsh-0
Copy link

lsh-0 commented Feb 21, 2015

when writing a new python function below an existing one, pressing enter at the end of the signature to begin writing the body, the signature is auto indented to the right, as if it belonged to the function above it.

@mivade
Copy link

mivade commented Feb 23, 2015

I can confirm this. It appears to be an issue with http://www.emacswiki.org/emacs/AutoIndentation in emacs 24. Some relevant things I've found while tracking down the source of the problem here and here.

A workaround is to add the following line to your .emacs:

(add-hook 'python-mode-hook (lambda() (electric-indent-mode -1)))

@lsh-0
Copy link
Author

lsh-0 commented Feb 24, 2015

Quick fix is much appreciated, thankyou.
On 23 Feb 2015 19:02, "Mike DePalatis" [email protected] wrote:

I can confirm this. It appears to be an issue with
http://www.emacswiki.org/emacs/AutoIndentation
http://electric-indent-mode in emacs 24. Some relevant things I've
found while tracking down the source of the problem here
http://stackoverflow.com/questions/21182550/how-to-turn-of-electric-indent-mode-for-specific-major-mode
and here
http://stackoverflow.com/questions/17095247/electric-indent-mode-breaks-my-python-code
.

A workaround is to add the following line to your .emacs:

(add-hook 'python-mode-hook (lambda() (electric-indent-mode -1)))


Reply to this email directly or view it on GitHub
#142 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants