Python Indentation In Spacemacs With Hard Tabs Is Off
Let me preface by saying that I am a relatively new emacs/spacemacs convert from vim, so my my knowledge is still pretty basic. I have spacemacs set up with the python layer, with
Solution 1:
Try M-x whitespace-mode
and repeat this experiment. What do you see? Did you indent with spaces or with tabs?
I'm guessing you'll see something like this:
def·func():
········
» print·'line'
This would mean you have python-indent-offset
set to 8, indent-tabs-mode
set to nil (aka indent with spaces), and tab-width
set to 4.
If that's not the case, what are the values of those variables (C-h v python-indent-offset
, etc.)?
If that is the case, you can fix the problem by running
(setq-default python-indent-offset4)
Post a Comment for "Python Indentation In Spacemacs With Hard Tabs Is Off"