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

Re: [patch] move to next error

Expand Messages
  • Charles Campbell
    ... What about [h and ]h, which would move to the next/previous instance of the highlighting group specified in a new vim option; as a suggestion, jumphlgroup
    Message 1 of 12 , Aug 3, 2011
    • 0 Attachment
      Christian Brabandt wrote:
      > Hi Bram!
      >
      > On Di, 02 Aug 2011, Bram Moolenaar wrote:
      >
      >
      >> Christian Brabandt wrote:
      >>
      >>
      >>> this patch fixes this issue from the todo list:
      >>>
      >>>
      >>> ,----
      >>> | 8 Add a command to jump to the next character highlighted with
      >>> | "Error".
      >>> `----
      >>>
      >>> It implements the [e and ]e movement commands, which move to the
      >>> previous or next error. And while I was at it, I also made [t ]t move to
      >>> the previous/next item that is highlighted with TODO highlighting.
      >>>
      >> Thanks, I'll put it on the todo list.
      >>
      >> We are running out of command characters, taking two more from the ] and
      >> [ list makes me wonder how many users will use them. Perhaps we should
      >> have one "move to highlight" command with an argument to specify what
      >> kind of highlighting? That would be more future safe.
      >>
      > Like what? Something like ]h plus a char, that identifies the
      > highlighting?
      >
      What about [h and ]h, which would move to the next/previous instance of
      the highlighting group specified in a new vim option; as a suggestion,
      jumphlgroup . This would be instead of [t and ]t, and could be used
      instead of [e and]e, too, I suppose.

      Regards,
      Chip Campbell

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Ben Schmidt
      ... I think something more future-proof and flexible would be better, too. Maybe it needs to be an Ex command that a user can map if desired to access in
      Message 2 of 12 , Aug 3, 2011
      • 0 Attachment
        On 3/08/11 6:30 AM, Bram Moolenaar wrote:
        > Christian Brabandt wrote:
        >
        >> this patch fixes this issue from the todo list:
        >>
        >>
        >> ,----
        >> | 8 Add a command to jump to the next character highlighted with
        >> | "Error".
        >> `----
        >>
        >> It implements the [e and ]e movement commands, which move to the
        >> previous or next error. And while I was at it, I also made [t ]t move to
        >> the previous/next item that is highlighted with TODO highlighting.
        >
        > Thanks, I'll put it on the todo list.
        >
        > We are running out of command characters, taking two more from the ] and
        > [ list makes me wonder how many users will use them. Perhaps we should
        > have one "move to highlight" command with an argument to specify what
        > kind of highlighting? That would be more future safe.

        I think something more future-proof and flexible would be better, too.

        Maybe it needs to be an Ex command that a user can map if desired to
        access in normal mode.

        Ben.



        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Bram Moolenaar
        ... That sounds like a good idea. The option can be set depending on the language, by a filetype plugin. It can be a list of highlight groups, so that you can
        Message 3 of 12 , Aug 4, 2011
        • 0 Attachment
          Charles Campbell wrote:

          > Christian Brabandt wrote:
          > > Hi Bram!
          > >
          > > On Di, 02 Aug 2011, Bram Moolenaar wrote:
          > >
          > >
          > >> Christian Brabandt wrote:
          > >>
          > >>
          > >>> this patch fixes this issue from the todo list:
          > >>>
          > >>>
          > >>> ,----
          > >>> | 8 Add a command to jump to the next character highlighted with
          > >>> | "Error".
          > >>> `----
          > >>>
          > >>> It implements the [e and ]e movement commands, which move to the
          > >>> previous or next error. And while I was at it, I also made [t ]t move to
          > >>> the previous/next item that is highlighted with TODO highlighting.
          > >>>
          > >> Thanks, I'll put it on the todo list.
          > >>
          > >> We are running out of command characters, taking two more from the ] and
          > >> [ list makes me wonder how many users will use them. Perhaps we should
          > >> have one "move to highlight" command with an argument to specify what
          > >> kind of highlighting? That would be more future safe.
          > >>
          > > Like what? Something like ]h plus a char, that identifies the
          > > highlighting?
          > >
          > What about [h and ]h, which would move to the next/previous instance of
          > the highlighting group specified in a new vim option; as a suggestion,
          > jumphlgroup . This would be instead of [t and ]t, and could be used
          > instead of [e and]e, too, I suppose.

          That sounds like a good idea. The option can be set depending on the
          language, by a filetype plugin. It can be a list of highlight groups, so
          that you can tell where ]h and [h stop. You could also make a mapping
          that sets the option and then does the ]h, to jump to specific
          highlights.

          --
          CONCORDE: Quickly, sir, come this way!
          LAUNCELOT: No! It's not right for my idiom. I must escape more ... more ...
          CONCORDE: Dramatically, sir?
          LAUNCELOT: Dramatically.
          "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/ \\\
          \\\ an exciting new programming language -- http://www.Zimbu.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Christian Brabandt
          Hi Bram! ... Here we go an updated patch. The comments should explain how it works. I intentionally commented out some parts of it. You may enable, if you like
          Message 4 of 12 , Aug 7, 2011
          • 0 Attachment
            Hi Bram!

            On Do, 04 Aug 2011, Bram Moolenaar wrote:

            > > What about [h and ]h, which would move to the next/previous instance of
            > > the highlighting group specified in a new vim option; as a suggestion,
            > > jumphlgroup . This would be instead of [t and ]t, and could be used
            > > instead of [e and]e, too, I suppose.
            >
            > That sounds like a good idea. The option can be set depending on the
            > language, by a filetype plugin. It can be a list of highlight groups, so
            > that you can tell where ]h and [h stop. You could also make a mapping
            > that sets the option and then does the ]h, to jump to specific
            > highlights.

            Here we go an updated patch.

            The comments should explain how it works. I intentionally commented out
            some parts of it. You may enable, if you like it. (basically, how moving
            backwards works).

            One thing, I still haven't looked at how to add moving to parts that are
            highlighted because of the match() functions.

            regards,
            Christian
            --
            Demnächst sollen auch die ersten Landesmeisterschaften im
            Beamtendreikampf ausgerichtet werden: Knicken, Lochen, Abheften.

            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Bram Moolenaar
            ... joinspaces is misplaced. ... Still the old command names. ... syntax highlight gorup . Doesn t have to be an error. There are a lot of new lines. I
            Message 5 of 12 , Aug 8, 2011
            • 0 Attachment
              Christian Brabandt wrote:

              > Hi Bram!
              >
              > On Do, 04 Aug 2011, Bram Moolenaar wrote:
              >
              > > > What about [h and ]h, which would move to the next/previous instance of
              > > > the highlighting group specified in a new vim option; as a suggestion,
              > > > jumphlgroup . This would be instead of [t and ]t, and could be used
              > > > instead of [e and]e, too, I suppose.
              > >
              > > That sounds like a good idea. The option can be set depending on the
              > > language, by a filetype plugin. It can be a list of highlight groups, so
              > > that you can tell where ]h and [h stop. You could also make a mapping
              > > that sets the option and then does the ]h, to jump to specific
              > > highlights.
              >
              > Here we go an updated patch.
              >
              > The comments should explain how it works. I intentionally commented out
              > some parts of it. You may enable, if you like it. (basically, how moving
              > backwards works).
              >
              > One thing, I still haven't looked at how to add moving to parts that are
              > highlighted because of the match() functions.

              Thanks for making an updated patch. A few obvious mistakes:

              > + *'jumphlgroup'* *'jhl'* *'nojumphlgroup'* *'nojhl'*
              > +'joinspaces' 'js' string (Vim default "Error", Vi default "")

              "joinspaces" is misplaced.

              > + /*
              > + * "[e" and "]e": move to previous or next error highlight
              > + * "[t" and "]t": move to previous or next TODO highlight
              > + */

              Still the old command names.

              > + * Move to next syntax error.

              "syntax highlight gorup". Doesn't have to be an error.

              There are a lot of new lines. I hope you didn't use copy/paste for
              them.

              --
              In Africa some of the native tribes have a custom of beating the ground
              with clubs and uttering spine chilling cries. Anthropologists call
              this a form of primitive self-expression. In America we call it golf.

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ an exciting new programming language -- http://www.Zimbu.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Christian Brabandt
              Hi Bram! Here is an updated patch, that should work with match() functions and includes a test. It is using the next_search_hl() function to find matches from
              Message 6 of 12 , Aug 9, 2011
              • 0 Attachment
                Hi Bram!

                Here is an updated patch, that should work with match() functions and
                includes a test. It is using the next_search_hl() function to find
                matches from the matchlist (and I had to make this function non-static
                in order to use it). Unfortunately, this does not seem to work well with
                multiline patterns (so it will always jump to the first line of a
                multiline pattern).

                On Mo, 08 Aug 2011, Bram Moolenaar wrote:
                > Thanks for making an updated patch. A few obvious mistakes:
                >
                > > + *'jumphlgroup'* *'jhl'* *'nojumphlgroup'* *'nojhl'*
                > > +'joinspaces' 'js' string (Vim default "Error", Vi default "")
                >
                > "joinspaces" is misplaced.

                Copy Paste error. 'jumphlgroup' was meant. Not sure what you meant with
                misplaced, it should be aligned like all other options.

                >
                > > + /*
                > > + * "[e" and "]e": move to previous or next error highlight
                > > + * "[t" and "]t": move to previous or next TODO highlight
                > > + */
                >
                > Still the old command names.

                Removed.

                > > + * Move to next syntax error.
                >
                > "syntax highlight gorup". Doesn't have to be an error.

                Fixed.

                >
                > There are a lot of new lines. I hope you didn't use copy/paste for
                > them.

                Yeah, making a new option introduced a lot of new lines. I tried to keep
                it as simple as possible. I am surprised, it got that big, since it
                started as a rather small patch.

                regards,
                Christian

                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • Christian Brabandt
                Hi Bram, attached is an updated patch, that should now also compile for small versions (I included some missing #ifdef): regards, Christian -- You received
                Message 7 of 12 , Aug 18, 2011
                • 0 Attachment
                  Hi Bram,

                  attached is an updated patch, that should now also compile for small
                  versions (I included some missing #ifdef):

                  regards,
                  Christian

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                Your message has been successfully submitted and would be delivered to recipients shortly.