Open directory under the cursor in other pane in vifm

2.5k views Asked by At

Is there any shortcut in vifm to open the directory currently marked by the cursor in the second pane? and possibly switch to the other pane as well?

2

There are 2 answers

0
lufterd On BEST ANSWER

The :cd command can receive two arguments, first for the current pane and second for inactive one (as described in this section of manual). This way you can open directory under cursor in other pane with the following command:

:cd %d %c

...where %d is a macro for current directory and %c is macro for file/directory under cursor (see vifm command macros). Or with a single sync command:

:sync %c

You can map it to some key or sequence in your vifmrc (with <Tab> at the end for automatic pane switching):

nnoremap zo :sync %c<CR><Tab>
0
Ярослав Рахматуллин On

You can also do:

cd!

this opens the same dir in both panes. try:

cd! /opt