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

Allow clearing pane like iterm CMD-k #747

Closed
metalelf0 opened this issue Jul 26, 2018 · 5 comments
Closed

Allow clearing pane like iterm CMD-k #747

metalelf0 opened this issue Jul 26, 2018 · 5 comments

Comments

@metalelf0
Copy link

One of my favourite features in iterm2 is the ability to completely clear the screen (and the scrollback buffer as well) with a single keystroke. No matter what's on the screen, it all gets cleared. Do you think something similar is achievable with kitty? The main thing is, doing it without having to put the current process in background to enter a shell command or send some key sequence.

@metalelf0
Copy link
Author

You're the man! Thanks a lot, this is exactly what I needed! Great job! :) :) 👍

metayan pushed a commit to metayan/kitty that referenced this issue Aug 1, 2018
It takes parameters so you can define your own shortcuts to clear the screen/scrollback also. Fixes kovidgoyal#747
@ceautery
Copy link

I'd like to add a small addendum to this: The new scrollback clearing code does wipe scrollback, but then only clears the screen and moves your cursor to the upper-left corner, without redrawing the prompt. This can be combined with sending a hex 0c (ctrl-L, which will tell the os to redraw the prompt) to the terminal with this config entry:

map cmd+k combine : clear_terminal scrollback active : send_text normal \x0c

...which makes cmd-k act as you'd expect if you're switching over from iTerm.

yurrriq added a commit to yurrriq/dotfiles that referenced this issue Oct 3, 2018
@rwanyoike
Copy link

map cmd +k combine : clear_terminal scrollback active : send_text normal,application \x0c is what worked for me

@dowlandaiello
Copy link

map cmd+k send_text terminal,application \x63\x6C\x65\x61\x72\x0A seems to be working for an ohmyzsh + kitty configuration on macOS.

@nihuynh
Copy link

nihuynh commented Feb 25, 2021

map cmd+k : send_text terminal,application \x63\x6C\x65\x61\x72\x0A
or for linux :
map ctrl+k : send_text terminal,application \x63\x6C\x65\x61\x72\x0A
Not much but here you go :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants