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

highlight-aware RE, syntax keyword completion

Expand Messages
  • Kontra, Gergely
    Hi! Will vim s RE ever contain a multi(?) which tells, that the previous atom is in highlight group X? Another item I ve missed is a completion mode, where vim
    Message 1 of 8 , Mar 1, 2002
    • 0 Attachment
      Hi!

      Will vim's RE ever contain a multi(?) which tells, that the previous
      atom is in highlight group X?

      Another item I've missed is a completion mode, where vim tries to
      complete the keywords defined in the file's syntax file.
      Eg. in C for, if, while, int ...

      Gergo

      +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
      | Email: kgergely@..., kgergely@... |
      | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
      +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
      .
      Magyar php mirror es magyar php dokumentacio: http://hu.php.net
    • Bram Moolenaar
      ... It s in the todo list. However, it s complicated to make this work, don t count on this being available in the near future. ... You are probably better
      Message 2 of 8 , Mar 1, 2002
      • 0 Attachment
        Kontra Gergely wrote:

        > Will vim's RE ever contain a multi(?) which tells, that the previous
        > atom is in highlight group X?

        It's in the todo list. However, it's complicated to make this work,
        don't count on this being available in the near future.

        > Another item I've missed is a completion mode, where vim tries to
        > complete the keywords defined in the file's syntax file.
        > Eg. in C for, if, while, int ...

        You are probably better off using a dictionary to complete from.

        --
        From "know your smileys":
        @:-() Elvis Presley

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
        \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • Ron Aaron
        ... That works great, of course; but it would be very nice (and probably not too hard?) to be able to complete from a string, choice1,choice2,choice3 Best
        Message 3 of 8 , Mar 1, 2002
        • 0 Attachment
          Bram Moolenaar <Bram@...> writes:
          >
          >You are probably better off using a dictionary to complete from.

          That works great, of course; but it would be very nice (and probably not too
          hard?) to be able to complete from a string,

          "choice1,choice2,choice3"


          Best regards,

          Ron
        • Bram Moolenaar
          ... Sure. And I often would want to complete from registers and text saved for undo (deleted text). However, the code for completion is a bit of a mess.
          Message 4 of 8 , Mar 2, 2002
          • 0 Attachment
            Ron Aaron wrote:

            > Bram Moolenaar <Bram@...> writes:
            > >
            > >You are probably better off using a dictionary to complete from.
            >
            > That works great, of course; but it would be very nice (and probably not too
            > hard?) to be able to complete from a string,
            >
            > "choice1,choice2,choice3"

            Sure. And I often would want to complete from registers and text saved
            for undo (deleted text).

            However, the code for completion is a bit of a mess. Before adding
            anything, it must first be cleaned up. That requires understanding how
            the existing code works, and that isn't easy.

            --
            I AM THANKFUL...
            ...for all the complaining I hear about the government
            because it means we have freedom of speech.

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
            \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          • Kontra, Gergely
            ... Well you re right, but this way no work needed by the user... Gergo +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ ...
            Message 5 of 8 , Mar 4, 2002
            • 0 Attachment
              >> Another item I've missed is a completion mode, where vim tries to
              >> complete the keywords defined in the file's syntax file.
              >> Eg. in C for, if, while, int ...
              >
              >You are probably better off using a dictionary to complete from.
              >
              Well you're right, but this way no work needed by the user...

              Gergo


              +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
              | Email: kgergely@..., kgergely@... |
              | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
              +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
              .
              Magyar php mirror es magyar php dokumentacio: http://hu.php.net
            • Vince Negri
              ... Someone write a vim script that parses a syntax file and writes all the keywords to another file for use as a dictionary?
              Message 6 of 8 , Mar 4, 2002
              • 0 Attachment
                > >
                > >You are probably better off using a dictionary to complete from.
                > >
                > well you're right, but this way no work needed by the user...

                Someone write a vim script that parses a syntax file and writes all the
                keywords to another file for use as a dictionary?
              • Benji Fisher
                ... The Pippo() function in foo.vim (my file of example vim functions, script 72 at VimOnline) is a good start for this job. The question is how to sort from
                Message 7 of 8 , Mar 4, 2002
                • 0 Attachment
                  Vince Negri wrote:
                  >
                  > > >
                  > > >You are probably better off using a dictionary to complete from.
                  > > >
                  > > well you're right, but this way no work needed by the user...
                  >
                  > Someone write a vim script that parses a syntax file and writes all the
                  > keywords to another file for use as a dictionary?

                  The Pippo() function in foo.vim (my file of example vim functions, script
                  72 at VimOnline) is a good start for this job. The question is how to sort
                  from a vim script. If we can rely on an external sort program, it is easy.
                  If we have to copy the Sort() program from the docs (or from the explorer
                  plugin) then it gets to be rather large. Suggestions?

                  --Benji Fisher
                • Doug Kearns
                  ... Yes, _very_ nice indeed. I proposed this a while ago, but there wasn t much support :-( Regards, Doug
                  Message 8 of 8 , Mar 8, 2002
                  • 0 Attachment
                    On Fri, Mar 01, 2002 at 03:03:25PM -0800, Ron Aaron wrote:
                    > Bram Moolenaar <Bram@...> writes:
                    > >
                    > >You are probably better off using a dictionary to complete from.
                    >
                    > That works great, of course; but it would be very nice (and probably not too
                    > hard?) to be able to complete from a string,
                    >
                    > "choice1,choice2,choice3"

                    Yes, _very_ nice indeed. I proposed this a while ago, but there wasn't
                    much support :-(

                    Regards,
                    Doug
                  Your message has been successfully submitted and would be delivered to recipients shortly.