Super tmux

This commit is contained in:
z3rOR0ne 2023-04-15 23:05:33 -07:00
parent 47b265521c
commit 67a7815ba3
2 changed files with 32 additions and 1 deletions

View file

@ -25,8 +25,17 @@ set -g status-style 'bg=colour4 dim'
set -g pane-border-style "fg=colour4" set -g pane-border-style "fg=colour4"
set -g pane-active-border-style 'fg=colour4' set -g pane-active-border-style 'fg=colour4'
# no status bar
set -g status off
# Navigate tmux panes with Vim style navigation Ctrl-x + hjkl # Navigate tmux panes with Vim style navigation Ctrl-x + hjkl
bind h select-pane -L bind h select-pane -L
bind j select-pane -D bind j select-pane -D
bind k select-pane -U bind k select-pane -U
bind l select-pane -R bind l select-pane -R
# Plugins
run-shell /usr/share/tmux-resurrect/resurrect.tmux
# Use tmux-resurrect with neovim
set -g @resurrect-strategy-nvim 'session'

View file

@ -20,12 +20,22 @@ Ctrl + x + "
OR (personalized) OR (personalized)
Ctrl + x + - Ctrl + x + -
Navigate between windows (vim style): Navigate between panes (vim style):
Ctrl + x + j (navigate one split down horizonatal) Ctrl + x + j (navigate one split down horizonatal)
Ctrl + x + k (navigate one split up horizonatal) Ctrl + x + k (navigate one split up horizonatal)
Ctrl + x + h (navigate one split left vertical) Ctrl + x + h (navigate one split left vertical)
Ctrl + x + l (navigate one split right 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 Create new window
Ctrl + x + c Ctrl + x + c
@ -47,3 +57,15 @@ exit
If you didn't kill the window this way, the session is still open and you can If you didn't kill the window this way, the session is still open and you can
"attach" to that session like so: "attach" to that session like so:
tmux attach 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).