Community
    • Login

    Autocomplete to properly recognize keywords with dash

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    2 Posts 1 Posters 430 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.
    • gusztavjG
      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
        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors