6 ms·
Among many tricks and tips, I recommend mapping `|` and `-` to split panes: bind-key | split-window -h bind-key - split-window -v More on my wiki: https:/
by rspk 4y ago
Among many tricks and tips, I recommend mapping `|` and `-` to split panes:
bind-key | split-window -h
bind-key - split-window -v
More on my wiki: https://wiki.rsapkf.org/notes/unix/tmux/ https://wiki.rsapkf.org/notes/unix/tmux/
- sodapopcan 4y agoAs an alternative for vertical splitting, using _ (instead of -) means both types of splitting require a `shift` which keeps it a little more symmetrical if that's how your brain works!
- kaapipo 4y agoDepends on your keyboard layout. On my (Finnish) keyboard, | requires alt.
- sodapopcan 4y agoAh right, fair enough!
- __m 4y agoI switched from a German layout to a US layout, mainly because of objective-c with its []. Most default key bindings feel natural that way.
- h4waii 4y agoI don't use it a lot, but it's super handy to have this binding.
- penguin_booze 4y agoI've bound the keys 'v' and 's' for vertical and horizontal splitting to match Vim's default bindings. What tmux calls horizontal and vertical splits is inverse of those in Vim - hence -h flag for what most would call as vertical split. I suspect one of the authors was Australian!
- opan 4y agoThere is ambiguity in vertical / horizontal split. Does it refer to the "cut" or the result? In Sway and i3 if I make a vertical split and open a new window, it appears below (thus vertical), but the split was like a cut horizontally across. I've seen some people use the - and | keys for tmux splits which kind of avoids the language issues and turns it into which way the new line is drawn.
- penguin_booze 4y agoI recognize the ambiguity. I tend to think in terms of the result; so, in vim, I do vertical splitting because I want that result where the cleaving line runs vertically.