Customized sorting of files/folders in panel

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

Customized sorting of files/folders in panel

Postby 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: 4906
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 10 times
Been thanked: 118 times

Re: Customized sorting of files/folders in panel

Postby 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

Postby 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 HaRT on Thu 10 Jul, 2014 11:13, edited 1 time in total.
Reason: [spoiler]

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

Postby HaRT » Thu 10 Jul, 2014 11:20

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

Shmuel
Posts: 4906
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 10 times
Been thanked: 118 times

Re: Trim x characters on panel from left

Postby 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 109 times

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

Re: Customized sorting of files/folders in panel

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


Return to “Suggestions and Ideas”

Who is online

Users browsing this forum: No registered users and 1 guest