Page 1 of 1

Omit articles while sorting

Posted: 2014-05-02, 13:17 UTC
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.

Posted: 2014-05-02, 15:22 UTC
by Gral
Was requested, discussed, and, if i remember correctly, rejected by autor few years ago.

Posted: 2014-05-05, 11:37 UTC
by solid
Shame, that would have been an useful feature.

Posted: 2014-05-05, 15:32 UTC
by ghisler(Author)
The problem is that this cannot really be done without understanding the context.

Posted: 2014-05-05, 17:52 UTC
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.

Posted: 2014-05-05, 19:51 UTC
by MVV
The Fox And The Hound... :P

Posted: 2014-05-06, 02:44 UTC
by Gral
The The :lol:

Posted: 2014-05-06, 10:37 UTC
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.