Sunday, August 28, 2011

The BatchFormat Visual Studio Extension (think "Code formatting for lots of your code, two clicks...i.e. batch formatting for your code")

addictive tips - BatchFormat – Remove Unused ‘Usings’ And Format Visual Studio Document

"Do you often find it challenging to clean code file from unnecessary statements, imported snippets, functions, etc., and also to indent code, sort or remove unused Using directives in Visual Studio document? Visual Studio, just like many other software development IDEs, doesn’t provide features to clean the code file from such superfluous content, which makes it hard to not only dry run the code but visually scanning the important code modules present in document a tiresome task as well. What you probably need is a plugin which can automate the process of formatting documents without requiring you to find code format irregularities. BatchFormat is Visual Studio 2010 add-in to format document by removing and sorting different elements of any code file in current solution.

BatchFormat includes 3 options to deal with Using directives in your C # code files – Remove Unused Usings, Sort Usings, and Remove and Sort Usings. For instance, if you want to remove redundant Using directives from the code file, select Remove Unused Usings option from document right-click context menu, present in Solution Explorer, whereas, to remove unused Usings and sort others, go for Remove and Sort Usings option.



Visual Studio Gallery - BatchFormat


Code Batch Format Tool

Areas: Solution, Project, Folder, File.

Function: Remove, Sort, Using, Format Document, and more combinations.



The addictive tips has been doing a bunch for dev/Visual Studio related stories recently. If you don't follow them, you should. I would have missed this Extension if it wasn't for their coverage.

Anyway... There's a number of extensions that doing the "Usings'" thing, but none come to mind that do it in a batch like this extension. Doing a "Sort Usings'"  or "Remove and Sort..." on an entire Solution with two clicks sure sounds pretty darn useful, doesn't it?

No comments: