fzf-tab isn't so great

This commit is contained in:
Bartek Stalewski 2020-10-26 16:46:04 +01:00
parent ea3ad206d7
commit cc46a4c143
2 changed files with 4 additions and 11 deletions

View File

@ -28,7 +28,6 @@ echo "export XDG_CONFIG_HOME=~/.config" >> ~/.zshenv
echo "export XDG_DATA_HOME=~/.cache" >> ~/.zshenv echo "export XDG_DATA_HOME=~/.cache" >> ~/.zshenv
echo "export ZDOTDIR=~/.config/zsh" >> ~/.zshenv echo "export ZDOTDIR=~/.config/zsh" >> ~/.zshenv
mkdir -p ~/.cache/zsh ~/.config/zsh/plugins ~/.config/zsh/themes mkdir -p ~/.cache/zsh ~/.config/zsh/plugins ~/.config/zsh/themes
git clone https://github.com/Aloxaf/fzf-tab ~/.config/zsh/plugins/fzf-tab
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.config/zsh/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.config/zsh/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.config/zsh/plugins/zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.config/zsh/plugins/zsh-syntax-highlighting
git clone https://github.com/romkatv/powerlevel10k.git ~/.config/zsh/themes/powerlevel10k git clone https://github.com/romkatv/powerlevel10k.git ~/.config/zsh/themes/powerlevel10k

View File

@ -8,17 +8,15 @@ HISTFILE=$XDG_DATA_HOME/zsh/history
setopt inc_append_history setopt inc_append_history
setopt share_history setopt share_history
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ''
zmodload zsh/complist
source $XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source $XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source $XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
if [ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ]; then if [ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ]; then
source $XDG_CONFIG_HOME/fzf/fzf.zsh source $XDG_CONFIG_HOME/fzf/fzf.zsh
source $XDG_CONFIG_HOME//zsh/plugins/fzf-tab/fzf-tab.plugin.zsh
zstyle ":completion:*:git-checkout:*" sort false
zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath'
export FZF_TMUX_HEIGHT=60%
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd' export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd' export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
export FZF_DEFAULT_OPTS="--multi -e --ansi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=gruvbox {}'" export FZF_DEFAULT_OPTS="--multi -e --ansi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=gruvbox {}'"
@ -33,10 +31,6 @@ if [ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ]; then
git -c color.status=always status --short | git -c color.status=always status --short |
fzf --ansi --preview '(git diff --color=always -- {-1} | sed 1,4d; cat {-1})' fzf --ansi --preview '(git diff --color=always -- {-1} | sed 1,4d; cat {-1})'
} }
else
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ''
zmodload zsh/complist
fi fi
source $XDG_CONFIG_HOME/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme source $XDG_CONFIG_HOME/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme