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
edited by

I'm working on integrating Vim and Vifm through server-name functionality. I want to implement IntelliJ's functionality of selecting current file in the project view. That is to issue a command from inside Vim specifying a full path to Vifm, something like

vifm --server-name blah-blah -c ':focus /some/absolute/path'

Provided that Vifm instance is already running, I want it to focus (select) the file I specified.

EDIT: I also want to keep a tree view, so --select alone doesnt' cut it, because it switches to a regular view.

1 Answer

+1 vote
by
selected by
 
Best answer

Use --select option:

vifm --server-name blah-blah --remote --select /some/absolute/path
by

That's cool, but I also want to keep the tree view. Looks like using --select, setting a mark, going back, enabling the tree view and then going to the mark will do what I want.

by

There is also :goto command, but it leaves tree-view as well, maybe it shouldn't. So looks like you have to use the workaround with the mark.

...