Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Auto completion for parameter/option

    Help wanted · · · – – – · · ·
    3
    4
    2073
    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.
    • password636
      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 Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        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
        • password636
          password636 last edited by

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

          Thanks

          1 Reply Last reply Reply Quote 0
          • Jim Dailey
            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
            Copyright © 2014 NodeBB Forums | Contributors