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

Re: browse in the quickfix window

Expand Messages
  • Michael Wookey
    ... Maybe something like this? nnoremap :cnext nnoremap :cprevious -- You received this message from the vim_use
    Message 1 of 9 , Dec 30, 2009
    • 0 Attachment
      2009/12/28 Steven Woody <narkewoody@...>:
      > In the quickfix window (opened by :cw), I hit a ENTER on an item and
      > the cursor jumps to the main window, this is fine in some cases. But
      > what do I do if I want the cursor stay on the quickfix window and just
      > like to see the contents of the other window changes?

      Maybe something like this?

      nnoremap <silent> <C-j> :cnext<CR>
      nnoremap <silent> <C-k> :cprevious<CR>

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Steven Woody
      ... I still want to see the error list and want to really browse on it, just don t want window switching. :) -- Life is the only flaw in an otherwise perfect
      Message 2 of 9 , Jan 12, 2010
      • 0 Attachment
        2009/12/30 Michael Wookey <michaelwookey@...>:
        > 2009/12/28 Steven Woody <narkewoody@...>:
        >> In the quickfix window (opened by :cw), I hit a ENTER on an item and
        >> the cursor jumps to the main window, this is fine in some cases. But
        >> what do I do if I want the cursor stay on the quickfix window and just
        >> like to see the contents of the other window changes?
        >
        > Maybe something like this?
        >
        > nnoremap <silent> <C-j> :cnext<CR>
        > nnoremap <silent> <C-k> :cprevious<CR>
        >

        I still want to see the error list and want to really browse on it,
        just don't want window switching. :)


        --
        Life is the only flaw in an otherwise perfect nonexistence
        -- Schopenhauer

        narke
        public key at http://subkeys.pgp.net:11371 (narkewoody@...)
      • Tom Link
        ... I guess you could define a map that activates an entry in the quickfix window and then jumps back again. trag includes a command :TRagcw which you could
        Message 3 of 9 , Jan 12, 2010
        • 0 Attachment
          > I still want to see the error list and want to really browse on it,
          > just don't want window switching. :)

          I guess you could define a map that activates an entry in the quickfix
          window and then jumps back again.

          trag includes a command :TRagcw which you could like or maybe not.
        • Michael Wookey
          ... Try using :copen (or map it) first. -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php
          Message 4 of 9 , Jan 13, 2010
          • 0 Attachment
            2010/1/13 Steven Woody <narkewoody@...>:
            > 2009/12/30 Michael Wookey <michaelwookey@...>:
            >> 2009/12/28 Steven Woody <narkewoody@...>:
            >>> In the quickfix window (opened by :cw), I hit a ENTER on an item and
            >>> the cursor jumps to the main window, this is fine in some cases. But
            >>> what do I do if I want the cursor stay on the quickfix window and just
            >>> like to see the contents of the other window changes?
            >>
            >> Maybe something like this?
            >>
            >> nnoremap <silent> <C-j> :cnext<CR>
            >> nnoremap <silent> <C-k> :cprevious<CR>
            >>
            >
            > I still want to see the error list and want to really browse on it,
            > just don't want window switching. :)

            Try using :copen (or map it) first.
          • Michael Wookey
            ... Or, combine the two together like so... nnoremap :copen :cnext nnoremap :copen :cprevious -- You received this
            Message 5 of 9 , Jan 13, 2010
            • 0 Attachment
              2010/1/13 Michael Wookey <michaelwookey@...>:
              > 2010/1/13 Steven Woody <narkewoody@...>:
              >> 2009/12/30 Michael Wookey <michaelwookey@...>:
              >>> 2009/12/28 Steven Woody <narkewoody@...>:
              >>>> In the quickfix window (opened by :cw), I hit a ENTER on an item and
              >>>> the cursor jumps to the main window, this is fine in some cases. But
              >>>> what do I do if I want the cursor stay on the quickfix window and just
              >>>> like to see the contents of the other window changes?
              >>>
              >>> Maybe something like this?
              >>>
              >>> nnoremap <silent> <C-j> :cnext<CR>
              >>> nnoremap <silent> <C-k> :cprevious<CR>
              >>>
              >>
              >> I still want to see the error list and want to really browse on it,
              >> just don't want window switching. :)
              >
              > Try using :copen (or map it) first.

              Or, combine the two together like so...

              nnoremap <silent> <C-j> :copen<CR>:cnext<CR>
              nnoremap <silent> <C-k> :copen<CR>:cprevious<CR>
            • Christian Brabandt
              ... Well, the brutal method would be to issue an autocommand on window leave. ... you won t be able to leave the window. Use :au! WinLeave to delete this
              Message 6 of 9 , Jan 13, 2010
              • 0 Attachment
                On Tue, January 12, 2010 3:31 pm, Steven Woody wrote:
                > I still want to see the error list and want to really browse on it,
                > just don't want window switching. :)

                Well, the brutal method would be to issue an autocommand on window leave.
                So if you issue in your quickfix window this command:
                :au WinLeave <buffer> :call feedkeys("copen\n")
                you won't be able to leave the window. Use :au! WinLeave to delete this
                autocommand.

                But I doubt this is really a good idea. :cclose won't be able to close
                the window then. You would need to exit the quickfix window by using :q

                regards,
                Christian
              • mmarko
                ... Hi, You may be interested in a plugin that is a part of the vimuiex project. When the filetype of a buffer is set to qf (QuickFix), two new mappings are
                Message 7 of 9 , Jan 14, 2010
                • 0 Attachment
                  On Dec 28 2009, 10:56 am, Steven Woody <narkewo...@...> wrote:
                  > Hi,
                  >
                  > In the quickfix window (opened by :cw), I hit a ENTER on an item and
                  > the cursor jumps to the main window, this is fine in some cases. But
                  > what do I do if I want the cursor stay on the quickfix window and just
                  > like to see the contents of the other window changes?
                  >

                  Hi,

                  You may be interested in a plugin that is a part of the vimuiex
                  project.
                  When the filetype of a buffer is set to 'qf' (QuickFix), two new
                  mappings
                  are added to the QuickFix buffer:
                  <space> - preview the current item in a preview window
                  <cr> - close the preview window and jump to current item
                  (Mappings may become configurable in a future release.)
                  Use :copen to display the QuickFix buffer.

                  Since this is part of the VxLib library, python is not required and
                  also the patch that is needed for vimuiex need not be applied.
                  You only need to install vimuiex.zip from:
                  http://www.vim.org/scripts/script.php?script_id=2606

                  Marko

                  ------
                  Some code from vxlib#cmd
                  " /plugin
                  autocmd FileType qf call vxlib#cmd#PrepareQFixPreview()

                  " /autoload
                  function! vxlib#cmd#ShowQFixPreview()
                  let lnn = line('.')
                  let pos = getqflist()[lnn-1]
                  call vxlib#cmd#PreviewLine(pos['bufnr'], pos['lnum'])
                  endfunc

                  function! vxlib#cmd#PrepareQFixPreview()
                  nmap <silent> <Space> :call vxlib#cmd#ShowQFixPreview()<CR>
                  nnoremap <silent> <CR> :pclose<CR><CR>
                  endfunc
                • Steven Woody
                  ... It sounds good. I will try it. Thanks! -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer narke public key at
                  Message 8 of 9 , Jan 17, 2010
                  • 0 Attachment
                    2010/1/15 mmarko <marko.mahnic@...>:
                    > On Dec 28 2009, 10:56 am, Steven Woody <narkewo...@...> wrote:
                    >> Hi,
                    >>
                    >> In the quickfix window (opened by :cw), I hit a ENTER on an item and
                    >> the cursor jumps to the main window, this is fine in some cases. But
                    >> what do I do if I want the cursor stay on the quickfix window and just
                    >> like to see the contents of the other window changes?
                    >>
                    >
                    > Hi,
                    >
                    > You may be interested in a plugin that is a part of the vimuiex
                    > project.
                    > When the filetype of a buffer is set to 'qf' (QuickFix), two new
                    > mappings
                    > are added to the QuickFix buffer:
                    >   <space> - preview the current item in a preview window
                    >   <cr> - close the preview window and jump to current item
                    > (Mappings may become configurable in a future release.)
                    > Use :copen to display the QuickFix buffer.
                    >
                    > Since this is part of the VxLib library, python is not required and
                    > also the patch that is needed for vimuiex need not be applied.
                    > You only need to install vimuiex.zip from:
                    >  http://www.vim.org/scripts/script.php?script_id=2606
                    >
                    > Marko
                    >

                    It sounds good. I will try it. Thanks!
                    --
                    Life is the only flaw in an otherwise perfect nonexistence
                    -- Schopenhauer

                    narke
                    public key at http://subkeys.pgp.net:11371 (narkewoody@...)
                  Your message has been successfully submitted and would be delivered to recipients shortly.