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
edited by

I am using set sort=-name at the moment becaus alphabetical order is the easiest way to find something in normal folders, but I need sort=-mtime in the Downloads folder since I need the latest file usually.

Is there some way I can achieve this?

Currently I am doing the following which looks a bit hacky because I don't see a DirLeave event:

autocmd DirEnter * set sort=+name
autocmd DirEnter ~/Downloads set sort=-mtime

1 Answer

+1 vote
selected by
Best answer

Use :setlocal:

autocmd DirEnter ~/Downloads setlocal sort=-mtime

Local options are automatically reset to global values when you change directory.


Ah, I should have thought about that! Thanks @xaizek.

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.

Support Ukraine