[Plugin update] An alternative auto completion for notepad++
@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…
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 text
Actually, 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 issues
I hope all this info is clear
greenzest last edited by
This post is deleted!
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 scripts
LAZY), 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 set
- 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 included
By the way, I tested this exact method on 2 different machines and got the same results.
I hope this helps!
P.S. I also hope you plan to fix the tiny UI… :)
DaveyD last edited by DaveyD
4/5/2017, 11:59 PM)
The for the portable npp package was incorrect. Here is the updated link:
Npp portable - all included
Sorry about that,
@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
Zhixian_Jason Yu last edited by
@jcaillon Great work! How did you disable the default auto completion feature?