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

I am looking for a way to select a file in the other pane which has the same name as the current file in current pane and copy it to current pane.

The way I do this right now is to do a / search for the filename in the current pane until it is a unique hit, and then tab over to the other pane and redo the search, then copy the file. A little awkward with more than a handfull of files. It would be sligtly less work if I knew how to put the current filename into the search without actually typing the filename.

1 Answer

0 votes
by

It would be sligtly less work if I knew how to put the current filename into the search without actually typing the filename.

After switching to another pane do / Ctrl+X Ctrl+X c to insert name of current file in the other pane (docs).

Alternatively you can do something like this (note that this will overwrite without warnings):

:execute 'wincmd w' | execute "norm /^".expand('%c')."$\r" | co! | wincmd w
...