Created
November 14, 2012 04:29
-
-
Save alexmg/4070263 to your computer and use it in GitHub Desktop.
ToggleTabs macro for Visual Studio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub ToggleTabs() | |
If DTE.ActiveDocument.Language = "CSharp" Then | |
Dim currentSetting As Boolean = DTE.Properties("TextEditor", "CSharp").Item("InsertTabs").Value | |
DTE.Properties("TextEditor", "CSharp").Item("InsertTabs").Value = Not currentSetting | |
End If | |
If DTE.ActiveDocument.Language = "SQL" Then | |
Dim currentSQLSetting As Boolean = DTE.Properties("TextEditor", "SQL").Item("InsertTabs").Value | |
DTE.Properties("TextEditor", "SQL").Item("InsertTabs").Value = Not currentSQLSetting | |
End If | |
If DTE.ActiveDocument.Language = "HTML" Then | |
Dim currentHTMLSetting As Boolean = DTE.Properties("TextEditor", "HTML").Item("InsertTabs").Value | |
DTE.Properties("TextEditor", "HTML").Item("InsertTabs").Value = Not currentHTMLSetting | |
End If | |
If DTE.ActiveDocument.Language = "JScript" Then | |
Dim currentJScriptSetting As Boolean = DTE.Properties("TextEditor", "JScript").Item("InsertTabs").Value | |
DTE.Properties("TextEditor", "JScript").Item("InsertTabs").Value = Not currentJScriptSetting | |
End If | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment