Display left arrow after RetVal in auto_Complete
-
Good day.
In the tooltip that presents autocomplete, the return value is “shown” before the function name without any type of separator, I want to separate them with a left arrow (unicode) as 1 single character, not 2 as “<-”. What Font does the autoComplete use to check if it includes graphic characters such as arrows?
The idea is to show the direction of the return value while visually separating it from the function.
<Overload retVal="nCount<-" descr="Description of..">
The tooltip looks something like this:
nCount
<-
FunctionName (cString, nNumber)At the same time is it possible that the name of the function is enhanced in some way as bold, italic or another slightly different color? The idea is to reinforce the display for the function name just like autoComplete does with parameters.
Thanking you in advance for any suggestion.
-
@José-Luis-Montero-Castellanos
I want to separate them with a left arrow (unicode) as 1 single character, not 2 as “<-” What Font does the autoComplete use
What does “font” have to do with it? We aren’t in the bad-old-days of the 1980’s using wingdings-style fonts that overlap their funny characters over codepoints that have other meanings. We live in the era of widespread use of Unicode, and the UTF-8 encoding.
The autoCompletion XML files can start with the line
<?xml version="1.0" encoding="UTF-8" ?>
which allows them to be interpreted as UTF-8 files. So if you want to to encode the←
character in an attribute value, just use that character:<Overload retVal="nCount←" descr="Description of..">
. If you are having trouble with entering that character, you can just copy/paste it, or XML allows the use of number entities, so you can use the←
or←
entities.So to use that character:
- Make sure your prolog line uses the UTF-8 encoding, not the old Win-1252 encoding.
- if the file was originally Win-1252, use Encoding > Convert to UTF-8 and save after fixing the prolog in step 1
- Enter the character as the character or a decimal or hexadecimal entity.
At the same time is it possible that the name of the function is enhanced in some way as bold, italic or another slightly different color?
Not as Notepad++ is currently coded. And we fellow users in the Community forum cannot change the codebase for you; that has to be done through an official feature request, as described in our FAQ.
-
@PeterJones
Thanks for your reply:(I did, I copied and pasted the symbol).
I had to do something wrong, possibly when copying the encoding, it was from the Notepad++ manual (auto-completion.html/#create-auto-completion-definition-files)
<?versión xml="1.0" encoding="Windows-1252" ?>
You are right, I am going to implement your suggestion and then I will tell you.
Regarding the second point, “enhance the function” note that it was a
"question (?)" and idea
- not even a request!.With respect to bad-old-days of the 1980’s. I (an old man) wish to maintain good relations with the forum members : ) :¬) :-) …
Have a good evening!
-
@PeterJones
Cheers:
I have tried to send you a reply presenting the results to your suggestions, but Akismet.com blocks it.
Answer in my opinion does not violate any of the rules of the forum, and assumes having read the FAQs.
I would like to put this answer to the public criteria, to see what they think…
Good day :¬) … -
@José-Luis-Montero-Castellanos said in Display left arrow after RetVal in auto_Complete:
@PeterJones
Cheers:
I have tried to send you a reply presenting the results to your suggestions, but Akismet.com blocks it.
Answer in my opinion does not violate any of the rules of the forum, and assumes having read the FAQsAkismet knows nothing about our FAQs. It solely looks at the content of the message, and applies its own algorithm to decide whether to allow a post. Sometimes, you have to rephrase things, or break a single post into multiple parts. I’ve found that sometimes posting part, then quickly editing and adding the remainder is sufficient, but others report more akismet blocks on edits.
The best I can suggest is to try some more variations; there is nothing I can do beyond that
-
@José-Luis-Montero-Castellanos ,
This morning, I tried adding both
←
and←
andto retVal and desc attributes. Unfortunately, as your previous post hinted but couldn’t show because of Akismet, they do not properly render in the popup boxes.←
I will create a simple example,
and then create an issue about this but, linking to this discussion, because it really should handle UTF-8 and entities properly. -
@José-Luis-Montero-Castellanos ,
More experiments showed:
- For the auto-complete text itself,
- UTF-8-encoded character does not auto-complete correctly
- Decimal entity (
⅑
) does not auto-complete correctly - Hex entity (
←
) does auto-complete correctly
- For the
retVal
ordescr
attributes which show up in the function-parameter popup:- UTF-8-encoded character does not display correctly
- Decimal entity (
⅑
) does not display correctly - Hex entity (
←
) does display correctly
So, at this point, I will not be putting in a bug report, but will be updating the auto-completion documentation to emphasize that hexadecimal entities are required to get special characters in the completion or popup text.
The auto-completion file I used for these examples:
<?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <AutoComplete> <KeyWord name="arrow←1" /> <KeyWord name="arrow←2" /> <KeyWord name="arrow←3" /> <KeyWord name="encoded" func="yes"> <Overload retVal="InRetVal(←)" descr="InDescr(←)" /> </KeyWord> <KeyWord name="entityDecimal" func="yes"> <Overload retVal="InRetVal(←)" descr="InDescr(←)" /> </KeyWord> <KeyWord name="entityHex" func="yes"> <Overload retVal="InRetVal(←)" descr="InDescr(←)" /> </KeyWord> </AutoComplete> </NotepadPlus>
- For the auto-complete text itself,
-
@José-Luis-Montero-Castellanos ,
So for an example more like yours,
<?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <AutoComplete> <KeyWord name="entityHex" func="yes"> <Overload retVal="nCount←" descr="Description…" /> </KeyWord> </AutoComplete> </NotepadPlus>
Hope this helps you.
-
@PeterJones
Heh heh Perfect!
When I pasted the graphic character ←, anâ
appeared instead, but it was enough to enter the hex code (entity) ← ; and everything worked. Now to find and replace everything, and enjoy with the Npp.
Thank you so much!