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

Preserve tab names on rename #2854

Open
Kitchi opened this issue Oct 13, 2023 · 4 comments
Open

Preserve tab names on rename #2854

Kitchi opened this issue Oct 13, 2023 · 4 comments

Comments

@Kitchi
Copy link

Kitchi commented Oct 13, 2023

When I have previously named a tab, and then I want to rename it, the original name is fully deleted. It would be nice if the current name was preserved, so minor modifications are made much easier.

For example, If I ctrl-t n and then ctrl-t r to name the tab my_tab_1 when I ctrl-t r to change the name of the tab, it goes completely blank. So If all I want to do is change it from my_tab_1 to my_tab_2 that becomes quite cumbersome. This will also make the behaviour consistent with how tmux handles tab renaming.

@orium
Copy link

orium commented Jun 21, 2024

👍 Often time I'm renaming because of a typo, and I don't need to rewrite the entire thing.

@cristiand391
Copy link
Contributor

You can achieve this by modifing the default keybind:

from:

...
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
...

to:

...
bind "r" { SwitchToMode "RenameTab"; }
...

see:
https://zellij.dev/documentation/configuration

@orium
Copy link

orium commented Jun 21, 2024

Ah, that's great! Thanks @cristiand391.

@orium
Copy link

orium commented Jun 23, 2024

I've tried bind "r" { SwitchToMode "RenameTab"; } and that doesn't quite work: there's no cursor so I can only append to the end of the existing name or delete characters at the end.

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

3 participants