Community
    • Login

    Autocomplete to properly recognize keywords with dash

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    2 Posts 1 Posters 880 Views 1 Watching
    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.
    • gusztavjG Offline
      gusztavj
      last edited by

      While trying to configure a large set of autocomplete rules, I found the following. Say you have a function name origin and another called world-origin. (My Environment tag includes additionalWordChars="-"/) If you start typing world-origin, AC properly offers the whole word. After you type a parenthesis, however, the call tip for origin is shown. I guess when the calltip is called, it only parses the string back to the last.

      Here’s what I have:

      <Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChars="-"/>
      ...
      <KeyWord name="origin" func="yes">
      	<Overload retVal="" descr="Obsolete tag https://online.ts2009.com/mediaWiki/index.php/KIND_Traincar" />
      	<Overload retVal="string" descr="The Country Abbreviation. " />
      </KeyWord>
      ...
      <KeyWord name="world-origin" func="yes">
      	<Overload retVal="float list" descr="latitude, longitude, and altitude">
      	</Overload>
      </KeyWord>
      

      And this is what I get:
      Calltip.png

      Can I do something to force NP++ to make it think the dash is part of the keyword name, just as with the autocomplete list?

      1 Reply Last reply Reply Quote 0
      • gusztavjG Offline
        gusztavj
        last edited by

        In addition, if I have a keyword with a last tag that does not match a full keyword, I get no calltip. For example, I defined the keyword adjust-cross-section-to-ground and I don’t have a keyword ground, therefore I don’t get any calltip for adjust-cross-section-to-ground (however it appears in the autocomplete list).

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors