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 the ignoreCase attribute is yes
<?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 case
And I’ll use the XML file for normal text, below, when the ignoreCase attribute is no :
<?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 below
Notes :
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 the 6 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 the Function 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 the ignoreCase="yes" value in Normal.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