-
Notifications
You must be signed in to change notification settings - Fork 23
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 the "Sort Imports" back to the context menu options as "Organize Imports" #343
Comments
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue. |
We have 8 votes now. |
This is driving me nuts too |
I want to better understand the use case here, in settings you can add:
This will trigger this automatically on save. Is that not enough? |
Imo, it's not enough. It is bad UX |
@karthiknadig, the feature request is to revert the following commit that removed a feature and to rename it Also, I must be taking crazy pills if what I wrote is unclear.
Use Case:
|
There was justification, but it was in a meeting about this specific menu item with the wider VS Code team. This decision was not done flippantly or lightly.
Please keep the tone cordial or I will lock this issue. It is not absurd and it was not random. You are welcome to disagree with the decision, but rudeness is not okay.
The reason we ask for a use case is we have our reasons for removing and any amount of code has a maintenance cost. As such, we are willing to at least discuss this with you, but it is not a "free" thing to bring the feature back. And honestly, this extension is already a bit "expensive" to maintain due to isort itself not being actively maintained, leading us to work around some bugs with isort. Also note that if you strongly disagree with us not having the menu item, you can always fork this extension to add it back or create your own extension that just adds the menu item and triggers this extension behind the scenes. |
Thanks for the clarification. The context behind the decision is appreciated. I have a herd of lemons I'm keeping at bay and one got loose. More dangerous than lemmings! Given this newfound insight I ask, is a general code sorting solution in development to serve as replacement? |
Not at the moment. We are talking about it within the team, but no decision has been reached. We got explicitly asked by the wider VS Code team to nest related commands to cut down on vertical real estate in right-click menus, so bringing it back might be a hard sell. |
I miss a lot the context menu options as well. Please add it again. |
And here i am, wondering where the "sort" option was hiding. |
@ohaucke I edited your ✉️ ⬆️ to come off as more 😃 and less 😠, else it would likely would have ended up being hidden. |
Regarding microsoft/vscode-python#22058, I don't understand the justification for this change. It was removed without adequate replacement.
I am aware of
Organize Imports
through the commandShift+Alt+o
but why was it not added to the right-click context-menu?In response to microsoft/vscode-python#20233, it is not redundant. Using Code Actions via
Ctrl+.
orSource Action...
from the right-click context menu does not always provide actions for unsorted imports. I fresh installed vs-code and Python with appropriate extensions, opened one of my Python scripts and unsorted the imports, and attempting to use the above no options were provided to sort imports aside from the command forOrganize Imports
.Perhaps I'm being pedantic but I like having the option to sort imports via context-menu when reading many files with many lines of code. Two mouse-clicks versus taking my hand off the mouse to press three keys. Fewer actions are better.
I think this change should be reverted such that "Sort Imports" becomes "Organize Imports".
😊 Added smiley face to take off the edge of this lemony request
The text was updated successfully, but these errors were encountered: