Tmux on Mac Os - the basics

🧰 Installing Tmux

Easiest way (as always) — use Homebrew:

brew install tmux

Check if it works

tmux -V

⚡️ Tmux Shortcuts I Actually Use

With Nvim in the picture, there are a lot of shortcuts to remember. Well, here are some of them, and this list will probably grow.

Prefix key: Ctrl + b

Action Shortcut
Split panel horizontally - {prefix}, "
Split panel vertically | {prefix}, %
New window {prefix}, c
Move between panes {prefix}, arrow keys
Switch window {prefix}, n/p
Rename window {prefix}, ,
Close pane/window exit or Ctrl + d
List sessions tmux ls
Detach session {prefix}, d
Reattach to session tmux attach {session no}

⚙️ Config

Creating the config file

touch ~/.tmux.conf

And set some useful options

set -g default-shell /bin/zsh # if zsh is default 

set -g mouse on # use mouse in tmux
setw -g mode-keys vi # enabling vi style key bindings

📌 There will be more

As I learn more about using and abusing tmux, I will be adding some more posts. Probably the next will be tmux plugins. As I've just started using them. So when I learn more, I will make sure to add some of my most useful ones.

Subscribe to My code adjacent corner

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe