Giter Site home page Giter Site logo

Comments (8)

vinsworldcom avatar vinsworldcom commented on August 21, 2024 1

@pnedev very nice! I would welcome the character number be customizable, default at 3, but I would probably set to 1 as I have Notepad++ autocomplete set there as well.

Other than that, the only thing is it makes an audible system "ding", "bell" whatever sound whenever a character is typed and the plugin Autocomplete window is visible. You need to type slowly, but it is for each typed character. Typing fast, you may only hear the bell once or twice.

PS: I only tried the 64-bit version.

Cheers.

PS: The same "system beep" was happening when pressing Tab in the Function List in Notepad++ itself a while back. It was fixed in this file:

https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp

Search for "remove beep" and you'll see a SetWindowLongPtr() call, a few times this shows up in this file. Maybe a clue how to fix it?

from nppgtags.

vinsworldcom avatar vinsworldcom commented on August 21, 2024 1

Some testing and this simple change removes the annoying beep for me:

nppgtags/src/AutoCompleteWin.cpp:

448:                 case LVN_KEYDOWN:
449:                     if (ACW->onKeyDown(((LPNMLVKEYDOWN)lParam)->wVKey))
450:-                         return 0;
450:+                         return 1;
451:                 break;

Cheers.

from nppgtags.

pnedev avatar pnedev commented on August 21, 2024

Sounds like a useful idea (one may also monitor Scintilla notifications for added/deleted text to accomplish this as I kind-of do in the plugin). I'll implement it some time in the future (when I find the time that is :) ).
Maybe it is good to set a starting character number before triggering the autocomplete because otherwise when you enter just one char a possibly very large autocomplete list will appear which IMO feels more like a "noise" and distraction when typing than something really useful.

Thanks and regards

from nppgtags.

pnedev avatar pnedev commented on August 21, 2024

Hi again Vince,

Could you please check this development build: 64-bit, 32-bit. It is using the native plugin autocomplete list now but it is auto-shown on char input (after the third entered character). Is this example kind-of what you are expecting and proposing?

P.S. I see you have made an example PR but I don't have time to look at it right now. Sorry about that and thanks 👍

from nppgtags.

vinsworldcom avatar vinsworldcom commented on August 21, 2024

I'm testing now and it all was going so good until I tried to use multiple caret - which multi-editing is now enabled by default in Notepad++ 8.6. Using your plugin native Autocomplete, I can't do multi carets. As soon as the plugin autocomplete pops up, the multi-carets are lost to just the active caret.

I'm going to keep playing with my PR to see if I can't fix the issues. I think we'll need to use the Notepad++ / Scintilla native autocomplete functions in order to get the full integration and usefulness.

Cheers.

from nppgtags.

pnedev avatar pnedev commented on August 21, 2024

Thanks Vince for debugging the beep issue, the feedback and the testing 👍
You are right, I haven't implemented the NppGTags autocomplete function with multi-caret in mind.

BR

P.S. I can easily disable plugin Autocomplete triggering if multi-editing is at hand if that's something useful for you as initial approach.

from nppgtags.

vinsworldcom avatar vinsworldcom commented on August 21, 2024

Yes, I use multi-caret quite regularly. It would be unfortunate if it could not work in multi-caret mode. The Scintilla native autocomplete does work in multi-caret mode.

I think I've corrected most of the problems with my PR. I'm using it now in my Notepad++ daily use to see if any other issues come up.

Cheers.

from nppgtags.

pnedev avatar pnedev commented on August 21, 2024

OK, I'll try it myself soon and probably merge it.
Thank you for looking into this.

P.S. Later I'll also add automatic autocomplete on char input + starting character per database setting.
You might also want to check my latest commits to dev branch - I have done some optimizations and fixes (including what you have already found about the "Create missing database" prompt on automatic autocomplete). One of those is a single check per file activation if it is included in a database and "caching" the result so no extensive database path lookup is done on each char input while editing a single file. There are some more fixes that might not be relevant to your implementation with Scintilla autocomplete.

from nppgtags.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.