4 ms·
I've been using tmux for quite a while, though at a fairly casual level. The first thing I noticed is that this interface is discoverable - it shows me what I
by uses 5y ago
I've been using tmux for quite a while, though at a fairly casual level.
The first thing I noticed is that this interface is discoverable - it shows me what I can do, which is incredible and makes me want to use it. The main reason I've been a casual tmux user and not an advanced one despite using it for years, is because every time I want to try something new I have to google if it's possible.
The second thing I noticed is that it uses ctrl-r as a core shortcut. Mega problem: ctrl-r is a built-in bash feature which I use every day to recall previous commands. This makes me think I can't use this tool at all.
I would suggest to consider taking a page from tmux's book. Just use a global modifier key. Ctrl-b is what tmux uses, so you know it's safe. Other software being developed knows they should avoid it, because tmux uses it. By also using it, you'd no longer have to dance around the global space of what shortcuts every software in existence is using. Additionally, if you use ctrl-b to enable your commands, you can minimize your interface. Currently you're using two entire lines to display your menu. That's going to become tiring as I use zellij 8 hours a day for years. I'll have to hide it eventually. Instead, what if you reduced it to zero lines? Put "ctrl-b: menu" in the upper right of your title bar. Pressing ctrl-b now enables commands and shows what your next keypress will do. You have now (1) avoided breaking existing shortcuts, (2) aligned with established standards (3) given some familiarity to welcome tmux users (4) expanded visible screen space and (5) simplified your menu system. You can also now remove ctrl-g since the interface is "locked" by default until I want to start interacting with it.
Anyway that's my 2 cents. Thanks for this exciting demo.
- imsnif 5y agoYou can lock the interface with ctrl-g and then all keys pass through.
- uses 5y agoSee that's also interesting, thanks for the heads up. I saw "lock" previously and pressed it, and it did something besides what I expected. When I think lock, I think it's literally locking the interface in some way so someone can't interact with the software, including myself unintentionally. That's what it means in Windows, MacOS, and even tmux. I would consider just starting out "locked" but change the paradigm. It's not locked, it's just that the menu isn't active. "Unlocking" now becomes enabling the menu/interface - until you disable the menu.
- imsnif 5y agoKeybindings are a hard problem. Doubly so when you're a wrapper that has to also not collide with everyone else's keybindings. :) The idea was that users should spend most of their time in "normal" mode, deferring to "locked" mode only for cases like you mentioned (ctrl-r in bash or in vim). The modal ergonomics are built on that. I'd ideally like to find one word that describes locked mode better than "locked", which I agree is not ideal. I spent quite some time thinking about it and asking others, but most of us are not native English speakers - so maybe there's something obvious we're missing. :)
- neurocline 5y agoWouldn't the word "passthrough" be the right word for this feature?
- imsnif 5y agoThat's a cool idea! I'll run it by some old/new users, see how they react. Thanks!
- ehsanu1 5y agoctlr+r is a very heavily used shortcut for some people. Perhaps that can be configurable?
- imsnif 5y agoAll of the shortcuts are configurable: https://zellij.dev/documentation/keybindings.html https://zellij.dev/documentation/keybindings.html
- mikevin 5y agoI think ctrl r is used frequent enough to warrant a single keychord instead of having to chain though.
- yjftsjthsd-h 5y ago> The second thing I noticed is that it uses ctrl-r as a core shortcut. Mega problem: ctrl-r is a built-in bash feature which I use every day to recall previous commands. This makes me think I can't use this tool at all. In fairness, ctrl-a (screen default) and ctrl-b (tmux default) are also super useful readline shortcuts in bash (c-a = go to beginning of line, c-b = back one character). EDIT: Sorry, I just realized - ctrl-r isn't a prefix, it's a shortcut, isn't it? And they have lots more? Yeah, that's ... a pretty questionable approach; it'll interfere with lots of things.
- Skunkleton 5y agoOddly enough, almost nothing binds the space bar. I've been using ctrl-spc as my tmux prefix for years without a single conflict. I think this is because there is somewhat limited support for ctrl-space on older terminal emulators.
- smabie 5y agoAlso C-space sets the mark on Emacs.
- Skunkleton 5y agoI have been exposed as someone who doesn't use emacs :)
- hzzhang 5y agoSadly for CJK users, C-space is used to trigger the input methods in some operating systems, e.g., MS Windows
- lobstrosity420 5y agoThis is a very good one! I've used it for a while before discovering I prefer to use ctrl-spc to trigger intellisense in neo vim.
- thayne 5y ago> Ctrl-b is what tmux uses, so you know it's safe Ctrl-b is "back one character" in most apps that use readline (including bash) and emacs. For that reason I change my Tmux prefix to Ctrl+Y (I also think it is more ergonomic).
- lobstrosity420 5y agoBut Ctrl+Y is what I use to scroll up in vim! Ultimately I think all ctrl combinations were taken long before tmux came around, you just set it to the one that annoys you less. Ctrl+a seems to be a popular choice. I personally just leave it on the default.
- phibz 5y agoC-b is what tmux uses because it was developed in screen and and C-a was taken. I always change my tmux config to C-a leader and C-a-a for literal C-a
- philsnow 5y agoC-y is yank though (in both emacs and readline); I definitely use yank more than C-b. I switched my .screenrc to use ^O as the escape key; in vim insert mode it's "take the next keystroke(s) from the normal mode keymap" so you can `^O d t $` from insert mode to delete up the end of the line or whatever. I never use that in vim. I don't even remember what exactly it does in emacs, something that inserts a newline. In readline I think it's "accept-and-...something-else", that I also never use. I usually run a single actual terminal, running a "meta" screen session, with one sub-screen session for each project or environment. The outer screen uses ^Z as the escape key because I hardly ever use this for she'll job control (I have ~infinity screen windows, after all).
- jcul 5y agoRegarding the prefix key, I agree CTRL+R may not be the best default choice. But if it is easy to change then I think it is OK. One of the first things I do on a new system with tmux is remap CTRL+B to CTRL+A, as a screen hangover and I think it is more ergonomic anyway. Though it means I've completely given up using CTRL+A / CTRL-X for incrementing / decrementing numbers in vim. I can't think of any programs that have an important use for CTRL-B, that's the tradeoff between uniqueness and usability I guess. I don't think there will be a choice to keep everyone happy or that is totally conflict free.