-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Clear terminal with keyboard shortcut rather than a command #11584
Comments
You're free to bind the action to whatever you'd like. Try maybe: { "keys": "ctrl+shift+k", "command": { "action": "clearBuffer", "clear": "all" } }, |
This action is not recognized:
|
Where are you getting that error? The schema validator in your editor, or from the Terminal itself? I may have forgot to update the schema... Which version of the Terminal are you using? |
I assume this is in a more recent version? I have |
I get it in the JSON validator inside VS Code when I edit settings. |
|
Btw it might be a good idea to make this be a built-in shortcut considering how many MacOS-familiar devs are probably going to be looking for it as they migrate to Windows 11. |
Ah! Okay, this makes sense. There's a number of things happening here.
This was implemented in #10906 to close /duplicate #1882. You can follow that bug (1882) to get a notification when this moves into Stable, or install Preview today and bind it, OR wait six or so weeks for preview 1.12 to move to stable. |
This comment has been minimized.
This comment has been minimized.
Why not Ctrl-Shift-K if it's not already in the defaults? |
Also is there a way to get this behavior now, by sending some sort of special ANSI escape code to the terminal or something, via a custom shortcut, which would do the same thing that the upcoming feature internally does? Like, it looks like the special code is |
A client application can clear the entire buffer by emitting There's nothing Terminal itself can send into the input stream that'll affect a clear. If there were, #10906 would not have been required!
Fair. We're still trying to avoid binding more keys by default. Still, it's something we can consider. |
Thanks. And that PR does not clutter command history like |
Correct! |
+1 for a default keyboard shortcut - I'd like to be able to easily tell a teammate "punch <shortcut>". Granted, I could set that up in the team's automated installer with fragments, but it would be nice to have a global standard across the world😄 See also: |
Description of the new feature/enhancement
In Apple Terminal, I'm used to pressing Cmd-K to clear the terminal. This is quicker and easier than typing
clear
, and doesn't clutter my command history either. I'm aware of binding a keyboard shortcut to do this, but that doesn't have the advantage of keeping my command history uncluttered.Proposed technical implementation details (optional)
The text was updated successfully, but these errors were encountered: