microsoft / microsoft/vscode-isort
Add the "Sort Imports" back to the context menu options as "Organize Imports"
- Dominant language
- Python
- Stars
- 106
- Forks
- 29
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 12
Description
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 command `Shift+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+.` or `Source 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 for `Organize 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
Contributor guide
Research direction
Start by tracing the existing `Organize Imports` command and the VS Code right-click context-menu registration described in the issue. Compare the current menu options with the command available through `Shift+Alt+o`, then verify that unsorted Python imports can be organized directly from the context menu.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100