-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove unused usings #1245
Comments
This is really a duplicate of #1179. |
Bump!... This reasonably basic capability is a big miss on Visual Studio Code. I'm so used to having this from VS2017 and before and when you have loads of .cs files and many have a lot of using statements there is no way to cull the list without a majorly time-consuming effort. Please can we have the capability to remove unused using statements - either through keyboard shortcut or through document formatting. |
Any update on this? I would really love to have this available... It is so nice in VS to be able to run a keystroke and it remove & sort my usings. |
Any update on this? |
Any updates, guys? We really would like to see this feature in VSCode. |
How would one go about implementing this? Happy to have a crack, given some direction. |
I think this can be handled by OmniSharp/omnisharp-roslyn#1581 once it's ready, it might be good idea to add shortcut key support for "Fix all auto fixable issues at current document" (?) |
@savpek That's a fantastic idea. Do you know if/when OmniSharp/omnisharp-roslyn#1581 is going to be shipped? |
should not be long |
@filipw Any updates on this issue? |
is there any news on this? jesus i dont see how this is still not implemented? |
lololol at this still not being implemented yet. I'm over here living in 2021 bro |
it is already implemented. press |
Closing as this has been implemented. |
@filipw Thanks for the update. One clarifying question, do you know if this is possible when formatting? Thanks! |
unfortunately not at the moment. there is only an option to sort the usings on formatting (https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#13410---2020-01-27) |
Environment data
dotnet --info
output:VS Code version: 1.9.1
C# Extension version: 1.7.0
Steps to reproduce
Search in Command Palette for "Remove Unused Usings" or "Remove Unnecessary Usings" command.
Expected behavior
Option to "Remove Unused Usings" or "Remove Unncessary Usings" is available in Command Palette. Executing the command will remove all unnecessary usings from the active .cs file.
Actual behavior
No feature exists.
Expecting a feature like this (from VS 2015):
This issue seems very similar to #788 but I think removing unused usings is a much different feature from sorting. Removing usings prevents code warnings, shortens code, etc.
The text was updated successfully, but these errors were encountered: