diff --git a/.tmux.conf b/.tmux.conf index 5858d03d..80a4e0ce 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -25,8 +25,17 @@ set -g status-style 'bg=colour4 dim' set -g pane-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 bind h select-pane -L bind j select-pane -D bind k select-pane -U 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' diff --git a/tmux_basics.txt b/tmux_basics.txt index 532d3ca7..fd3c3911 100644 --- a/tmux_basics.txt +++ b/tmux_basics.txt @@ -20,12 +20,22 @@ Ctrl + x + " OR (personalized) Ctrl + x + - -Navigate between windows (vim style): +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 + +Ctrl + x + Alt + +Ctrl + x + Alt + +Ctrl + x + Alt + + Create new window 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 "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 .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).