Notepad3
Notepad3 copied to clipboard
it's confusing that remove dup lines has two meanings in different submenu.
when using lines > remove dup lines, it works like the uniq command which keeps the first dup line,
but when using selections > sort lines > remove dup lines, the lines that appear twice will all be removed.
it's very confusing that the same command has two different meanings in two different submenus. I've used these commands incorrectly, I think it can be avoided by providing a better name.
@hpwamr : No it is no bug or regression, this is an option within the "Sort lines" working as designed. @LennaHammer is correct, that the wording is not chosen well and may be misleading.
Remove unique lines.=> OKRemove empty lines.=> OKRemove white-space lines.=> called in theEdit -> Lines ->menu:Remove Blank Lines- better: use same wordingRemove duplicate lines.=> the meaning is as described by @LennaHammer : remove all duplicates (incl. first one) maybe we can find a better wording here.Merge duplicate lines.=> Merge duplicate lines (into the first one) - this is the same functionality as menuEdit -> Lines -> Remove Duplicate Lines- which removes all dupes except the first/original line.
So, functionality is correct - we should find better wording here - any suggestions ?
@hpwamr : Since this is all about wording, I leave it up to you to find better wording. Suggestion: For the Sort-Lines Dialog:
Remove duplicate lines.=>Remove all dupes (incl. orig. line).Merge duplicate lines.=>Remove duplicate lines.
Since this is all about wording, I leave it up to you to find better wording.
Hello @craigo-, @jupester, @kofifus, @ltGuillaume, @MelchiorGaspar, and other Notepad3 BETA/RC testers, I need your help. ๐ค Do you have an idea for better wording (or the above suggestion is OK)?
- Keep "Remove duplicate(s of) lines" and use it for "Merge duplicate lines" (you're not merging anything really.
- Use "Remove all lines occurring multiple times" or "Remove all non-unique lines" for the other option.
Not functions I use regularly, but I do love having consistent wording - good catch, @LennaHammer ๐
I initially reacted positively to the suggestion from @ltguillaume - it does clear up the inconsistency, but I find it troublesome to apply everywhere else.
I actually find the following definition (as found in the majority of the menu options) to be fairly clear, i.e.:
- Merge = retain one instance
- Remove = retain no instances
i.e. how it is currently in the following functions:
- Edit > Lines: Merge Empty Lines vs Remove Empty Lines
- Edit > Lines: Merge Blank Lines vs Remove Blank Lines
- Edit > Selection > Sort Lines: Merge duplicate lines vs Remove duplicate lines
Therefore, I would propose the following change:
- Edit > Lines > ~~Remove Duplicate Lines~~ Merge Duplicate Lines (and move it to the third position in the section, above "Remove Empty Lines" - that way the ordering is always Empty, Blank, Duplicate)
You could even add the then-missing function "Edit > Lines > Remove Duplicate Lines", which retains no instances of duplicated lines (but that might be beyond the scope of this issue, and as we know, extra keyboard shortcuts are hard to find!)
Does that then clear up the inconsistency everywhere? I cannot find anywhere else that this exists.
As for clarification of the wording, is it possible to add a ToolTip for menu options and/or the sort dialogue that explains the merge/remove definitions? And also in the documentation at rizonesoft.com?
May I also add one thing? Can the Sort Lines dialogue option "Remove white-space lines." be changed to "Remove blank lines."? I believe this is the correct phraseology used elsewhere.
I'd say the definition of merging is not retaining one of several identical things, but combining two or more (different) things into one (new) thing. This makes the term "merge" confusing in the presented context imho.
In essence, what we're doing, instead of merging, is deduplicating.
In essence, what we're doing, instead of merging, is deduplicating.
Just a question: is not "Keep unique lines" better than "Merge duplicate lines"? ๐ค
In essence, what we're doing, instead of merging, is deduplicating.
OK, I can get on board with that.
Just a question: is not "Keep unique lines" better than "Merge duplicate lines"? ๐ค
Also a good option.
So we have two primary candidates (and a couple of alternates) to replace the "Merge" function:
- Deduplicate lines
- Keep unique lines
- Deduplicate lines (keep unique) [see below]
- Deduplicate lines (merge) [see below]
What do we do with the "Remove" function? Suggestions:
- Remove all duplicate lines [I still don't think this is clear enough]
- Deduplicate lines (remove unique) [i.e. paired with the third option from above]
- Deduplicate lines (remove) [i.e. paired with the fourth option from above]
- ???
That's the best I can come up with in the limited time I have, and I must say I'm not wildly happy about any of them - they all seem rather unwieldy, which is why I originally stuck with the existing merge/remove wording. I'd still like to table that as a viable option, but if I was forced to choose a best alternative pair, it would probably be:
- Deduplicate lines (merge)
- Deduplicate lines (remove)
Whatever we end up with:
- The wording will also need to be applied to the Edit > Selection > Sort Lines dialogue
- We'll probably have to redo the accelerator keys as well (gah!)
How about Keep (only) first of duplicated lines (=merge) and Remove all duplicated lines (=remove)?
- instead of "merge" (implies something new) or "deduplicate" (which is a negation, better be positive), I would prefer "unite duplicate lines"
- drop the "remove all duplicate lines" case (in sort dialog only) - I can't imagine any sensible use case, only very artificially created ones, so this case isn't really needed.
Hello @LennaHammer , @craigo- , @ltguillaume ,
Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.24.703.1_rc3.paf" or newer, see the 1st list in issueย #1129.
"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.
Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.24.703.1_rc3_Setup" or newer, see the 2nd list in issueย #1129.
Comments and suggestions are welcome... ๐
Testing version 6.24.703.1 rc3
Fairly quick test, please excuse nonexhaustive testing that I normally pride myself on.
- instead of "merge" (implies something new) or "deduplicate" (which is a negation, better be positive), I would prefer "unite duplicate lines"
Yep, that works. As long as the wording is easily understood, and most importantly, consistent ๐
On that note:
Edit > Lines Menu
We should then also change the use of the word "Merge" here, i.e.:
- Merge Empty Lines > Unite Empty Lines
- Merge Blank Lines > Unite Blank Lines
...and then the order of that section of the menu probably needs changing. We either arrange by function (Unite, Remove), i.e.:
- Unite Duplicate Lines
- Unite Empty Lines
- Unite Blank Lines
- Remove Duplicate Lines
- Remove Empty Lines
- Remove Blank Lines
...or arrange by target (Duplicate, Empty, Blank), i.e.:
- Unite Duplicate Lines
- Remove Duplicate Lines
- Unite Empty Lines
- Remove Empty Lines
- Unite Blank Lines
- Remove Blank Lines
To me, the former option seems better.
Edit > Advanced > Sort Lines Menu
- Unite duplicate lines (I trust this marries up with the same functionality of "Unite Duplicate Lines" above)
- Remove duplicate lines (I trust this marries up with the same functionality of "Remove Duplicate Lines" above)
- Remove unique lines (redundant, done by the "Remove duplicate lines" function?)
- Remove empty lines (I trust this marries up with the same functionality of "Remove Empty Lines" above)
- Remove blank lines (I trust this marries up with the same functionality of "Remove Blank Lines" above)
I propose that this is rearranged by function, as is my preference above, to:
- Unite duplicate lines
- Remove duplicate lines
- Remove empty lines
- Remove blank lines
Also, is there any appetite for removing the trailing full stop on these dialogue options? They are a bit of an eyesore to me.
"Remove unique lines" (redundant, done by the "Remove duplicate lines" function?)
No, it's the opposite as "Remove duplicate lines": it removes ONLY the unique lines, NOT the duplicate lines! (try it) ๐ค
No, it's the opposite as "Remove duplicate lines": it removes ONLY the unique lines, NOT the duplicate lines! (try it) ๐ค
Whoops, quite right, different to the "keep unique lines" wording discussed above. Cool. Wow, an option that I don't think I will ever find the need for ๐
And therefore the Edit > Advanced > Sort Lines menu might look like this:
- Unite duplicate lines
- Remove duplicate lines
- Remove empty lines
- Remove blank lines
- Remove unique lines
(Suggest moving the "unique" entry to the bottom to retain the duplicate/empty/blank ordering suggested for elsewhere, and that I consider this option to be less useful!)