diff options
author | Guangxiong Lin <[email protected]> | 2022-04-22 13:20:13 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-04-22 13:20:13 +0800 |
commit | 2a52b718c7b1f989665b278f07600f7ffb782f7f (patch) | |
tree | ad94d1912a2bc4f312a61129144daa503bbabddc | |
parent | 811b18bdbd6002f3a8aaa1b85cc25eea70a05934 (diff) | |
download | dotfiles-2a52b718c7b1f989665b278f07600f7ffb782f7f.tar.gz dotfiles-2a52b718c7b1f989665b278f07600f7ffb782f7f.tar.bz2 dotfiles-2a52b718c7b1f989665b278f07600f7ffb782f7f.zip |
Integrate fzf into tmux
-rw-r--r-- | .tmux.conf | 35 |
1 files changed, 19 insertions, 16 deletions
@@ -1,3 +1,22 @@ +# 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 'sainnhe/tmux-fzf' +TMUX_FZF_OPTIONS="-p 80%,80% -m" +TMUX_FZF_PREVIEW=0 +bind f run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh attach" + +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @continuum-restore 'on' + +if "test ! -d ~/.tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" +run '~/.tmux/plugins/tpm/tpm' + # general unbind C-b @@ -18,8 +37,6 @@ set-window-option -g mode-keys vi # navigation -bind f command-prompt -p find-session: 'switch-client -t %%' - bind v split-window -h -c '#{pane_current_path}' bind s split-window -v -c '#{pane_current_path}' unbind '"' @@ -50,17 +67,3 @@ 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' - -if "test ! -d ~/.tmux/plugins/tpm" \ - "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" -run '~/.tmux/plugins/tpm/tpm' |