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

I'd like to use vifm in two different contexts, with different settings. One would be specific to a project, the other user-wide. Is it possible to have vifm use a vifmrc file different than the global and local ones? (I'm thinking of something like vim's set exrc setting).

edit: I think I can achieve what I want with the -c flag.

1 Answer

0 votes
by
 
Best answer

There are several ways:

  1. Define $MYVIFM before invoking vifm to specify path to custom configuration file. User's configuration file won't be loaded, but $VIFM directory will be as usual (you'll continue using the same color schemes and vifminfo file).

  2. Define $VIFM to specify where to look for vifmrc, vifminfo and everything else. This will make configuration state local to that directory.

  3. Just source custom file on command line:

     vifm -c 'source additional-vifmrc'
    

    Everything will be shared with instances run as vifm.

by

Having both user and project scopes is ideal, with project settings overwriting any matching user settings (e.g. millerview on at the user level, millerview off at the project level). $MYVIFMRC would just skip user settings in that sense if I understand correctly.

This is the solution for me:
vifm -c 'source additional-vifmrc'

Thank you for the answer!

...