Replies: 1 comment
-
I have noticed the same problem, but since I have python-formatter set to black and python-format-on-save set to true it all ends up properly formatted when i save. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
python-mode automatic indentation makes a lot of assumptions, it seems, based on style. How can I configure the way it indents in certain cases, or alternatively, make it indent like vim.
For example, if I have the following function:
If I go to the end of
arg2
line, press enter, and typearg3,
, this is what I will get:What I want is:
How can I make it do what I want here?
I've tried
(setq indent-line-function 'indent-relative)
, which sort of does what I want, except if I hit enter twice, the cursor will be at the begging of the line (it seems like it only examines the last line to determine relativity).In vim, I can type
def some_function(
and press enter, it will automatically indent 4 spaces. If I type enter twice, it will still be indented 4 spaces. This is what I'd like most.Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions