Can you set Visual Studio Smart Indent to not remove tabs in blank lines?

When in Visual Studio (2005) there are Options β†’ Text Editor β†’ C / C ++ β†’ Tabs β†’ Indents defined in Smart, it will automatically write code blocks and align the sliding brackets, {}, as expected. However, if you press enter inside the code block, move the cursor to another line and then move it back, the inserted tabs will disappear and the cursor will be positioned all the way to the left. Is there a way to set these tabs for Visual Studio?

+4
source share
2 answers

As far as I know, the only way to do this is to enter something (something) on ​​this line and then delete it. Or press the spacebar and you will never see it there until you return to this line.

Once VS determines that you have edited a line of text, it will not automatically change it for you (at least not in the way you described).

+2
source

It annoys me too. At any time when the code is reformatted, empty lines are released. You can look at this: http://visualstudiogallery.msdn.microsoft.com/ac4d4d6b-b017-4a42-8f72-55f0ffe850d7 is not quite a solution, but a step in the right direction

0
source

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


All Articles