# tmux

### links

[tutorial](https://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily/)
[cheatsheet](https://tmuxcheatsheet.com/)


### configs

edit file `~/.tmux.conf` as you like

-> [gpakosz github](https://github.com/gpakosz/.tmux/blob/master/.tmux.conf)

*

### keyboard shortcuts

`Ctrl + b` `?` - show keyboard shortcut overview

#### pane

* `Ctrl+b "` — split pane horizontally.
* `Ctrl+b %` — split pane vertically.
* `Ctrl+b arrow key` — switch pane.
* `Ctrl+b z` - maximize pane (and undo maximize)
* Hold `Ctrl+b`, don’t release it and hold one of the `arrow keys` — resize pane.

#### windows
* `Ctrl+b c` — (c)reate a new window.
* `Ctrl+b w` — List all windows.
* `Ctrl+b n` — move to the (n)ext window.
* `Ctrl+b p` — move to the (p)revious window.

#### modes

CTRL+b then [	Enter copy mode.
q	Exit copy mode.
SPACE	Start text selection in copy mode.
ENTER	Copy the selected text.
ESC	Clear the selected text and exit the copy mode.
CTRL+b then ]	Paste the copied text.
h	Move the cursor left.
j	Move the cursor down.
k	Move the cursor up.
l	Move the cursor right.
w	Move the cursor one word forward.
b	Move the cursor one word backward.
CTRL+u	Scroll up half a page.
CTRL+d	Scroll down half a page.
PgUp	Scroll up full page.
PgDn	Scroll down full page.

### configs
#### adaption for zsh powershell10k

Your tmux has two issues.

It cannot display 256 colors. To fix this, create ~/.tmux.conf with set -g default-terminal screen-256color in it and reboot your machine.

It cannot display non-ascii characters. To fix this, install and enable a UTF-8 locale in your OS and reboot your machine.

You can verify that you've fixed tmux by running the following command:

```bash
print -P -- '--> %F{70}\u276E\u276F%f <--'
```