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.
+1 vote
in vifm by

One of possible use case:
If I do some specific manual selection, marking files with t I may need to check the content of the file, when i exit viewer, selection is gone. How can I keep selection permanently?

1 Answer

0 votes
selected by
Best answer

Assuming you're talking about :view, which is by default mapped to w key, you might want to change this mapping in vifmrc:

nnoremap w :view<cr>

to this:

nnoremap w :view<cr>gs

which will restore selection after command is executed.

It's not the viewer which resets the selection, but rather execution of most command-line commands behave this way. Introduction of a prefix command that disables resetting of selection was once discussed, maybe it's worth adding such a command.


Hey, gs is good point indeed, I should have noticed it earlier.
Just too new to vifm. Thank you for prompt reply.