junegunn / fzf.vim

fzf :heart: vim
MIT License
9.67k stars 585 forks source link

Reuse a Neovim terminal buffer for all FZF commands #258

Open bohrshaw opened 7 years ago

bohrshaw commented 7 years ago

I suppose in this way every FZF command will be a little faster. Does it have reasons to use a separate buffer?

bohrshaw commented 7 years ago

Especially, call feedkeys('i'.g:FZF_cmd."\<CR>") on a dedicated shell would be a solution.

junegunn commented 7 years ago

Hmm, I don't think it's that simple. I'll see if it's feasible. Check out s:execute_term function of the main plugin file if you're interested. https://github.com/junegunn/fzf/blob/master/plugin/fzf.vim#L458

kozie commented 7 years ago

With "faster", do you mean faster than approx. 3 seconds, @bohrshaw ?

I mean, i like neovim but compared to vim 8, opening fzf related buffers is pretty slow. See the following gif for example where i use the :Buffers command.

Keep up the good work tho, @junegunn. I ❤️ all your stuff

bohrshaw commented 7 years ago

Something is wrong if it takes 3 seconds for executing your :Buffers command.

kozie commented 7 years ago

Well, i don't have a clue what could cause that tho.

In case the information would be of any help, i'm using as follows:

fish 2.5.0
Neovim 0.1.7
fzf 0.16.6
tmux 2.3
Mac OS X 10.12.2

My configurations (such as .config/fish/config.fish, .vimrc and .tmux.conf) can be seen from my Dotfiles repo.

junegunn commented 7 years ago

3-second delay is definitely not normal. It should pop up instantly. You might want to check if the problem still persists with the following minimal setup.

nvim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw)

(https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw)

kozie commented 7 years ago

Thanks @junegunn. I couldn't use the less-than sign because i'm using fish so i just downloaded the file and linked it manually.

With that configuration fzf buffers seem to be opening instantly so something seems to be wrong with my .vimrc obviously ^_^. I think i'm going to dig into my config, perhaps disable a bunch of modules

Any extra tips are welcome :)

Also, how would you do nvim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw) in a fish shell environment?

junegunn commented 7 years ago

Sorry, but I don't use fish, so I have no idea. Honestly, I'm not really fond of non-standard syntax of fish.

kozie commented 7 years ago

np. tho i found the culprit of my slow terminal/fzf buffers. GitGutter seems to be the issue. I added . { 'on': 'GitGutterEnable' } to fix it for now. I may remove the plugin if i don't seem use or miss it.

Thanks for your help, guys :)

wilriker commented 7 years ago

@kozie In fish you have to run this as

$ nvim -Nu (curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw -o - | psub)
kozie commented 7 years ago

Cewl, Thanks @wilriker :)

lukelex commented 1 year ago

Is this on a future roadmap or is it dead at this point?