Loading ...
Sorry, an error occurred while loading the content.

Re: [patch] added command line completion for the ":sign" command

Expand Messages
  • Bram Moolenaar
    ... Thanks. I ll add a note to the todo list. -- GALAHAD: No. Look, I can tackle this lot single-handed! GIRLS: Yes, yes, let him Tackle us single-handed!
    Message 1 of 4 , Apr 5, 2009
    • 0 Attachment
      Dominique Pelle wrote:

      > The ":sign" command currently has no command line
      > completion. Attached patch (against Vim-7.2.148)
      > adds command line completion for this command.
      >
      > A few examples:
      >
      > :sign <CTRL-D>
      > define jump list place undefine unplace
      >
      > :sign define foo <CTRL-D>
      > icon= linehl= text= texthl=
      >
      > :sign define foo linehl=Spel<CTRL-D>
      > SpellBad SpellCap SpellLocal SpellRare
      >
      > :sign define foo icon=/usr/share/icons/<CTRL-D>
      > (completes with file names)
      >
      > :sign place {id} name=<CTRL-D>
      > (completes with all defined sign names)
      >
      > :sign list <CTRL-D>
      > (completes with all defined sign names)
      >
      > :sign undefine <CTRL-D>
      > (completes with all defined sign names)
      >
      > Not done yet, but I could also add:
      >
      > - completion with placed sign ids when doing:
      > ":sign jump <CTRL-D>" or ":sign unplace <CTRL-D>".
      >
      > - completion of buffer numbers when doing:
      > ":sign unplace {id} buffer=<CTRL-D>".
      >
      > ... but I prefer to keep initial patch small and
      > add extra features in further patches if there is
      > enough interest in it.

      Thanks. I'll add a note to the todo list.

      --
      GALAHAD: No. Look, I can tackle this lot single-handed!
      GIRLS: Yes, yes, let him Tackle us single-handed!
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Bram Moolenaar
      ... Thanks for the patch. A few comments. :sign un would be handled like :sign undefine , even though it s ambigious. The new sign_cmd_idx() function
      Message 2 of 4 , Apr 22, 2009
      • 0 Attachment
        Dominique Pelle wrote:

        > The ":sign" command currently has no command line
        > completion. Attached patch (against Vim-7.2.148)
        > adds command line completion for this command.
        >
        > A few examples:
        >
        > :sign <CTRL-D>
        > define jump list place undefine unplace
        >
        > :sign define foo <CTRL-D>
        > icon= linehl= text= texthl=
        >
        > :sign define foo linehl=Spel<CTRL-D>
        > SpellBad SpellCap SpellLocal SpellRare
        >
        > :sign define foo icon=/usr/share/icons/<CTRL-D>
        > (completes with file names)
        >
        > :sign place {id} name=<CTRL-D>
        > (completes with all defined sign names)
        >
        > :sign list <CTRL-D>
        > (completes with all defined sign names)
        >
        > :sign undefine <CTRL-D>
        > (completes with all defined sign names)
        >
        > Not done yet, but I could also add:
        >
        > - completion with placed sign ids when doing:
        > ":sign jump <CTRL-D>" or ":sign unplace <CTRL-D>".
        >
        > - completion of buffer numbers when doing:
        > ":sign unplace {id} buffer=<CTRL-D>".
        >
        > ... but I prefer to keep initial patch small and
        > add extra features in further patches if there is
        > enough interest in it.

        Thanks for the patch. A few comments.

        ":sign un" would be handled like ":sign undefine", even though it's
        ambigious. The new sign_cmd_idx() function needs to check that when not
        doing completion there is a full word match.

        In Vim code we don't use "const". It's usually more work than it's
        worth.

        Can you update the patch for this?

        --
        Seen on the back of a biker's vest: If you can read this, my wife fell off.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Dominique Pellé
        ... Thanks for noticing the bug. I have synched with Vim-7.2.160 and updated the patch: - removed const as requested - changed sign_cmd_idx() to perform full
        Message 3 of 4 , Apr 22, 2009
        • 0 Attachment
          Bram Moolenaar wrote:

          > Dominique Pelle wrote:
          >
          >> The ":sign" command currently has no command line
          >> completion.  Attached patch (against Vim-7.2.148)
          >> adds command line completion for this command.
          >>
          >> A few examples:
          >>
          >>   :sign <CTRL-D>
          >>   define  jump  list  place  undefine  unplace

          ...snip...

          > Thanks for the patch.  A few comments.
          >
          > ":sign un" would be handled like ":sign undefine", even though it's
          > ambigious.  The new sign_cmd_idx() function needs to check that when not
          > doing completion there is a full word match.
          >
          > In Vim code we don't use "const".  It's usually more work than it's
          > worth.
          >
          > Can you update the patch for this?

          Thanks for noticing the bug. I have synched with Vim-7.2.160
          and updated the patch:
          - removed const as requested
          - changed sign_cmd_idx() to perform full word match (it needed
          to do full word match wherever it's used)
          - fixed another bug in sign_cmd_idx() (crash with ":sign f").

          Regards
          -- Dominique

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.