Coder Social home page Coder Social logo

Comments (4)

junegunn avatar junegunn commented on June 3, 2024 1

See junegunn/fzf#2916 (comment)

fzf#run returning values on regular Vim is a happy coincidence, and you shouldn't rely on this behavior because it's not guaranteed if you open fzf in different layouts. And there's no way to implement blocking fzf#run on Neovim unless you set up fzf to open using fzf-tmux. It's a shame we don't have better options.

from fzf.vim.

Jasha10 avatar Jasha10 commented on June 3, 2024

After using the minimal setup using vim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw) I realized that fzf#run already returns the selected line(s). I must have a problem somewhere in my .vimrc that's making fzf#run not return the selected lines.

from fzf.vim.

Jasha10 avatar Jasha10 commented on June 3, 2024

Ok I'm reopening because :echo fzf#run() works with the minimal vim setup but it doesn't work with a minimal Neovim setup!
Steps to reproduce:

  1. Open a minimal neovim setup:
$ nvim --version
NVIM v0.9.1
...
nvim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw)
  1. Run :echo fzf#run(). Nothing is echo'd.

from fzf.vim.

Jasha10 avatar Jasha10 commented on June 3, 2024

Thanks for your reply, @junegunn. If my understanding is correct, the fundamental issue is that vim/neovim have a single-threaded event loop. This makes it difficult to escape from the callback paradigm without using green threads.

Thanks also for the tip about fzf-tmux. I'll give that a try.

from fzf.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.