[Plugin update] An alternative auto completion for notepad++
-
Damn, can’t edit my own post and I have to wait 1800s to post again ^^"
Forgot the most important section :Try it
Download the latest beta release here :
https://github.com/jcaillon/3P/releases/tag/v1.7.4You can hide both side panels that are only useful to openedge programmers :)
-
@jcaillon - This looks great - Thanks!
After installing and trying to use, I have the following comments:- After selecting an item from the popup window, it inserts the selected word after what I already typed. if I type for instance
low
and chooselowercase
from the list, I will end up withlowlowercase
- I have a high dpi monitor - the UI of the dropdown list is so tiny, I can hardly see it!
here is a screenshot
Another thing, is the autocomplete plugin tied together with the 3p plugin? Or can I install it without that?
There were 2 files in the download, I placed both in the plugins folder.INFO:
Notepad++ v7.3.3 (32-bit)
Build time : Mar 8 2017 - 03:37:37
Path : C:\Programs\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS : Windows 10 (64-bit)Thanks,
David - After selecting an item from the popup window, it inserts the selected word after what I already typed. if I type for instance
-
Hi @DaveyD , thank you for the feedback.
- can you reproduce it everytime? I don’t have this issue on my end
- Ah, yes I’m aware of that issue #86; I’ve developped my own UI framework for this plugin and I’ve made the rookie mistake of ignoring dpi awareness ^^". That being said, the auto completion is entirely owner drawn so I will be able to make the font size an option in a later release
Concerning your final question : yes, for now, this is tied to 3P. However, I plan to create a separate plugin with only this autocompletion feature once it is mature and stable enough inside 3P.
Bye
-
@jcaillon - Thanks!
- I started testing again this morning - at first it wasn’t triggering at all! I restarted npp, still wasn’t triggering.
It finally started triggering and this time it worked as expected and replaced the original text! (I will try to test this more to see why it wasn’t triggering and I’ll post back) - Ok, optimistic news… I hope you can get to it sooner than later… :)
- Ok, that would be great because I don’t even know what Progress programming is… :)
Thanks!
David - I started testing again this morning - at first it wasn’t triggering at all! I restarted npp, still wasn’t triggering.
-
@jcaillon - After a bunch of testing, I think I found the the problem of the triggering!
Steps to reproduce:
- Open fresh npp
- Place cursor on a line that doesn’t have text
- Start typing - auto-complete does not trigger
- Now place cursor on a line with text
- Start typing - Autocomplete triggers as expected.
I haven’t the slightest idea why this would be, but that was the results of my testing - I leave the rest up to you
:)
However, after testing some more, I realized another thing, If I open a new file and then go back to the original file, the autocomplete triggers as expected even on a line that has no text.
Just to clarify: Once it triggers once, it continues to work correctly throughout the session in any place in the file. So, this is only a one time ‘setup’ per session (until you can figure out the cause and fix it…
:)
)Thanks,
David -
Thank you for taking the time to analyse this!
I actually think that you are describing a expected behavior, let me explain :
First thing to know is that there is an option that automatically hides the autocompletion if the text you type results in no matches in the list. This is enabled by default. (Plus, if there is absolutely nothing to suggest, e.i. you have no language selected and the text is empty, the list won’t automatically show up)
- Open fresh npp -> ok
- Place cursor on a line that doesn’t have text -> at this point, you are probably on a new file, not associated with a particular language and the text is empty -> hence the list is empty
- Start typing - auto-complete does not trigger -> since the list is empty, nothing happens when you type text (because of the option mentionned earlier) -> however you should be able to press CTRL+SPACE to show the empty list
- Now place cursor on a line with text -> I guess you changed file or added text -> now the list isn’t empty
- Start typing - Autocomplete triggers as expected. -> since the list isn’t empty, it shows the autocompletion
Tell me if this makes sense :)
-
@jcaillon - Thanks for the response
That default behavior is perfect!
However, I don’t think I explained myself well enough:
2. No, I was in a file with over 1500 lines of text, I had just placed my cursor on an empty line.
And the file is associated with a UDL (by the way, when the autocomplete does trigger, it shows function params as well - nice!)
3. I just tried again, list was empty (even though I was in large file) and ctrl+space opened a HUGE list of words (I guess all the words in the file)
4. No, I just moved it up to the previous line that already had textActually, now I received different behavior. There are a bunch of steps:
- Open fresh npp
- Place cursor on blank line - no autocomplete
- Place cursor on line with text - no autocomplete
- Place cursor on line right after text - autocomplete triggers!
- Press enter, now no autocomplete anywhere
- Open new file in npp and return to previous file - autocomplete everywhere and anywhere!
I created a small screen recording to show you my testing, please download from here:
Screencast on autocomplete issuesI hope all this info is clear
Thanks,
David -
This post is deleted! -
@DaveyD
Im so sorry, I see your problem in the video but I still can’t reproduce it!
Do you have other plugins installed? Is your file special in any way? I’m clueless at this point ^^"If that’s not too much too ask, and if you use a portable version of npp, would you mind sending me a copy of your npp installation directory with a sample file of your language?
-
@jcaillon - after reading that you couldn’t reproduce it, I realized that it must be something on my end…
I started debugging - I must have spent 2 hours debugging!
This is my testing outcome:
[Excuse me for writing all these steps… it’s just that after debugging for so long… I just have to write what I did! :) ]- Created a new portable npp and installed your plugin - everything worked.
- Installed all my plugins, everything worked!??
- Removed all plugins from my original install - it worked!
- Began putting all back few by few… I found that it was the python plugin!
- but that’s odd, because in my new portable npp, I also had python plugin installed and it worked!?
- I went back to my new portable install, removed all plugins except python. It worked!??
- If so, it must be something with my Python plugin in my installed version.
- I checked it and it was up to date.
- Maybe it’s one of my python scripts? (read on…)
- I copied all my Python scripts from my install into my new portable npp - it still worked!!
- I started going through the config folder file by file…
Anyway, to make a long story short… the bug is due to a setting on Python script!
When Python script is set to start startup scriptsATSTARTUP
(instead ofLAZY
), we get this funny behavior.Steps to Reproduce: (You don’t have to follow these steps exactly, just have python plugin installed and set that setting to
ATSTARTUP
. I am just writing it this way to show that it is a pure conflict - not tied to anything on my machine.)- Fresh install of npp
- Fresh install of Python plugin
- Go to
Plugins>Python Script>Configuration
, and setInitialisation
toATSTARTUP
- Close npp, reopen, the bug appears.
- The minute you change file and come back, it begins to work.
However, I did realize that it doesnt behave this way with all files! I tried a python script, it worked fine. I tried a regular txt file, it worked fine. I has to do something with the text in my file.
For testing purposes, I was able to reproduce this issue with a file of just a few lines.In order to help you find the problem, I am sending you the sample document. I am actually sending you 2 of the same docs with a slightly different name so you can see that immediately after moving to a new file, it begins to work even though the files are identical!
If it’s more convenient for you, I also packaged the entire portable npp folder. If you go with this, everything will be setup already (files included, and they will open immediately because of the sesssion file).
Set of 2 files for testing
Npp portable - all includedBy the way, I tested this exact method on 2 different machines and got the same results.
I hope this helps!
DavidP.S. I also hope you plan to fix the tiny UI… :)
-
EDIT: (
4/5/2017, 11:59 PM
)
The for the portable npp package was incorrect. Here is the updated link:
Npp portable - all includedSorry about that,
David -
@DaveyD, thank you very much the time you spent on this issue!
I’m glad we found the source, I am assuming that the python plugin modifies some scintilla options on startup; I’ll investigate ASAP. In the meantime, an easy workaround is to switch documents on startup :p
I should be able to fix the DPI awareness for the next release; at least for the auto completion form (I have more complex issues in the main window).
-
@jcaillon, Ok, thanks!
The workaround is definitely ok for me… :)
Regarding the dpi issue, that sounds great for me! Thanks
After you release that I will hopefully be able use it and to provide much better feedback on the actual plugin.Thanks and Good luck
David -
@jcaillon Great work! How did you disable the default auto completion feature?
-
The above download link is to an old version. To keep the link pointing to the latest version you should replace the tag/VerNum with latest. Please edit your first followup post with below link.
Download Latest Version here:
https://github.com/jcaillon/3P/releases/latest