1

I run two separate instances of vifm on my machine:

$ vifm --server-list
documents
photos

In one I'm organising documents and in the other photos. Sometimes I'm inside a third shell and would like to give commands to one of the vifm instances. Had I only one instance I would do:

$ vifm --remote -c 'normal p'

But that does not allow me to select the instance I'm giving that command to. The first instance (in asciibetical order, from what I tested) is always picked to run the command. In other words, I cannot send commands to the photos instance.

How can I send a command to the photos instance?

1

You need to specify additional argument you already know about (as you named your instances by using it):

$ vifm --help | grep -A1 server-name
  vifm --server-name <name>
    name of target or this instance.

Note this part:

name of target ... instance.

In your case end command will look like the following:

$ vifm --server-name photos --remote -c 'normal p'

P.S. Option name is a bit confusing, but matches corresponding option of Vim.

  • Works like a dream, as a plus i learned something about vim's --servername. – grochmal Jun 13 '16 at 21:11

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.