71 lines
1.6 KiB
Text
71 lines
1.6 KiB
Text
Tmux basics:
|
|
|
|
Enter tmux (without attach will create new session):
|
|
tmux
|
|
|
|
Config file: $HOME/.tmux.conf
|
|
|
|
Ctrl + x (prefix, origianlly Ctrl + B)
|
|
|
|
Hide bottom status bar:
|
|
Ctrl + x + z
|
|
|
|
Vertical split
|
|
Ctrl + x + %
|
|
OR (personalized)
|
|
Ctrl + x + =
|
|
|
|
Horizontal split
|
|
Ctrl + x + "
|
|
OR (personalized)
|
|
Ctrl + x + -
|
|
|
|
Navigate between panes (vim style):
|
|
Ctrl + x + j (navigate one split down horizonatal)
|
|
Ctrl + x + k (navigate one split up horizonatal)
|
|
Ctrl + x + h (navigate one split left vertical)
|
|
Ctrl + x + l (navigate one split right vertical)
|
|
|
|
Alternating panes placement:
|
|
Ctrl + x + {
|
|
Ctrl + x + }
|
|
|
|
Resizing panes:
|
|
Ctrl + x + Alt + <left_arrow>
|
|
Ctrl + x + Alt + <right_arrow>
|
|
Ctrl + x + Alt + <up_arrow>
|
|
Ctrl + x + Alt + <down_arrow>
|
|
|
|
Create new window
|
|
Ctrl + x + c
|
|
|
|
Navigate between windows (emacs style):
|
|
Ctrl + x + p (previous)
|
|
Ctrl + x + n (next)
|
|
|
|
Rename a window (for ease of recognition):
|
|
Ctrl + x + ,
|
|
|
|
Kill a window( or exit if only window):
|
|
Ctrl + x + &
|
|
OR (personalized)
|
|
Ctrl + x + x
|
|
|
|
You can also end a session by entering into the terminal:
|
|
exit
|
|
|
|
If you didn't kill the window this way, the session is still open and you can
|
|
"attach" to that session like so:
|
|
tmux attach
|
|
|
|
PLUGINS
|
|
-tmux-resurrect: saves session of tmux even after reboot
|
|
Ctrl + x + Ctrl + s (saves session)
|
|
Ctrl + x + Ctrl + r (resurrects last session)
|
|
|
|
NOTE: saved session files are found in ~/.tmux/resurrect/
|
|
If you wish to restore a previous resurrect "save point", go to this directory
|
|
and:
|
|
ln -sf <file_name>.txt last
|
|
This will soft link the last file (resurrect looks here) to whichever point you
|
|
wish to go to (inspect file contents to find out).
|