-
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
Add option to to address all "Unnecessary using directive" #1179
Comments
I don't think we'll add a specific command for this. In VS Code, we'll to have the ability to provide "Fix All in {scope}" like we have in Visual Studio: Now, eventually we might just have a general "clean up" command, but that's definitely different than a specific command only for remove unnecessary usings. |
A general clean up command would be good ala Resharper
…On 3 February 2017 at 20:29, Dustin Campbell ***@***.***> wrote:
I don't think we'll add a specific command for this. In VS Code, we'll to
have the ability to provide "Fix All in {scope}" like we have in Visual
Studio:
[image: image]
<https://cloud.githubusercontent.com/assets/116161/22607335/482dd710-ea0c-11e6-871d-908603064023.png>
Now, eventually we might just have a general "clean up" command, but
that's definitely different than a specific command only for remove
unnecessary usings.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1179 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGapmLeTYtzlh5djPf0w_JXxb0Hfzudks5rY446gaJpZM4L2w8U>
.
|
@DustinCampbell Before I go ahead and raise a separate issue for this, can you confirm if unnecessary usings should be highlighted in some way? If not, is there a specific motivation as to why? Currently I'm having to select each using until I find one that isn't needed so I can use "Remove Unnecessary Usings" to clear them all |
@steve-lillis-cko: Follow the discussion on #1429 for the details. We've added an option in the latest beta of C# for Visual Studio to make hidden diagnostics appear in the editor and Problems tab. |
It would be great to have unnecessary using's to be highlighted (or greyed out, as per VS for Mac) in VS Code. |
@jools-adams: Agreed. I'm tracking microsoft/vscode#20219 to get API support for VS Code so we can do exactly that. |
@DustinCampbell did a separate issue get created for including removal of unused usings in a general cleanup command? As it stands, I need to jump back to VS2017 to efficiently clean up usings. |
Hey @DustinCampbell - that language feature is ready now. Is there an ETA on using it? |
Would love to see this feature added to VSCode. |
Would love to see this added! |
I've become quite accustomed to |
For bonus marks make it possible to use full alphabetical order, or put
system stuff separately.
…On Thu, 1 Nov 2018 at 23:02, andrewb273 ***@***.***> wrote:
I've become quite accustomed to ctr+r,g for C# in VS2017, and using
shift+alt+o/f10 for TS in vscode. Is it an option for the omnisharp
extension to provide an implementation of editor.action.organiseImports
for C#? Seems to be logical & consistent to me, and the fastest way for me
to keep my code clean.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1179 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAidj-wzWZ6lIL3oIpRODxzYa1-aepFFks5uq32hgaJpZM4L2w8U>
.
|
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. I would say removing is more important than sorting to me but having both is having the cake and eating it too. |
Environment data
dotnet --info
output:VS Code version: 1.9.0
C# Extension version: 1.7.0-beta3
Steps to reproduce
Open a project, open the Problems pane. Get numerous information points about
Unnecessary using directive
.Expected behavior
Could there be an option to globally address all these where it loops through those lines and removes the unnecessary usings?
Actual behavior
Nothing, just information/warnings
The text was updated successfully, but these errors were encountered: