0

I was trying see if I can integrate fzf with nvi, but couldn't find a way to do something like :Edit <shell command's output> which would solve my problem.

I tried :source nvi.ex -- it works for a normal file; but when I do mkfifo nvi.ex and then :source nvi.ex, nothing happens even though it waits till I write into the fifo.

I wrote into the fifo like this:

  1. cat - >> nvi.ex
  2. Edit README followed by an Enter and Ctrl-D

Are there cases where a programs treats a fifo differently compared to a normal file?

PS: This works in vi and vim though! nvi version is 1.79.

  • 2
    What about :read !cmd ? – D. Ben Knoble Nov 19 '19 at 3:46
  • Thanks @D.BenKnoble, I will revisit this sometime later; I haven't been using nvi for a while now due to lack of time. Will update you. – Nishant Nov 19 '19 at 10:52
0
  1. fzf has a vim plugin here that might work for you
  2. vim users might try clam from Steve Losh
  3. Vim (not sure about nvi) has a :redir command that can be used to accomplish similar results.
| improve this answer | |
  • 1
    Hey, my question is on using fzf in nvi by Keith Bostic :-) – Nishant Jun 21 '19 at 19:38
  • 1
    @Nishant I’m aware—just trying to help others that may come across similar needs – D. Ben Knoble Jun 21 '19 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.