Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>C#_BroomNew to Visual Studio Code? Get it now.
C#_Broom

C#_Broom

Bachi Mjavanadze

|
47 installs
| (0) | Free
Organize usings and format the active file from the status bar or a shortcut, no matter where the cursor is. Works with C#, Razor, and project files. Add-on for C# Dev Tools.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C# Broom

Add-on for C# Dev Tools. It does not replace it and does not work without it. It adds the broom button Visual Studio IDE has and VS Code lacks: organize usings and format the active file with one click, from anywhere in the file.

image

Why

C# Dev Tools already offers Remove unnecessary usings, but only through the lightbulb: you have to scroll to the top of the file and put the cursor on an unused using before Ctrl+..

What it does

File types Action
.cs, .csx, .cake Remove unused usings, sort the rest, then format
.cshtml, .razor, .csproj, .fsproj, .vbproj, .slnx, .props Format only

The broom appears in the status bar only for these file types and hides for everything else.

Usage

  • Click the broom in the status bar, or
  • Press Ctrl+Alt+U

Cursor position and selection are untouched. Formatting runs every time, whether or not a using was removed.

Requirements

  • C# Dev Tools, with its language server running
  • VS Code 1.90 or later

Formatting uses the built-in Format Document command, so project files need a formatter registered for XML. Without one, the format step does nothing.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft