Community
    • Login

    [plugin dev question] Blocking the default Npp auto-completion programmatically

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    3 Posts 2 Posters 2.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • greenzestG
      greenzest
      last edited by

      Hello community,

      I’m currently writing a plugin that implements its own auto-completion mechanic and window.

      I would like to not prevent the default Npp auto-completion window from being displayed. Obviously, i can’t ask my user to deactivate the auto-completion via the options because i want him to be able to use the default autocomp for others files.

      I could call SCI_AUTOCCANCEL
      After each char input but that’s suboptimal… and the window is briefly displayed anyway…

      At the moment i got 2 (ugly) solutions :

      • Call SCI_AUTOCSTOPS with "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_
        -> this is effective, but for some reasons, it makes Npp slow down when editing a big file (> 40k lines)

      • Start recording a macro programmatically, this effectively blocks the default autocomp. But for obvious reasons, this is not a good solution…

      Can you think of anything else?

      Otherwise, i will create an issue to ask for a new Notepad++ message that allows the deactivation of the auto-completion.

      1 Reply Last reply Reply Quote 0
      • dailD
        dail
        last edited by

        There are user lists but I have no idea if that would be sufficient for what you need or it might interfere with the default auto-complete.

        My other suggestion would be to try to find some other plugins that show their own auto-complete list and figure out how they do it. I can’t remember any off the top of my head but I know there are a few around that do it.

        1 Reply Last reply Reply Quote 0
        • greenzestG
          greenzest
          last edited by

          I don’t see how the user lists can help me :)

          I already searched for plugin that implement their own auto-completion, but unfortunatlely, none of them prevent the default autocomp from being displayed :

          • http://csscriptnpp.codeplex.com/
          • Ccompletion
          • https://github.com/StanDog/npp-phpautocompletion

          http://csscriptnpp.codeplex.com/ is the closest to what i’m developing, but you manually have to deactivate the default auto-completion.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors