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.
0 votes
in vifm by

In Vifm source code, I activated the quick view in the build-aux/ directory by pressing w. The result is:

As shown at the end of the output, there is one directory and 13 files.

Doing the same on the directory data/ produces:

The output is much longer and it is not possible to see the number of directories and files at the end.

Is it possible to scroll through the output, as with e?

If not, could the sentence containing the number of directories and files be moved to the top, so that it provides a quick summary?

1 Answer

0 votes
by

You can do as shown here:

nnoremap <silent> <PageDown>  <C-w>w5j<C-w>w
nnoremap <silent> <PageUp>    <C-w>w5k<C-w>w

It works by switching into preview window (similarl to e), scrolling it, and then switching back.

If not, could the sentence containing the number of directories and files be moved to the top, so that it provides a quick summary?

This can be done as well, but at the cost of traversing directory tree to collect the statistics:

set previewoptions+=toptreestats
by

@xaizek thank you - both are working well

the first one

nnoremap <silent> <PageDown>  <C-w>w5j<C-w>w

nnoremap <silent> <PageUp>    <C-w>w5k<C-w>w

is scrolling down and up

what is RHS?

RHS means right-hand side: the command or key sequence Vifm executes instead
LHS means left-hand side: the key sequence you press

example:

nnoremap <F5> :mkdir< space>

LHS: <F5>

RHS: :mkdir<space>

the second one

set previewoptions+=toptreestats

gives number of dirs and files on the top

However, as you may notice, for large trees it can take a few seconds.

Is it possible to make a mapping like this, to go in :view mode and go at the bottom of the tree:

nnoremap w :view <cr><c-w>wG
by

Is it possible to make a mapping like this, to go in :view mode and go at the bottom of the tree:

noremap w :view <cr><c-w>wG

Sure, but better use view! because it toggles quickview pane without !. You may also add a complementary mapping to quit view mode then:

:qnoremap w <c-w>w:view<cr>
...