Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you make Visual Studio use tabs instead of spaces for new template files?

I've modified my copy of Visual Studio to keep tabs (instead of spaces) in all my files via Tools => Options => Text Editor => All Languages => Tabs. However, when I create a new project or file, any boilerplate code that Visual Studio includes is always padded with spaces, not tabs (and in cases like web.config, not the specified number of spaces either).

Is there a way to force these all to use tabs automatically when created?

Note: I'm using Visual Studio 2015 Pro, but I suspect other people would be interested in this for other versions as well.

like image 601
techturtle Avatar asked Oct 03 '16 19:10

techturtle


Video Answer


1 Answers

I'm using the Productivity Power Tools 2017 with "Fixed Mixed Tabs". As soon as I add some own code with a tab indent and save the file I get a warning about "mixed tabs". I then can replace the spaces with a click on the "Tabify" button.

Not perfect, but pretty close.

like image 172
noox Avatar answered Nov 16 '22 01:11

noox