Open directory under the cursor in other pane in vifm
Asked Answered
I

2

9

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?

Impish answered 3/5, 2016 at 21:7 Comment(2)
q2a.vifm.info/64/how-can-i-open-current-directory-in-other-paneHinkle
Thanks glider, I'll give it a try!Impish
P
17

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>
Presentative answered 24/8, 2016 at 13:26 Comment(0)
P
4

You can also do:

cd!

this opens the same dir in both panes. try:

cd! /opt
Peruse answered 7/12, 2019 at 3:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.