aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-22 13:20:13 +0800
committerGuangxiong Lin <[email protected]>2022-04-22 13:20:13 +0800
commit2a52b718c7b1f989665b278f07600f7ffb782f7f (patch)
treead94d1912a2bc4f312a61129144daa503bbabddc
parent811b18bdbd6002f3a8aaa1b85cc25eea70a05934 (diff)
downloaddotfiles-2a52b718c7b1f989665b278f07600f7ffb782f7f.tar.gz
dotfiles-2a52b718c7b1f989665b278f07600f7ffb782f7f.tar.bz2
dotfiles-2a52b718c7b1f989665b278f07600f7ffb782f7f.zip
Integrate fzf into tmux
-rw-r--r--.tmux.conf35
1 files changed, 19 insertions, 16 deletions
diff --git a/.tmux.conf b/.tmux.conf
index f527698..b0961d7 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -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'