From dadd4850b32b697e1324e3d9e47f74c01be15500 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 20 Apr 2022 23:55:21 +0800 Subject: Add tmux plugins --- .tmux.conf | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to '.tmux.conf') diff --git a/.tmux.conf b/.tmux.conf index de5fdda..fe3eee7 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -20,8 +20,8 @@ set-window-option -g mode-keys vi bind f command-prompt -p find-session: 'switch-client -t %%' -bind | split-window -h -c '#{pane_current_path}' -bind - split-window -v -c '#{pane_current_path}' +bind v split-window -h -c '#{pane_current_path}' +bind s split-window -v -c '#{pane_current_path}' unbind '"' unbind % @@ -32,13 +32,33 @@ bind k select-pane -U bind l select-pane -R ## resize the pane -bind H resize-pane -L 5 -bind L resize-pane -R 5 -bind K resize-pane -U 5 -bind J resize-pane -D 5 +bind < resize-pane -L 5 +bind > resize-pane -R 5 +bind - resize-pane -D 5 +bind + resize-pane -U 5 # copy and paste like vim bind -T copy-mode-vi 'v' send -X begin-selection bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" if-shell 'test -f "$HOME/.local/.tmux.conf"' 'source ~/.local/.tmux.conf' + +bind C-j command-prompt -p "join pane from: " "join-pane -h -s '%%'" + +# move pane to the far right/left/bottom/top +bind H splitw -fhb \; swapp -t ! \; killp -t ! +bind L splitw -fh \; swapp -t ! \; killp -t ! +bind J splitw -fv \; swapp -t ! \; killp -t ! +bind K splitw -fvb \; swapp -t ! \; killp -t ! + +# Plugins + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-sessionist' +set -g @plugin 'tmux-plugins/tmux-resurrect' + +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @continuum-restore 'on' + +run '~/.tmux/plugins/tpm/tpm' -- cgit v1.2.3