Skip to content

how to bind the "Ctrl-l" to empty the screen instead of clearing the terminal buffer? #2855

Description

@c02y

I use fish with tmux, fish provides a default binding for "C-l":

bind \cl 'clear; commandline -f repaint'

but it will clear the terminal buffer (leaving only one whole screen of content if I scroll it) and I won't be able to scroll the terminal to view the content or the result of the history commands.

I can make it work by defining a key binding in tmux configuration file, but it seems there is a bug with it because of the conflict of two bindings in fish and tmux. And I have to call a function defined in ~/.config/fish/functions when hitting Ctrl-l (clear and then call the function), so it is better to make a binding in config.fish to replace the default one.

So how can I do that?

Metadata

Metadata

Labels

bugSomething that's not working as intended

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions