I am writing python code in vscode, after an expression, each time I hit enter to start a new line, it will automatic add one space for the newline.
Instead, what I really want is the starting new line would be aligned with the start of the statement, ie:
def fun():
arg = 'fake'
cursor should be aligned with arg
Now what I got is the cursor is one space of the start. I searched and couldn't find out where to set this, the Tab Size is 4 space.
I still don't find out the causing issue, but on my project I solved it by setting black path to my absolute path. The answers provided below is not the reason why it doesn't work in my vscode. I attached the pic here. My vscode shortcut
使用Ctrl + Shift + P打开命令面板,输入Indent with spaces
,按Enter并选择4
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.