How to use tabs-as-spaces in Python in Visual Studio 2008?

I have some IronPython scripts built into a C # project, and it would be convenient to edit them in the VS editor. V.S. obviously knows about Python because it provides syntax coloring for it. Unfortunately, however, the editor uses tabs for indentation, while I need spaces. Is there any way to change this? I do not see the title for Python in the "Tools / Options / Text Editor" section.

+3
source share
3 answers

Here is one way to do this, which may not be the best. From the Tools → Text Editor → File Extension menu in the Options menu, add the .py extension and set the type of editor. You don’t get the type of python editor, but you can choose one that you use less often (for me it will be VB.net), and then make sure the tab settings for this language meet your needs. The syntax highlighting did not seem to be affected by me.

+5
source

Tools -> Options -> Text Editor -> Choose Language (you may need to select all languages)

Click "Tabs" and set it the way you want.

Edit: it looks like you can add your own file types to the same area and set the Tab setting for them.

0

print python. . , .

0

Source: https://habr.com/ru/post/1720634/


All Articles