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: remove unnecessary usings and format the active file with one click, from anywhere in the file.
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+..
Usage
- Click the broom in the status bar, or
- Press
Ctrl+Alt+U, or - Run C# Broom: Remove Unnecessary Usings and Format from the Command Palette
Cursor position and selection are untouched. Nothing happens when the file has no unnecessary usings.
Requirements
- C# Dev Tools, with its language server running
- VS Code 1.90 or later
License
MIT