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.

Can I hide some folders in vifm?

0 votes
asked Sep 30, 2015 in vifm by anonymous

Is it possible to hide some folders just like how dotfiles are hidden by default?

1 Answer

0 votes
answered Sep 30, 2015 by xaizek

There is :filter command for this. To ignore directories specify trailing slash, like this:

:filter /dirname\//

You probably want to put this into vifmrc.

commented Sep 30, 2015 by anonymous

This works great in the command bar, but not in vimrc, for some reason. I tried many different variations, but the directories that were filtered out still appear.

commented Sep 30, 2015 by xaizek

Try putting it at the very bottom of the file, looks like some other command interferes.

commented Oct 1, 2015 by anonymous

Something is definitely wrong. I used a new vimrc file, and only the last :filter /dirname\// is applied and only so on the left pane.

commented Oct 1, 2015 by xaizek

Right, each next invocation rewrites previous value, this is regular expression so separate several values with |. There was a discussion on commands to add/remove part of filter, but it wasn't implemented, at least not yet.

Regarding only left pane being affected, my bad, I forgot that 0.8 needs :windo prefix for commands and settings to affect both panes:

windo filter /dirname\//
commented Oct 1, 2015 by anonymous

Thanks! Note to others:

windo filter /Desktop\/|Documents\/|Downloads\/|Library\/|Movies\/|Music\/|Pictures\//

Hides ugly OS X folders.

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.
...