From 3d5975f24c8913da9d903b94c5beeacd2e9846e1 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 3 Feb 2021 11:02:38 +0300 Subject: [PATCH] fzf --- bin/bin/{path-extractor.zsh => pe} | 1 + bin/bin/tmux-path-extractor.sh | 2 +- vim/.vim/plugin/fzf.vim | 1 + zsh/.zshenv | 2 ++ zsh/.zshrc | 4 ++++ 5 files changed, 9 insertions(+), 1 deletion(-) rename bin/bin/{path-extractor.zsh => pe} (94%) create mode 100644 vim/.vim/plugin/fzf.vim diff --git a/bin/bin/path-extractor.zsh b/bin/bin/pe similarity index 94% rename from bin/bin/path-extractor.zsh rename to bin/bin/pe index 2a93173..8b64702 100755 --- a/bin/bin/path-extractor.zsh +++ b/bin/bin/pe @@ -15,6 +15,7 @@ done [[ $ctr -le 20 ]] && print -C 1 $toprint || print -c $toprint print -n "> " read choice < /dev/tty +[[ "$choice" = "q" ]] && exit if [[ "$choice" = "*" ]]; then buf=$fns else diff --git a/bin/bin/tmux-path-extractor.sh b/bin/bin/tmux-path-extractor.sh index 2e2e385..4375c59 100755 --- a/bin/bin/tmux-path-extractor.sh +++ b/bin/bin/tmux-path-extractor.sh @@ -2,7 +2,7 @@ tmux has-session -t path-extractor && tmux kill-session -t path-extractor || : tmux new-session -d -s path-extractor " - ~/bin/path-extractor.zsh < /tmp/tmux-buffer + ~/bin/pe < /tmp/tmux-buffer tmux detach sleep 20 " diff --git a/vim/.vim/plugin/fzf.vim b/vim/.vim/plugin/fzf.vim new file mode 100644 index 0000000..cd8284a --- /dev/null +++ b/vim/.vim/plugin/fzf.vim @@ -0,0 +1 @@ +let g:fzf_preview_window = [] diff --git a/zsh/.zshenv b/zsh/.zshenv index 9bb0605..d455788 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -93,4 +93,6 @@ export DBUS_SESSION_BUS_ADDRESS=disabled: export MYSQL_HISTFILE=/tmp/.mysql_history export REDO_JOBS=0 REDO_NO_SYNC=1 export SHARNESS_TEST_SRCDIR=$HOME/local/stow/sharness/share/sharness +export FZF_CTRL_T_COMMAND="print -C 1 **~.git/*" +export FZF_DEFAULT_OPTS="--inline-info" # }}} diff --git a/zsh/.zshrc b/zsh/.zshrc index 99f9b08..e5f02ab 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -208,3 +208,7 @@ ZSH_HIGHLIGHT_STYLES[path_pathseparator]="fg=white,bold,underline" . ~/work/zsh-autosuggestions/zsh-autosuggestions.zsh ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=cyan" # }}} + +# fzf {{{ +. ~/work/fzf/shell/key-bindings.zsh +# }}} -- 2.44.0