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: 14
Joined: Mon 01 Feb, 2010 13:10
Location: Czech Republic
Has thanked: 2 times

Customized sorting of files/folders in panel

Post by ragimiri »

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: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

Re: Customized sorting of files/folders in panel

Post by Shmuel »

Far does support custom sorting in panels. See Encyclopedia\macroapi_manual.en.chm (search for LoadCustomSortMode).
KtW
Posts: 30
Joined: Mon 10 Aug, 2009 01:47

Trim x characters on panel from left

Post by KtW »

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: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

Post by HaRT »

KtW
Please see custom sorting above.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

Re: Trim x characters on panel from left

Post by Shmuel »

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 370 times
KtW
Posts: 30
Joined: Mon 10 Aug, 2009 01:47

Re: Customized sorting of files/folders in panel

Post by KtW »

: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”