Customized sorting of files/folders in panel

Something is missing in Far Manager? You have a great idea that should be heard? Write here.
Post Reply
ragimiri
Posts: 12
Joined: Mon 01 Feb, 2010 13:10
Location: Czech Republic
Has thanked: 2 times

Customized sorting of files/folders in panel

Post by ragimiri » Sun 16 Feb, 2014 16:31

I assume, that FAR does not support this feature. It would be nice to have customized sorting rules of files/folders in panel. E. g. in Czech languge letter CH is between H and I, but FAR is positioning files/folder beginning with CH between C and D.

Correct sorting in Czech: Adolf, Benedikt, Cyril, Dalibor, Erik, Filip, Gustav, Havel, Chajim, Igor

Incorrect sorting by FAR: Adolf, Benedikt, Chajim, Cyril, Dalibor, Erik, Filip, Gustav, Havel, Igor

Shmuel
Posts: 5232
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 152 times

Re: Customized sorting of files/folders in panel

Post by Shmuel » Sun 16 Feb, 2014 16:46

Far does support custom sorting in panels. See Encyclopedia\macroapi_manual.en.chm (search for LoadCustomSortMode).

KtW
Posts: 21
Joined: Mon 10 Aug, 2009 01:47

Trim x characters on panel from left

Post by KtW » Thu 10 Jul, 2014 10:34

Hi all,

I was searching for a method to trim 15 character and hide them from the file name column on far manager panel.

For example I've these folders in a directory:
I need to order these folders by "Name" by excluding the first 15 charatcters that compose the folder name
so the displayed content on "Name" column will display like this without the date - an so can be ordered
corectly by name:

Can be achieved a function like this? In panel layout configuration i've not found a "hide frist x char" modifier to use...

Thanks in advance...
Later
KtW
Last edited by KtW on Thu 01 Jan, 1970 01:00, edited 0 times in total.
Reason: [spoiler]

User avatar
HaRT
Moderator
Posts: 8118
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 68 times
Been thanked: 107 times

Post by HaRT » Thu 10 Jul, 2014 11:20

KtW
Please see custom sorting above.
Фар есть инструмент, а не нянька. © 2009 DrKnS

Shmuel
Posts: 5232
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 152 times

Re: Trim x characters on panel from left

Post by Shmuel » Thu 10 Jul, 2014 14:43

KtW wrote:Can be achieved a function like this? In panel layout configuration i've not found a "hide frist x char" modifier to use...
As far as I know, there's no option to hide some characters from being displayed.
If all you need is sorting panel entries according to your arbitrary criteria, then it can be achieved, though not easy: one is expected to know LuaJIT FFI programming.

Attached is an example of such custom sorting, corresponding to your criteria (as I understand it). Unpack this file to your %farprofile%\Macros\scripts folder and restart Far. Then pressing CtrlShiftF3 will invoke that sorting.
CustomSortExample.7z
(762 Bytes) Downloaded 122 times

KtW
Posts: 21
Joined: Mon 10 Aug, 2009 01:47

Re: Customized sorting of files/folders in panel

Post by KtW » Thu 10 Jul, 2014 18:43

:bojan:

Thanks Shmuel! I'm so happy!

Your script worked like a charm for me with offset 13!

Alone I would not have ever made! :oops:

Post Reply

Return to “Suggestions and Ideas”