Closed sheharyaar closed 4 weeks ago
Yes, I have it installed in my system, when I use fzf from my terminal, it works well. The issue is happening only in Vim.
What do you mean by "crash"? A screenshot?
It opens and closes instantly.
I can't reproduce the problem. Can you check if you still have the issue with the following minimal vimrc?
vim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw)
(https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw)
Happens with the minimal vimrc too.
No clue. Vim version?
Vim Version : VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Aug 11 2024 20:40:17)
I tried a removing vim and all related files and reinstalling, still didn't work.
I also tried switching both the binary and fzf to 0.52.0
, but still didn't work.
Does vim print any error messages? Have you checked the output of :messages
?
No messages there.
Is this the first time you use fzf.vim, or did this suddenly happen after using fzf.vim for a while?
This happened suddenly after using it for a while.
This is something related to my terminal, I was using gnome-terminal
with ayu theme from theme.sh
, so when I ran :terminal
it was spitting out RGB codes : ]10;rgb:0000/0000/0000]11;rgb:ffff/ffff/ffff
, so when I reset the terminal, it works fine.
Can this be a feature request : ignore color escape codes ?
I'd say it's a configuration error. Your shell isn't supposed to output those codes in a non-interactive session. Try this and see if those codes are in the output.
$SHELL -c 'echo hello' > output
vim output
If the codes are in the output, it's going to break many scripts. You have to make sure to load theme.sh
only in interactive mode by putting it in the right file that is only loaded in interactive mode or using a conditional branch like this
if [[ $- =~ i ]]; then
# interactive stuff
fi
Related: https://github.com/junegunn/fzf/issues/1415#issuecomment-593817975
The code gives output as hello
in the vim window, however you are correct, I forgot to put my config under interactive
condition for my shell. Putting it correctly, works! This can be closed now.
Checklist
Output of
:echo system(fzf#exec() .. ' --version')
0.54.3 (af4917db)
OS
Problem / Steps to reproduce
When I use
:Files:
and:RG
the preview window crashes, however when I use:Rg
,:BLines
and:FZF
, the window works fine. I have tried reinstalling fzf and fzf.vim.