Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
+1 vote
in vifm by

Hi,

I added commands to my $MYVIFMRC that can synchronize the view of the next tab to the current pane's directory or directory under the current cursor. Just posting it here in case it's useful for anyone else and in case anyone wants to suggest another alternative.

" Sync next tab to current directory
command! TabSync : let $DIR_CUR = "%d"
                \| tabnext
                \| cd "$DIR_CUR"
                \| tabprev
nnoremap <a-u> :TabSync<cr>
" Sync next tab to directory under cursor
command! TabSyncCursor : let $DIR_CUR = "%c"
                      \| tabnext
                      \| cd "$DIR_CUR"
                      \| tabprev
nnoremap <a-p> :TabSyncCursor<cr>

I use it in combination with other sync keymaps like below:

" Sync other pane to current directory
nnoremap <a-i> :sync<cr>
" Sync other pane to directory under cursor
nnoremap <a-o> :sync %c<cr>

Your answer

Preview

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
Please answer the question:
To avoid this verification in future, please log in or register.
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.
...