Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

This question is not directly related to vifm, but I would appreciate any feedback.

I am using nevim as my editor and use nvr to enable remote commands for neovim. Here is what I have for vicmd:

set vicmd=nvr\ --servername\ /tmp/nvimsocket\ --remote 

This works fine and all the edits will be redirected to the existing instance of neovim. However, this doesn't work for bulk renaming. I was wondering if there is any way to define a separate vicmd for specific operations in vifm? Or maybe a conditional vicmd depending on the number of inputs (if only 1 input use above vicmd, if not use nvim, e.g. for bulk renaming)?

Thank you.

1 Answer

+1 vote
by
selected by
 
Best answer

You can try using a wrapper script in $VIFM/scripts/ instead and check number of arguments there, but that won't help in distinguishing all cases. Some thing might not work with --remote in Vim either (those where Vifm waits for editor to finish). In general Vim-specific options are currently hard-coded when invoking an editor.

by

I made a script to check if "$@" contains vifm.rename. This seems to be working. Is there a list of other cases that Vifm requires direct access to vim so that I can include them in the script? Thank you

by

There are at least these two cases:

  1. Opening file and navigating to a specific line (say from :grep menu or on v in view mode)
  2. Opening list of files from a menu using v
by

I added bd! in the search and it seems to be working for all these cases. Thank you.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.

Support Ukraine
...