简体   繁体   中英

Why does VSCode Python always put two tabs instead of one?

In my VSCode settings, I have Tab Size set to 2 and in Prettier I have it set to 2 spaces as well. It works fine, whenever I go to the next line, it indents by 1 tab (2 spaces) and whenever I press tab it places a tab where my cursor was. But when I save my file, all of the single tabs for indenting turn into 2 tabs. Here is an image from after saving: image . And yes, I am making a Discord Bot.

I saved my file and I expected it to look like this

I want to indent using tabs but when I save it indents with 2 tabs and that's annoying

在此处输入图像描述

  1. Click the Select Indentation option in the lower right corner.

在此处输入图像描述

  1. Choose Indent Using Tabs

在此处输入图像描述

  1. Choose 2.

You can also change the settings by searching tab size :

![在此处输入图片描述

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM