The code was copy-pasted from outside. I would like to see if I can format this with <indentation with tab size 2>, but my VSCode doesn’t want to do that. It draws the lines for the tab size 2 indentation, but doesn’t actually format the code in that manner.
On the other hand, somehow it does good job with JS files, but just not with Python files. I’m using autopep8. Is it because I am using autopep8 and autopep8 doesn’t let me change indentation easily?
Thanks!
2
Answers
Python can’t be auto formatted because the logic is indentation dependent
def
on line 2Ctrl+D
as many times until you reach beforereturn
Space
Space
Esc
It looks like you have set tabsze to 2 spaces, if you want the indentation of each line to be one tab (2 spaces):
Also if you want to add indentation, use Ctrl+] or Tab