Community
    • Login

    Auto completion for parameter/option

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 2.4k 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.
    • password636P
      password636
      last edited by

      Hi,

      Is there any way to auto complete parameter in option style? I’m using a user-defined language, the syntax is similiar to Tcl, so I use Tcl to illustrate, for example, a Tcl command:
      return -code <code> -errorinfo <info> -errorcode <code>

      ‘-code’, ‘-errorinfo’ and ‘-errorcode’ are options, kinda like paramter, what I want is after I type ‘return’, maybe followed by a space or other character like (, NP++ can present ‘-code’, ‘-errorinfo’ and ‘-errorcode’ that are selective in a list.

      I tried to define the three options as keywords, which can make them selective, but that also make the three options same level as real function names, because function names are keywords too, and I only want the options to be listed after I type ‘return’.

      Is this can be implemented by defining an xml file under APIs/? If not, is there any plugin to implement this or similar to what I want to implement, I can learn to write my own version.

      Thanks

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @password636
        last edited by

        @password636

        yes, you could create a xml with the name of your udl to do the job.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • password636P
          password636
          last edited by

          @Claudia-Frank
          Could you please share any example .xml files?

          Thanks

          1 Reply Last reply Reply Quote 0
          • Jim DaileyJ
            Jim Dailey
            last edited by

            @password636
            There are bunch of them in the plugins\APIs directory. Check out rc.xml.

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