Vifm startup: How to make vifm remember the last cursor/selector positions on startup?

596 views Asked by At

Vifm remembers the the last cursor/selector positions, so for example, if you move into a folder that contains files and move the cursor to the last file of that directory, then leave the directory and enter it again, the cursor/selector will be at the last highlighted (in this example the last) file.

How can I achieve this behavior on vifm startup? (So that the cursor/selector highlights the chain of all lastly highlighted items before exiting vifm?)

1

There are 1 answers

3
xaizek On BEST ANSWER

From documentation on command-line options (here):

vifm starts in the current directory unless it is given a different directory on the command line or 'vifminfo' includes "savedirs" (in which case last visited directories are used as defaults).

From documentation on 'vifminfo' option (here):

savedirs - save last visited directory (requires dhistory)

Sample vifmrc actually includes this:

set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
    \phistory,fhistory,dirstack,registers,bookmarks,bmarks

If you're not using it or changed it, just make sure that dhistory and savedirs are both included.