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