A most welcome feature would be for VAX to emulate the block indentation found in Visual Studio 6 and many other editors. I.e. if you select lines and press Tab, it shifts all text by the same amount to the right. For instance, indenting the body of this function:
void f() {
/*
* Blah blah
*/
g(awfulllylongexpression,
blob);
}
yields:
void f() {
/*
* Blah blah
*/
g(awfulllylongexpression,
blob);
}
Visual Studio 2003 ruins it by aligning each line individually to a tab stop, yielding:
void f() {
/*
* Blah blah
*/
g(awfulllylongexpression,
blob);
}
I've come up with a workaround of settings the indent size to 1 and these macro's tied to the Tab and Shift-Tab key. It allows the tab key to be used for completion in VAX, but it's not quite up to par with some 15 year old editors.Option Strict Off
Option Explicit On
Imports EnvDTE
Imports System.Diagnostics
Public Module Keyboard
Sub indent4()
Dim selection As EnvDTE.TextSelection
selection = DTE.ActiveDocument.Selection
If selection.IsEmpty Then
DTE.ExecuteCommand("Edit.InsertTab")
Else
DTE.UndoContext.Open("indent4")
selection.Indent(4)
DTE.UndoContext.Close()
End If
End Sub
Sub unindent4()
DTE.UndoContext.Open("unindent4")
DTE.ActiveDocument.Selection.Unindent(4)
DTE.UndoContext.Close()
End Sub
End Module