Description
- I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
- I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
- I have read through the manual page of fzf (
man fzf
) - I have searched through the existing issues
minimum mrc:
set nocompatible hidden laststatus=2
if !filereadable(expand("$HOME/.vim/plug/autoload/plug.vim"))
silent execute "!mkdir " . expand("$HOME/.vim/plug")
silent execute "!git clone https://github.com/junegunn/vim-plug --depth=1 " . expand("$HOME/.vim/plug/autoload")
endif
let &runtimepath .= ',' . expand("$HOME/.vim/plug")
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
call plug#end()
autocmd VimEnter * PlugClean! | PlugUpdate --sync
steps1 . Open gvim -u test.vim
steps2. :Files
workaround:
modify preview.sh (line25):
FILE="${FILE/#~//$HOME/}"
FILE="${FILE//$'\'/'/'}" #add
if [ ! -r "$FILE" ]; then
echo "File not found ${FILE}"
exit 1
fi
symptom2:
Doesn't use bat.
In wsl, enter "sudo apt install bat". The bat is called batcat.
workaround:
modify preview.sh (line56):
if [ -z "$FZF_PREVIEW_COMMAND" ] && command -v batcat > /dev/null; then
batcat --style="${BAT_STYLE:-numbers}" --color=always --pager=never
--line-range=$FIRST:$LAST --highlight-line=$CENTER "$FILE"
exit $?
fi
Any suggestions?