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

[PATCH] count for CR in quickfix window

Expand Messages
  • AOYAMA Shotaro
    Hi, Here is a small patch for specifying a window in which vim opens an error when you hit ENTER in a quickfix window. With this patch, you may hit 3 in
    Message 1 of 4 , Dec 31, 2006
    • 0 Attachment
      Hi,

      Here is a small patch for specifying a window in which vim opens
      an error when you hit ENTER in a quickfix window.
      With this patch, you may hit "3<CR>" in the quickfix window,
      then the selected error is displayed in the window #3.

      Often I face a situation that I want to display an error,
      but don't want to hide a buffer in the above window
      or open a new window and break window layout.
      I think this feature would be helpful in such time.

      What do you people think about this?

      Regards,

      --
      AOYAMA Shotaro
      mailto:jod@...
    • Mikolaj Machowski
      ... Feature is definitely useful, I was very often missing such functionality. But way to open it... 3 usually means go 3 lines down - even when it
      Message 2 of 4 , Jan 1, 2007
      • 0 Attachment
        Dnia pon sty 1 2007, AOYAMA Shotaro napisaƂ:
        > Hi,
        >
        > Here is a small patch for specifying a window in which vim opens
        > an error when you hit ENTER in a quickfix window.
        > With this patch, you may hit "3<CR>" in the quickfix window,
        > then the selected error is displayed in the window #3.
        >
        > Often I face a situation that I want to display an error,
        > but don't want to hide a buffer in the above window
        > or open a new window and break window layout.
        > I think this feature would be helpful in such time.
        >
        > What do you people think about this?

        Feature is definitely useful, I was very often missing such
        functionality. But way to open it... "3<cr>" usually means "go 3 lines
        down" - even when it doesn't work in quickfix window.

        IMO better way would be to make <C-W><CR> to accept count, eg.:
        3<C-W><CR>

        Note: decision belongs to Bram who is on his usual December/January
        holidays/visit to Uganda.

        m.
      • Bram Moolenaar
        ... Thanks for making this patch. It looks useful. I think it would be good to add some error handling: what if the number entered is out of range for the
        Message 3 of 4 , Jan 7, 2007
        • 0 Attachment
          Shotaro Aoyama wrote:

          > Here is a small patch for specifying a window in which vim opens
          > an error when you hit ENTER in a quickfix window.
          > With this patch, you may hit "3<CR>" in the quickfix window,
          > then the selected error is displayed in the window #3.
          >
          > Often I face a situation that I want to display an error,
          > but don't want to hide a buffer in the above window
          > or open a new window and break window layout.
          > I think this feature would be helpful in such time.
          >
          > What do you people think about this?

          Thanks for making this patch. It looks useful.

          I think it would be good to add some error handling: what if the number
          entered is out of range for the number of windows?

          One problem: when the count is not given it should still use ".cc" and
          ".ll" as before.

          --
          Every engineer dreams about saving the universe and having sex with aliens.
          This is much more glamorous than the real life of an engineer, which consists
          of hiding from the universe and having sex without the participation of other
          life forms. (Scott Adams - The Dilbert principle)

          /// 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 ///
        • AOYAMA Shotaro
          ... Giving out of range number to w, vim shows no error and goes to the window that has the largest number. Same for in that patch. I think it s
          Message 4 of 4 , Jan 7, 2007
          • 0 Attachment
            Bram Moolenaar wrote:

            >Thanks for making this patch. It looks useful.
            >
            >I think it would be good to add some error handling: what if the number
            >entered is out of range for the number of windows?

            Giving out of range number to <C-w>w, vim shows no error and
            goes to the window that has the largest number.
            Same for <CR> in that patch. I think it's consistent.

            >One problem: when the count is not given it should still use ".cc" and
            >".ll" as before.

            Yes, the patch works that way.

            Regards,

            --
            AOYAMA Shotaro
            mailto:jod@...
          Your message has been successfully submitted and would be delivered to recipients shortly.