Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

1 Answer

0 votes
by

There is no way to do that at the moment, sorting by extension always takes case into account.

by

Xaizek, thanks for your quick answer.

I like to sort my files by extension.
But some software changes the case of its working files - arbitrarily, especially under Windows.

For example, we have the following files sorted by ext:
01.jpg 02.jpg 03.jpg

After edit&save 02.jpg (in some photoeditor) we've got:
02.JPG 01.jpg 03.jpg

But such sorting is bad.
Much more better would be the following:
01.jpg 02.JPG 03.jpg

In fact, there is no matter - 'jpg' or 'JPG'.

So, if possible, could you add this feature?
I hope, it's not too hard.
And/or a feature to change the case of extension only (like 'gu' hotkey).

And thank you very much for VIFM!

by

Yes, typically case of extensions shouldn't matter, not sure why it's taken into account. Could be for some historical reason. Maybe it's safe to change it.

And/or a feature to change the case of extension only (like 'gu' hotkey).

Vim has some advanced substitutions like the following:

%s/\.[^.]*$/\L&\E

which you can use to make extensions lowercase after running :rename command.

by

Yes, now I use just that method - rename in Vim.
Slightly different:
%s/\.\w\+$/\L\0

But case-insensitive extensions would be a nice option.
The rest of VIFM is perfect!
Thanks!

...