Omit articles while sorting

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Omit articles while sorting

Post by *solid »

I propose a feature for removing articles like 'the', 'a' and 'an' while sorting files/dirs. Of course that would be an on/off toggle (cm_command).

Even better, the words for omitting shuold be user defined, so it would be applicable to all languages.

So instead having the list like it is now,

Code: Select all

Gran Torino\
House of Games\
Public Enemies\
Sherlock Holmes\
The Ghost Writer\
The Hurt Locker\
The social network\
True romance\
we could have

Code: Select all

The Ghost Writer\
Gran Torino\
House of Games\
The Hurt Locker\
Public Enemies\
The social network\
Sherlock Holmes\
True romance\
I kind of a more natural sorting.
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

Was requested, discussed, and, if i remember correctly, rejected by autor few years ago.
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

Shame, that would have been an useful feature.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that this cannot really be done without understanding the context.
Author of Total Commander
https://www.ghisler.com
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You can achieve this with the RegExp plugin.

Add this rule to the regexp.ini:

Code: Select all

[Regexp]
Rule=articles

[articles]
Find="(^The |^A |^An )(.*)"
Change="$2, $1"
ParceDirs=1
and add a custom column.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

The Fox And The Hound... :P
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

The The :lol:
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

ghisler(Author) wrote:The problem is that this cannot really be done without understanding the context.
What context you cannot understand?

@ZoSTeR
Thx, that works, but it's quite a workaround. That plugin needs improvement.
Post Reply