tmux
tmux
March 13, 2022
Basic configuration
There are a few options to use set.
set-option
: an alias of aset
-s
: server option-g
: global optionsetw
orset-window-option
: window option
See StackExchange: Difference between global, server, session and window options for more details about these options and how they’re effective.
Other references
Plugin management
TPM is a plugin to install plugins easily for tmux.
However, in some cases, plugins aren’t installed correctly.
As a workaround, they can be installed by running ~/.tmux/plugins/tpm/scripts/install_plugins.sh
, reported by this issue.
Copy and paste plugin
Use a plugin tmux-yank.
In order to set the shortcut key same as emacs, set @copy_mode_yank to “M-w”, like set -g @copy_mode_yank "M-w"
Session and window management
- To rename the current session, type
Prefix + $
orPrefix + :
and typerename-session <new session name>
- To rename the current window, type
Prefix + ,
orPrefix + :
and typerename-window <new window name>
- To create new session, type
:new
or:new -s <session name>
- To search a window, type
Prefix + f
- In order to use fuzzy support like fzf, see this article or this github wiki for reference.
Start specific windows automatically
tmuxinator enables to create windows and manage them by configurations
Install
brew install tmuxinator
Set up an environment variable
set -Ux EDITOR vim
Create new project of tmuxinator
tmuxinator new $PROJECT_NAME
Start a session of the project
tmuxinator start $PROJECT_NAME
Last updated on