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

Change default "Toggle heading" keyboard shortcuts so they don't override VS Code standard shortcuts for fold/unfold. #1337

Open
Balfa opened this issue Sep 27, 2023 · 3 comments
Labels
Area: Input Related to editor input processing (key presses, key bindings). Needs Discussion We haven't decided what to do.

Comments

@Balfa
Copy link

Balfa commented Sep 27, 2023

Proposal

Vanilla VS Code comes with the following default keyboard shortcuts:
Ctrl+Shift+[: Fold (collapse) region
Ctrl+Shift+]: Unfold (uncollapse) region
See https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

This plugin adds its own default keyboard shortcuts that override these.
Ctrl+Shift+[: Toggle heading (uplevel)
Ctrl+Shift+]: Toggle heading (downlevel)

image

This plugin should use different default shortcuts so as not to override the existing vanilla VS Code behavior.

Other information

@yzhang-gh yzhang-gh added Needs Discussion We haven't decided what to do. Area: Input Related to editor input processing (key presses, key bindings). labels Sep 27, 2023
@yzhang-gh
Copy link
Owner

Thanks for the information.

That is interesting. These keybindings were introduced in the very beginning of this extension, which dates back to about 7 years ago (when VS Code didn't ever support folding 😂).

To be fair, I agree that the fold/unfold commands are useful and we would better not override them. But given that this is only for Markdown and personally I am so used to them (for toggling headings), I would keep them for now and would suggest that you custom these keybindings via VS Code's settings.

@Balfa
Copy link
Author

Balfa commented Sep 27, 2023

That is interesting. These keybindings were introduced in the very beginning of this extension, which dates back to about 7 years ago (when VS Code didn't ever support folding 😂).

Yeah, I figured that was probably the situation!

To be fair, I agree that the fold/unfold commands are useful and we would better not override them. But given that this is only for Markdown and personally I am so used to them (for toggling headings), I would keep them for now and would suggest that you custom these keybindings via VS Code's settings.

oh god okay just tell me what to use, though! I hate coming up with my own keybindings 😬

@yzhang-gh
Copy link
Owner

Maybe you can try ctrl (+ shift) + < and >? Not sure whether they are still available as we are running out of keybindings nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Input Related to editor input processing (key presses, key bindings). Needs Discussion We haven't decided what to do.
Projects
None yet
Development

No branches or pull requests

2 participants