fzf.vim
fzf.vim copied to clipboard
Error with :GFiles
- Category
- [x] Question
- [x] Bug
- [ ] Suggestion
- OS
- [x] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
- Vim
- [ ] Vim
- [x] Neovim
I'm encountering an odd problem, and don't know how to proceed. I've installed fzf with the following:
Plug 'junegunn/fzf', { 'dir': $HOME.'/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Everything works correctly, except :GFiles
. When I run :GFiles
from a git repo, I get:
Error detected while processing function fzf#vim#gitfiles[6]..<SNR>103_fzf[18]..fzf#run[64]..<SNR>27_execute_term[73]..<SNR>27_dopopd:
line 20:
E716: Key not present in Dictionary: dir
E15: Invalid expression: s:fzf_getcwd() ==# w:fzf_pushd.dir
Error detected while processing function fzf#vim#gitfiles:
line 6:
E171: Missing :endif
To make things more confusing, if I run the minimal vim configuration suggested here (vim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw)
, :GFiles
then works. I have tried to replicated this by removing everything except the lines relating to fzf from my configuration, but still get the same error.
Any suggestion what to look at next would be appreciated!
I have the same issue for some repo's. but it worked for others.
I get the same error after applying this setting :set shellcmdflag=-ci
I'd like to use these flags for zsh so it reads my zshrc file when running a command in the neovim terminal.
I had the same problem after I switched to the fish shell. Putting set shell /usr/bin/zsh
(or /usr/bin/bash) into my .vimrc fixed this
has any echo
in your fish config?
remove that echo
may be resolve the problem
It started happening for me, but only for tmux sessions. Else it works fine. Only on GFiles, everything else works.
I have the same problem in windows. I am using powershell to launch neovim
Getting the same issue on macos catalina, fish shell and neovim
Error detected while processing function fzf#vim#gitfiles[6]..<SNR>100_fzf[18]..fzf#run[64]..<SNR>19_execute_term[73]
..<SNR>19_dopopd:
line 20:
E716: Key not present in Dictionary: dir && (!&autochdir || w:fzf_pushd.bufname ==# bufname(''))
E15: Invalid expression: s:fzf_getcwd() ==# w:fzf_pushd.dir && (!&autochdir || w:fzf_pushd.bufname ==# bufname(''))
Error detected while processing function fzf#vim#gitfiles:
line 6:
E171: Missing :endif
edit - @tom-anders answer solved my issue
Had the same issue (Obarun Linux, zsh, neovim).
It was caused by the
stty -ixon
stty -ixof
settings in my zshenv file.
After disabling them the :GFiles command works as expected.
Was this solved? Or any one have an advice?
I have the same issue even with :Files on macOS Catalina. No idea what is causing it… I tried an empty zshrc, within tmux, not within tmux, with Terminal.app, with kitty, with alacritty… Any help would be greatly appreciated. Even when removing EVERYTHING except vim-plug and fzf in my init.vim it doesn't work. The minimal configuration does work. It is very confusing.
Edit: I just realized that I tried the minimal configuration with vim and not nvim. Running the minimal configuration with nvim does have the same problem.
I also have this problem but only if I'm opening files in one specific directory in my project. I'm using Vim 8.2 on Arch.
same here, but for me it used to work for long and suddenly at some points it stopped working :/
experiencing the same with fish shell, neovim and tmux.
For me this issue happened after installing nvm (node version manager) by fisher, after removing nvm this bug disappeared. For reference: this is the plugin I installed.
For me this issue happened after installing nvm (node version manager) by fisher, after removing nvm this bug disappeared.
Nopes, it doesn't work for me, only works on vim but not in neovim, I even tried bash shell still the problem exist
I had the same issue and fixed it by running npm install -g neovim
. Was missing the neovim provider when using :checkhealth
. Not sure why though, it was working but it stopped after I installed an npm package.
I had an error message when I opened a new terminal (something missing in my .zshrc
), once fixed the issue disappeared. I didn’t noticed for some time that the two were related.
I had the same problem after I switched to the fish shell. Putting
set shell /usr/bin/zsh
(or /usr/bin/bash) into my .vimrc fixed this
This is what worked for me. I am using fish and had set shell=fish
in my init.vim. I changed it to set shell=zsh
and it works now.
I had an error in my .config/fish/config.fish
that caused these symtoms. When I fixed my config.fish
, fzf went back to working without problems.