Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any Visual Studio add-ins for true 'smart tabs'?

'Smart Tabs' concept allows to automatically insert tab character for block indentation and space characters for in-block formatting. It's described here. Unfortunately, Visual Studio's 'smart tabs' option in text editor settings just indents text on enter press. Same name, completely different and near useless thing :). So, maybe someone knows of a visual studio addin that can change how 'tab' key work so it will insert tab characters and space characters according to rules mentioned above? Any hints are welcome.

Update: I need it for C++. According to comments, ReSharper can do something like this, but only for Basic and C#.

like image 838
grigoryvp Avatar asked Apr 28 '10 10:04

grigoryvp


People also ask

How do I get auto suggestion codes in Visual Studio?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript).

How do I enable autocomplete in Visual Studio?

The suggestion list of Automatic completion appears as soon as you start typing a new identifier. The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space . If necessary, you can always return to the Visual Studio's native's IntelliSense.

Does VS Code use tabs or spaces?

VS Code lets you control text indentation and whether you'd like to use spaces or tab stops. By default, VS Code inserts spaces and uses 4 spaces per Tab key. If you'd like to use another default, you can modify the editor.insertSpaces and editor.tabSize settings.


1 Answers

I have mapped the tab-button to Edit.FormatSelection in Visual Studio to achieve this and it works very well for me. I have also remapped the normal functionality of tab so that I still can access them (Edit.InsertTab and Edit.TabLeft).

like image 73
Fredrik Olén Avatar answered Oct 05 '22 23:10

Fredrik Olén