Quick Indent Modifier VS Extension

This article was posted by Michał Dudak on 2016-04-28 in Tools

Do you often work on projects with different code style settings? Are you tired of constantly changing Visual Studio indentation settings from tabs to spaces and back again? Editorconfig not working well (or you can’t use it)?
Well, I had these problems, so I decided to write a Visual Studio extension allowing to quickly change the indentation settings. Let me introduce Quick Indent Modifier – now tabs or spaces can be just one click away!

Quick Indent Modifier it’s an extremely simple tool – it registers two commands that can be accessible from the toolbar or with a keyboard shortcut.
To install, either go to Visual Studio Gallery, then download and install the vsix file, or look for the Quick Indent Modifier extension in the Extensions and Updates window in Visual Studio.

To have the commands accessible from the toolbar right-click on the empty area in the toolbar, and select Customize…, optionally create a new toolbar, then go to the Commands tab. Select a toolbar you want to edit, press New Command and select Tools/Use tabs or Tools/Use spaces. I’m going to make the extension itself create a toolbar but it hasn’t been implemented yet.

New command dialog in Visual Studio showing Quick Indent Modifier commands

If you also would like to use keyboard shortcuts, just go to Options, and select Environment/Keyboard, then look for the Tools.UseTabs and Tools.UseSpaces commands. Assign whatever keyboard shortcut you like.

Keyboard shortcuts in Visual Studio showing Quick Indent Modifier commands

The extension works by setting the indentation option globally, for all languages (it is a direct equivalent of going to Tools/Options/Text Editor/All Languages/Tabs and selecting tabs or spaces).

If you use it, please rate in and leave a review on VS Gallery.
You may also contribute to the code (it’s on GitHub), in case you found any bugs or areas that can be improved.

Happy coding!

No comments so far. Start the discussion!

Leave a Reply

Your email address will not be published. Required fields are marked *