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 XYZ
Note that :
-
These lines are placed in a random order
-
Some of the lines contain only
Tab
chars, some other onlySpace
chars and some other a mix ofTab
andSpace
chars in any order -
Now, make a normal stream selection of these
14
lines -
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 xyz
You 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
Tab
chars, are correctly sorted -
The next two lines, containing a
Tab
and fourSpace
chars, are correctly sorted -
The next three lines, containing four
Space
chars and aTab
char, are correctly sorted -
The final five lines, containing only
Space
chars, 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
Space
chars can be found before the first non-blank char of current line, change them withTAB
chars, respecting the tabstops values ( pos:4, 8, 12, 16 ...
)For you, it rather means :
If some
Space
chars can be found, at the very beginning of current line, change them withTAB
chars, 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
TAB
char and/or fourSpace
chars, 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 GHI
The
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 GHI
And 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 GHI
After 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 (
TAB
and/orSpace
chars ), 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 Order
option, 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 Ascending
Then,
Edit > Line Operations > Sort lines Lex. Ascending Ignoring Case
After 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 xyz
And 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 Descending
Then,
Edit > Line Operations > Sort lines Lex. Descending Ignoring Case
This 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 -PQR
And 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 Case
You’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 XYZ
Which 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 -pqr
Which 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 Ascending
option -
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 Descending
option -
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 Case
sorting is needed, in auto-completion files when the value of theignoreCase
attribute isyes
?!BTW, I suppose that, when the value of the
ignoreCase
attribute isno
, the sort, needed for theKeyWord
values of anAuto-completion
file, 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
A
followed bya
, it won’t change the order, because they are equivalent ignoring case; if it hasa
followed 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
ingoreCase
attribute isyes
I 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
ingoreCase
attribute isno
, the sort needed for theKeyWord
values of anAuto-completion
file, is necessarilyEdit > Line Operations > Sort lines Lexicographically Ascending
That’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.xml
as 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 withA
it will showALPHA
, start witha
it will showalpha
; ifyes
, if I start with eithera
orA
it will show bothALPHA
andalpha
(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 to1
so I only had to type one character to see if it was working
2: there seems to be a slight difficulty↗ withautoCompletion\normal.xml
not 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 toXML
and 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-completion
feature with normal text !
In
Settings > Preferences... > Auto-completion > Auto-Copletion
, my settings are :-
Box
Enable auto-completion on each input
is checked -
Box
Function parameters hint on input
is checked -
Box
Ignore numbers
is unchecked -
From
1
th character
For the tests, below, I will use :
-
First, the
Function completion
option -
Secondly, the
Function and word completion
option
Now, I’ll use the following
XML
file for normal text, when theignoreCase
attribute 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
KeyWord
lines, ignoring the caseAnd I’ll use the
XML
file for normal text, below, when theignoreCase
attribute 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
KeyWord
lines, according to their case
Remark :
During the tests, I’ll also use two simplified versions of the
Normal.xml
file :- 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,
12
possibilities, 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
red
color -
The order of the items of the auto-completion list may be different from the order of the keywords in the
Normal
auto-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.xml
file, we omit the6
lines :<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
Function
completion and theFunction and word
completion, 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 completion
option in Settings and theignoreCase="yes"
value inNormal.xml
with 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
-