Skip to content
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

Stable Action of "Select Indentation" (for shortcut key registration) as workbench.action.editor.* #220135

Closed
a4lg opened this issue Jul 6, 2024 · 5 comments
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality

Comments

@a4lg
Copy link

a4lg commented Jul 6, 2024

Current Status

On the bottom right side of the editor window, we normally have those status controls.

image

Many of those display the current information and clicking enables changing them.

Note that, many of such "changing" actions are available as actions (which shortcut keys can be assigned) so that we don't need to move a hand out from the keyboard (even if "choosing menu" is displaying, it can be selected purely from keyboard).

  • We can change the language (current: JSON with Comments) by the action workbench.action.editor.changeLanguageMode and
  • we can change the EOL (current: LF) by workbench.action.editor.changeEOL.
  • We can even change the encoding (current: UTF-8) by workbench.action.editor.changeEncoding.

... But we cannot change the indentation settings (current: Tab Size: 4) in a stable way.

It currently has an action per window (changeEditorIndentation1, changeEditorIndentation2...) and setting a shortcut key will work on some windows but not others.

NOT a solution

We already have

  • "Indent Using Spaces" (editor.action.indentUsingSpaces)
  • "Indent Using Tabs" (editor.action.indentUsingTabs)
  • ...

but I don't consider those actions as the solution because... why do we have to register multiple separate shortcut keys when we have a nice menu like this when we click the current indentation?

image

Request

Can we have a stable action to change current indentation settings under workbench.action.editor (like workbench.action.editor.changeIndentation), not unstable changeEditorIndentation*?

It seems VSCode changed changeEditorIndentation to changeEditorIndentation{num} to fix a bug (#205169) so there may be an obstacle to implement it. Still, I'd be happy this feature to be implemented and at least I'm good to hear why this is difficult/different from other actions.

@hediet
Copy link
Member

hediet commented Jul 9, 2024

@bpasero Should 74724fb not register a command per window, but instead look up in the command handler which is the focused window?

@bpasero bpasero added feature-request Request for new features or functionality editor-core Editor basic functionality labels Jul 9, 2024
@bpasero bpasero removed their assignment Jul 9, 2024
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Jul 9, 2024
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Copy link

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@ljorring
Copy link

ljorring commented Sep 2, 2024

I frequently used the changeEditorIndentation command, so when it suddenly broke, it impacted my workflow. In my confusion I made this stackoverflow post before stumbling upon this thread.

Thanks for reporting the issue. Since it doesn't look like it will be accepted, let me please know, if someone finds a workaround.

Copy link

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

6 participants