Sort dotfiles/dotdirs separately from other files/directories
By (ab)using the sortgroups option, you can split all the listed files into two groups - one containing items with a . prefix, and one containing all the other items.
" Show dotfiles/dotdirs in the first place
set dotfiles
set sortgroups='(|\.).*'
set sort=+groups,+dir,+name
Explanation[edit]
The sortgroups option is used to select parts of each filename via regex group matches, and use those parts as sorting keys.
In the regex (|\.).*, the group (|\.) matches either an empty string, or the literal . character; the .* part matches the rest of the filename. So our group match is either an empty string, or a single . character; the filenames are then sorted into two groups based on which one it is.
We then set the sort option. Vifm will first sort the files according to the two groups generated by sortgroups, then sort directories above files, then sort alphabetically.
Ultimately, we get the following order - directories, files, dotdirs, dotfiles. By changing the sort order of any of the options (changing + to - in the sort option), the ordering can be varied while keeping the grouping. For example,
set sort=-groups,+dir,+name
will present as dotdirs, dotfiles, directories, files.