What do you want EmEditor to do with prioritized sorting and sorting?

Asked 1 years ago, Updated 1 years ago, 263 views

What do you want EmEditor to prioritize and sort?
Thank you for your help.

This is a continuation of the previous reorder.Some overlap with the previous question.

I check the stable sort and start from a low priority point, but even if I specify ▽ first, if I specify ▲ next time, the number around 11 or the number where I don't want it to move at the beginning affected the rearrangement.

I'd like to sort by the number of the specified mark.

Results

▼ Around 11 ▲ 1905 ▽ 1994 ◆ 5971 ■ Around November ●
▼ 11th birthday ▲ 1905 ● 1944 ▽ 7195 ◆ November festival ■
▼ 11th birthday ▲ 1905 ● 1944 ▽ 7695 ◆ November festival ■
▼11 Gatsumatsu▲1905●2001▽4998◆End of November■
▼11 Gatsumatsu▲1905●2001▽5498◆End of November■
▼ Around 11 ▲ 1905 ▽ 1994 ◆ 6491 ■ Around November ●
▼ Around November ▲ 1905 ▽ 1994 ◆ 5991 ■ Around November ●
▼ Born 11▲1905●697▽6843◆Born in November■
▼ Born 11▲1905●697▽6343◆Born in November■
▼11 is everything ▲1905 ●1837 ▽7674 ◆November event ■
▼11 is everything ▲1905 ●1837 ▽7174 ◆November event ■
▼ Around 11▲1905●1994▽7820◆Around the end of November■
▼ Around the middle of November ▲ 1905 ● 1994 ▽ 7603 ◆ Around the middle of November ■
▼11 Gagejun▲1996●1996▽5061◆Late November■
Like ▼ ● 12 ▽ 12 ◆ 6350 ■
▼Yayoi▲12●12▽6277◆Night after night■
▼Rakuni▲12●12▽4786◆Easy■
▼ Exactly ▲ 12 ● 12 ▽ 3944 ◆ Correct ■
▼Shin▲12●12▽4836◆True■
▼ For a while ▲ 12 ▽ 12 ◆ 4838 ■ For a while ●
▼Setsu▲12●12▽4840◆Desperate■
▼ Too much ▲ 12 ● 12 ▽ 3955 ◆ Too much ■
▼Danko▲12●12▽7130◆Firm■
▼ Not much ▲ 12 ● 12 ▽ 5285 ◆ Not much ■
▼Dodai▲12●12▽4852◆Solidation■
▼ Close ▲ 12 ● 12 ▽ 6075 ◆ Close ■
▼Gen ▲12 ●12 ▽4004 ◆Actual ■
▼Anni▲12●12▽4863◆Darkly■
▼ What ▲ 12 ● 12 ▽ 5976 ◆ What ■
▼ Dare ▲ 12 ● 12 ▽ 5813 ◆ Dare ■

You can specify
Is it possible to sort in two steps, three steps, or four steps?

Case Study
▼ Dakko▲1934●1934▽4616◆Hugging■

▼Fukuin▲1934●1934▽6509◆Return■

▼Lens ▲ 1934 ● 1934 ▽ 3700 ◆ Continuous ■

Is it possible to rearrange the order of ▲ in detail in the second step with the number of ▲ fixed as the first sort?

After alignment
▼Lens ▲ 1934 ● 1934 ▽ 3700 ◆ Continuous ■

▼ Dakko▲1934●1934▽4616◆Hugging■

▼Fukuin▲1934●1934▽6509◆Return■

Depending on the situation, there may be about five stages in these order.
In this case, I think there are times when you want to specify the number of columns without any law, such as CSV.

In this case, is it possible to specify the order clearly using regular expressions and sort them all at once instead of ambiguous?

For example, you can sort multiple designated items, such as "Sort symbols or numbers that follow regular expressions step by step" in a search window with multiple priorities at once.
Priority Arrangements
US>First time(?<=▲)\d + ascending
US>Second time(?<=●)\d + ascending
US>Third time (?<=▽)\d + ascending order

This is how you can specify the ascending and descending order once, once.

It may be a mistake in my way that doesn't work, but I would appreciate it if you could specify all the priority arrangements in one go like this.

Thank you for your cooperation.

emeditor

2022-09-30 21:55

1 Answers

I think the next macro is fine.Please let me know if you understand my question incorrectly.

 document.selection.Find("(?<=▽)\\d+", eFindReplaceRegExp | eFindSelectAll, 0);
document.Sort("N+", eSortSelectionOnly | eSortStable);
document.selection.Find("(?<=●)\\d+", eFindReplaceRegExp | eFindSelectAll, 0);
document.Sort("N+", eSortSelectionOnly | eSortStable);
document.selection.Find("(?<=▲)\\d+", eFindReplaceRegExp | eFindSelectAll, 0);
document.Sort("N+", eSortSelectionOnly | eSortStable);


2022-09-30 21:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.