• Login
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.
  • P
    password636
    last edited by Aug 26, 2016, 10:32 AM

    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

    C 1 Reply Last reply Aug 27, 2016, 12:57 AM Reply Quote 0
    • C
      Claudia Frank @password636
      last edited by Aug 27, 2016, 12:57 AM

      @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
      • P
        password636
        last edited by Aug 29, 2016, 6:11 AM

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

        Thanks

        1 Reply Last reply Reply Quote 0
        • J
          Jim Dailey
          last edited by Aug 29, 2016, 3:12 PM

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

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