TextSelection::Tabify Method ()
Visual Studio 2015
Converts spaces to tabs in the selection according to your tab settings.
Assembly: EnvDTE (in EnvDTE.dll)
Converts contiguous spaces to tabs within the text selection according to the global setting for a tab's size.
Sub TabifyExample() ' Before running this example, open a code document. Dim objSel As TextSelection = DTE.ActiveDocument.Selection ' Select all code in open document. objSel.SelectAll() ' Convert spaces in selection to Tab characters. objSel.Tabify() End Sub
Show: