Tips for a correct sorting
-
Hi, All
EDIT : I was probably presumptuous in the title of this new discussion ! Indeed, the tips given at the end of this post are
erroneous! Rather refer to the end of my next post :https://community.notepad-plus-plus.org/post/80420
I’m still exploring some of the quirks of sorting !
From this INPUT text :
xyz -PQR AB-C abc ABCDEF abcdef ABC-DEF -pqr ab-c x-yz X-YZ ABC abc-def XYZNote that :
-
These lines are placed in a random order
-
Some of the lines contain only
Tabchars, some other onlySpacechars and some other a mix ofTabandSpacechars in any order -
Now, make a normal stream selection of these
14lines -
Run the option
Edit > Line operations > Sort lines Lexicographically Ascending
You get this OUTPUT text :
ABCDEF X-YZ ab-c abc -PQR abc-def -pqr ABC abcdef AB-C ABC-DEF XYZ x-yz xyzYou could say that the sort did not work as expected :-(
However, if we use the option
View > Show symbol > Show White Space and TAB, this sort seems OK because :-
The first four lines, containing only
Tabchars, are correctly sorted -
The next two lines, containing a
Taband fourSpacechars, are correctly sorted -
The next three lines, containing four
Spacechars and aTabchar, are correctly sorted -
The final five lines, containing only
Spacechars, are correctly sorted
The morale of this story is :
-
Before any sort operation, verify that all the leading chars, of the text to sort, are the same by using, either the option :
-
Edit > Blank Operations > TAB to Space
OR
Edit > Blank Operations > Space to TAB (Leading)
However, note that the
Edit > Blank Operations > Space to TAB (Leading)operation, which applies to the whole document, is bugged too :-((So I created an issue :
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12306#issue-1402107870
Best Regards,
guy038
-
-
I don’t know that your sorting example is all that strange.
Tab characters as used in a text editor for indentation cause all sorts of problems for operations that go beyond their visual effect.The data you present is correctly sorted because a tab character has a lower “value” (9) than a space character (32).
Perhaps your proposal is that tab characters should be automatically converted to an equivalent number of spaces before the sort algorithm is applied? Nothing should happen to actual data, just the logical data used for the sort. If so, that’s probably not a bad idea and you should make a feature request issue out of it.
-
@guy038 said in Tips for a correct sorting:
the Edit > Blank Operations > Space to TAB (Leading) operation, which applies to the whole document, is bugged
I don’t know if I have agreement with that, discussion continued HERE.
How about creating some regexes to find and/or “correct” that “problem”?
-
Hello, @alan-kilborn and All,
Oh… I see and I do understand your point of view !
To my mind, I’ve always thought that the option
Edit > Blank operations > Space to TAB (Leading)meant :If some
Spacechars can be found before the first non-blank char of current line, change them withTABchars, respecting the tabstops values ( pos:4, 8, 12, 16 ...)For you, it rather means :
If some
Spacechars can be found, at the very beginning of current line, change them withTABchars, respecting the tabstops values ( pos:4, 8, 12, 16 ...) which is the current behavior of this option !In addition my INPUT text, of my previous post, was a bit trivial, Indeed, regarding the leading blank chars, I simply used one
TABchar and/or fourSpacechars, as the default TAB size is4
So, I made additional tests with other values. For instance, from this INPUT text :
Only leading SPACE chars : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI Preceded with one TAB char : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHIThe
Edit > Blank operations > Space to TAB (Leading)option produces this OUTPUT text :Only leading SPACE chars : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI Preceded with one TAB char : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHIAnd the
Edit > Blank operations > Space to TAB (All)option produces this OUTPUT text :Only leading SPACE chars : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI Preceded with one TAB char : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI
Now, if I use the
Edit > Line Operations > Sort lines lexicographically Ascending, on the selection of each block, we get :Only leading SPACE chars : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI Preceded with a TAB char : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHIAfter an initial
Edit > Blank operations > Space to TAB (Leading)option=> I must admit that the sort is quite correct
And this OUTPUT text, after an intitial
Edit > Blank operations > Space to TAB (All)optionOnly leading SPACE chars : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI Preceded with a TAB char : ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI ABC DEF GHI=> Again, nothing to add about this sort, which is totally exact !
Conclusion :
Finally, for correct sort operations, take care to just consider an homogeneous block of lines, containing the same amount of leading blank chars, whatever they are (
TABand/orSpacechars ), throughout all the lines selected !Best regards,
guy038
Alan, I’m going to revisit my GitHub issue , of course !
-
Hi, All,
Stll exploring some particularities of the N++ sort feature !
Let’s suppose that we start with a list of lines randomly sorted with the
Edit > Line Operations > Randomize Line Orderoption, placed in a new tab :tESt abc abc-def test AB-C XYZ abcdef ab-c ABC-DEF X-YZ x-yz teST -pqr TEST -PQR TEst xyz ABC ABCDEF- Now, use the two consecutive sorts ( don’t select the column mode ) :
First,
Edit > Line Operations > Sort lines Lexicographically AscendingThen,
Edit > Line Operations > Sort lines Lex. Ascending Ignoring CaseAfter the first sort, you get this text :
-PQR -pqr AB-C ABC ABC-DEF ABCDEF TEST TEst X-YZ XYZ ab-c abc abc-def abcdef tESt teST test x-yz xyzAnd after the second sort :
-PQR -pqr AB-C ab-c ABC abc ABC-DEF abc-def ABCDEF abcdef TEST TEst tESt teST test X-YZ x-yz XYZ xyz=> These two sequences are logical :
- After the first sort, all upper-case words are placed before all the lower-case words and after the second sort, each corresponding lower-case line is placed right after its upper-case one
- In the same way, use the two consecutive sorts ( Don’t select any text ! ) :
First,
Edit > Line Operations > Sort lines Lexicographically DescendingThen,
Edit > Line Operations > Sort lines Lex. Descending Ignoring CaseThis time, after the first sort, you get this text :
xyz x-yz test teST tESt abcdef abc-def abc ab-c XYZ X-YZ TEst TEST ABCDEF ABC-DEF ABC AB-C -pqr -PQRAnd after the second sort :
xyz XYZ x-yz X-YZ test teST tESt TEst TEST abcdef ABCDEF abc-def ABC-DEF abc ABC ab-c AB-C -pqr -PQR=> Again, these two sequences are logical :
- After the first sort, all lower-case words are placed before all the upper-case words and after the second sort, each corresponding upper-case line is placed right after its lower-case one
But now, use a third sort
Edit > Line Operations > Sort lines Lex. Ascending Ignoring CaseYou’ll end up with that text :
-pqr -PQR ab-c AB-C abc ABC abc-def ABC-DEF abcdef ABCDEF test teST tESt TEst TEST x-yz X-YZ xyz XYZWhich is not a full ascending sort and TOTALLY different from the result after the two intial sorts, in ascending order, above !
This same reasoning could be applied when using these third consecutive sorts :
-
Edit > Line Operations > Sort lines Lexicographically Ascending -
Edit > Line Operations > Sort lines Lex. Ascending Ignoring Case -
Edit > Line Operations > Sort lines Lex. Descending Ignoring Case
producing this text :
XYZ xyz X-YZ x-yz TEST TEst tESt teST test ABCDEF abcdef ABC-DEF abc-def ABC abc AB-C ab-c -PQR -pqrWhich is not a full descending sort and TOTALLY different from the result after the two initial sorts, in descending order, above !
The conclusion seems to be :
-
If you need an EXACT ascending sort, ignoring case
-
Use first, the
Edit > Line Operations > Sort lines Lexicographically Ascendingoption -
Then, use the
Edit > Line Operations > Sort lines Lex. Ascending Ignoring Case
-
-
And if you need an EXACT descending sort, ignoring case
-
Use first, the
Edit > Line Operations > Sort lines Lexicographically Descendingoption -
Then, use the
Edit > Line Operations > Sort lines Lex. Descending Ignoring Case
-
Now, @peterjones and others, from the additional solutions, provided above, which kind of
ignoring Casesorting is needed, in auto-completion files when the value of theignoreCaseattribute isyes?!BTW, I suppose that, when the value of the
ignoreCaseattribute isno, the sort, needed for theKeyWordvalues of anAuto-completionfile, is necessarily :Edit > Line Operations > Sort lines Lexicographically Ascending
Best Regards,
guy038
P.S. : I expressly named Peter, being the main contributor to the Notepad++ documentation !
-
@guy038 ,
But now, use a third sort
Edit > Line Operations > Sort lines Lex. Ascending Ignoring Case, … Which is not a full ascending sortOf course not; it never claimed to be. It’s an ascending sort ignoring case. You seem to want it to start by sorting ignoring case, but when those are equal, to make a final decision based on case. But that’s not what “ignore case” means: “ignore case” means that it completely disregards case information when sorting. If two lines are equivalent ignoring-case, then Notepad++ will not change the order of those two lines: so if it has
Afollowed bya, it won’t change the order, because they are equivalent ignoring case; if it hasafollowed byA, it won’t change the order, because they are equivalent when ignoring case. That is the very definition of “ignore case”.which kind of ignoring Case sorting is needed, in auto-completion files when the value of the
ingoreCaseattribute isyesI honestly don’t know. I don’t know what the source code expects, and I have never run the
ignoreCase="yes"experiments necessary to determine experientially what it requires. But my initial guess is that just a single sort-ignoring-case will be sufficient.BTW, I suppose that, when the value of the
ingoreCaseattribute isno, the sort needed for theKeyWordvalues of anAuto-completionfile, is necessarilyEdit > Line Operations > Sort lines Lexicographically AscendingThat’s what the manual explicitly states, yes.
-
@PeterJones said in Tips for a correct sorting:
I have never run the ignoreCase=“yes” experiments necessary to determine experientially what it requires
At least with v8.4.6, and the experiments I ran, it no longer appears to care about sorting. I created a
normal.xmlas below, where the sorting is backwards of what it should be. And whetherignoreCase="yes"orignoreCase="no", the auto-completion function would show [1][2] all the appropriate words: ifno, then if I start withAit will showALPHA, start withait will showalpha; ifyes, if I start with eitheraorAit will show bothALPHAandalpha(with uppercase listed before lowercase)<?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <AutoComplete language="Normal"> <Environment ignoreCase="no" /> <KeyWord name="zeta_second" /> <KeyWord name="zeta" /> <KeyWord name="gamma" /> <KeyWord name="func" func="yes" /> <KeyWord name="eta" /> <KeyWord name="delta" /> <KeyWord name="beta" /> <KeyWord name="alpha" /> <KeyWord name="ZETA" /> <KeyWord name="GAMMA" /> <KeyWord name="ETA" /> <KeyWord name="DELTA" /> <KeyWord name="BETA" /> <KeyWord name="ALPHA" /> </AutoComplete> </NotepadPlus>I haven’t gone back in time to see which version the sorting of the XML stopped mattering (if it ever really did, or if I was just propagating old information when I did that section of the manual).
—
Footnotes
1: I had AutoCompletion’s “From nth character” set to1so I only had to type one character to see if it was working
2: there seems to be a slight difficulty↗ withautoCompletion\normal.xmlnot being applied to a given instance of Notepad++ until the language has been changed off ofNone (Normal Text)and back toNone (Normal Text), at least in my experiments so far. If you have similar difficulties, I got around it by just changing Language toXMLand then Language toNone (Normal Text), and then it will start auto-completing on Normal Text per the file. -
Hi, @peterjones and All,
Like you, Peter, I decided to do some research regarding the
Auto-completionfeature with normal text !
In
Settings > Preferences... > Auto-completion > Auto-Copletion, my settings are :-
Box
Enable auto-completion on each inputis checked -
Box
Function parameters hint on inputis checked -
Box
Ignore numbersis unchecked -
From
1th character
For the tests, below, I will use :
-
First, the
Function completionoption -
Secondly, the
Function and word completionoption
Now, I’ll use the following
XMLfile for normal text, when theignoreCaseattribute isyes<?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <AutoComplete language="Normal"> <Environment ignoreCase="yes" additionalWordChar="-"/> <KeyWord name="-PQR" /> <KeyWord name="-pqr" /> <KeyWord name="12FGH" /> <KeyWord name="12fgh" /> <KeyWord name="AB-C" /> <KeyWord name="ab-c" /> <KeyWord name="ABC" /> <KeyWord name="abc" /> <KeyWord name="ABC-DEF" /> <KeyWord name="abc-def" /> <KeyWord name="ABCDEF" /> <KeyWord name="abcdef" /> <KeyWord name="X-YZ" /> <KeyWord name="x-yz" /> <KeyWord name="XYZ" /> <KeyWord name="xyz" /> <KeyWord name="_DEF" /> <KeyWord name="_def" /> </AutoComplete> </NotepadPlus>Which sort all the
KeyWordlines, ignoring the caseAnd I’ll use the
XMLfile for normal text, below, when theignoreCaseattribute isno:<?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <AutoComplete language="Normal"> <Environment ignoreCase="no" additionalWordChar="-"/> <KeyWord name="-PQR" /> <KeyWord name="-pqr" /> <KeyWord name="12FGH" /> <KeyWord name="12fgh" /> <KeyWord name="AB-C" /> <KeyWord name="ABC" /> <KeyWord name="ABC-DEF" /> <KeyWord name="ABCDEF" /> <KeyWord name="X-YZ" /> <KeyWord name="XYZ" /> <KeyWord name="_DEF" /> <KeyWord name="_def" /> <KeyWord name="ab-c" /> <KeyWord name="abc" /> <KeyWord name="abc-def" /> <KeyWord name="abcdef" /> <KeyWord name="x-yz" /> <KeyWord name="xyz" /> </AutoComplete> </NotepadPlus>Which sort all the
KeyWordlines, according to their case
Remark :
During the tests, I’ll also use two simplified versions of the
Normal.xmlfile :- One containing only the upper KeyWords :
ignoreCase = "yes" ignoreCase = "no" <KeyWord name="-PQR" /> <KeyWord name="-PQR" /> <KeyWord name="12FGH" /> <KeyWord name="12FGH" /> <KeyWord name="AB-C" /> <KeyWord name="AB-C" /> <KeyWord name="ABC" /> <KeyWord name="ABC" /> <KeyWord name="ABC-DEF" /> <KeyWord name="ABC-DEF" /> <KeyWord name="ABCDEF" /> <KeyWord name="ABCDEF" /> <KeyWord name="X-YZ" /> <KeyWord name="X-YZ" /> <KeyWord name="XYZ" /> <KeyWord name="XYZ" /> <KeyWord name="_DEF" /> <KeyWord name="_DEF" />- One containing only the lower KeyWords :
ignoreCase = "yes" ignoreCase = "no" <KeyWord name="-pqr" /> <KeyWord name="-pqr" /> <KeyWord name="12fgh" /> <KeyWord name="12fgh" /> <KeyWord name="ab-c" /> <KeyWord name="_def" /> <KeyWord name="abc" /> <KeyWord name="ab-c" /> <KeyWord name="abc-def" /> <KeyWord name="abc" /> <KeyWord name="abcdef" /> <KeyWord name="abc-def" /> <KeyWord name="x-yz" /> <KeyWord name="abcdef" /> <KeyWord name="xyz" /> <KeyWord name="x-yz" /> <KeyWord name="_def" /> <KeyWord name="xyz" />
So, I’m going to test these four statements :
- Function completion and ignoreCase=“
yes” - Function completion and ignoreCase=“
no” - Function and word completion and ignoreCase=“
yes” - Fuunction and word completion and ignoreCase=“
no”
with the three type of keywords :
- Upper keywords
- Lower keywords
- All keywords
Thus,
12possibilities, enumerated belowNotes :
-
As I’ll use a new tab for the tests, no word completion should occur, anyway !
-
The highlighted word of the provided list is marked with a
redcolor -
The order of the items of the auto-completion list may be different from the order of the keywords in the
Normalauto-completion file !
Function completion , ignoreCase =
yes, Upper Keywords :- Hit on
A
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
a
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
X
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
x
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
1
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
_
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
-
NO list
Function completion , ignoreCase =
yes, lower Keywords :- Hit on
A
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
a
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
X
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
x
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
1
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
_
NO list
- Hit on
-
NO list
Function completion , ignoreCase =
yes, All Keywords :- Hit on
A
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
a
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
X
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
x
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
1
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
_
NO list
- Hit on
-
NO list
Function completion , ignoreCase =
no, Upper Keywords :- Hit on
A
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
a
NO list
- Hit on
X
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
x
NO list
- Hit on
1
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
_
-PQR
12FGH
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF- Hit on
-
NO list
Function completion , ignoreCase =
no, lower Keywords :- Hit on
A
NO list
- Hit on
a
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
X
NO list
- Hit on
x
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
1
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
_
-pqr
12fgh
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
-
NO list
Function completion , ignoreCase =
no, All Keywords :- Hit on
A
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
a
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
X
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
x
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
1
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
_
-PQR
-pqr
12FGH
12fgh
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
_DEF
_def
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
-
NO list
Function and word completion , ignoreCase =
yes, Upper Keywords :- Hit on
A
AB-C
ABC
ABC-DEF
ABCDEF- Hit on
a
AB-C
ABC
ABC-DEF
ABCDEF- Hit on
X
X-YZ
XYZ- Hit on
x
X-YZ
XYZ- Hit on
1
12FGH- Hit on
_
_DEF- Hit on
-
NO list
Function and word completion , ignoreCase =
yes, lower Keywords :- Hit on
A
ab-c
abc
abc-def
abcdef- Hit on
a
ab-c
abc
abc-def
abcdef- Hit on
X
x-yz
xyz- Hit on
x
x-yz
xyz- Hit on
1
12fgh- Hit on
_
_def
- Hit on
-
NO list
Function and word completion , ignoreCase =
yes, All Keywords :- Hit on
A
AB-C
ABC
ABC-DEF
ABCDEF
ab-c
abc
abc-def
abcdef- Hit on
a
AB-C
ABC
ABC-DEF
ABCDEF
ab-c
abc
abc-def
abcdef- Hit on
X
X-YZ
XYZ
x-yz
xyz- Hit on
x
X-YZ
XYZ
x-yz
xyz- Hit on
1
12FGH
12fgh- Hit on
_
_DEF
_def- Hit on
-
NO list
Function and word completion , ignoreCase =
no, Upper Keywords :- Hit on
A
AB-C
ABC
ABC-DEF
ABCDEF- Hit on
a
NO list
- Hit on
X
X-YZ
XYZ- Hit on
x
NO list
- Hit on
1
12FGH- Hit on
_
_DEF- Hit on
-
NO list
Function and word completion , ignoreCase =
no, lower Keywords :- Hit on
A
NO list
- Hit on
a
ab-c
abc
abc-def
abcdef- Hit on
X
NO list
- Hit on
x
x-yz
xyz- Hit on
1
12fgh- Hit on
_
_def- Hit on
-
NO list
Function and word completion , ignoreCase =
no, All Keywords :- Hit on
A
AB-C
ABC
ABC-DEF
ABCDEF- Hit on
a
ab-c
abc
abc-def
abcdef- Hit on
X
X-YZ
XYZ- Hit on
x
x-yz
xyz- Hit on
1
12FGH
12fgh- Hit on
_
_DEF
_def- Hit on
-
NO list
Remark :
If , from the initial
Normal.xmlfile, we omit the6lines :<KeyWord name="-PQR" /> <KeyWord name="-pqr" /> <KeyWord name="12FGH" /> <KeyWord name="12fgh" /> <KeyWord name="_DEF" /> <KeyWord name="_def" />Then, there are some differences regarding the specific case below :
Function completion , ignoreCase =
yes, All Keywords :- Hit on
A
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
a
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
X
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
ab-c
abc
abc-def
abcdef
x-yz
xyz- Hit on
x
AB-C
ABC
ABC-DEF
ABCDEF
X-YZ
XYZ
ab-c
abc
abc-def
abcdef
x-yz
xyz
Pheew !!! From all the tests above, some questions :
-
Why the list of proposed words is different between the
Functioncompletion and theFunction and wordcompletion, although I start with a new document ? -
Why no list is proposed when I hit the
-char first, although it should be seen as a word char ? ( It seems that only true alphabetic or word chars are presently concerned by the auto-completion list ! )
In addtion, regarding the specific case of the
Function completionoption in Settings and theignoreCase="yes"value inNormal.xmlwith all kind of keywords :-
Why, sometimes, no list occurs when hitting the
_char, although it’s a word char ? -
Why, in the last test, the suppression of keywords, beginning with
-,_and digits, change the highlighted word from the upper word to the lower corresponding word ?
Best Regards,
guy038
-