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

Expand Messages
  • stone
    Hi, vim use! Now I have two trouble when I using vim: I have used vimGrep or Cscope to find some files which I want. Then the file name will be showed in
    Message 1 of 3 , Dec 2, 2009
      Hi, vim use!

      Now I have two trouble when I using vim:

      I have used vimGrep or Cscope to find some files which I want.
      Then the file name will be showed in QuickFix window.
      I want to open all the file in QuickFix window.
      Is there a good and fast way?

      Thank you.

      --

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Tony Mechelynck
      ... I think you don t understand what quickfix window means. The quickfix window is a window where you see one line per match, with the file, line number,
      Message 2 of 3 , Dec 2, 2009
        On 03/12/09 06:40, stone wrote:
        > Hi, vim use!
        >
        > Now I have two trouble when I using vim:
        >
        > I have used vimGrep or Cscope to find some files which I want.
        > Then the file name will be showed in QuickFix window.
        > I want to open all the file in QuickFix window.
        > Is there a good and fast way?
        >
        > Thank you.

        I think you don't understand what "quickfix window" means. The quickfix
        window is a window where you see one line per match, with the file, line
        number, and about one line of text.

        Or you can display the file in a normal window, which is not a quickfix
        window. You can show either this "normal" window, or the quickfix
        window, or both.

        :copen opens the quickfix window
        :cclose closes it
        :cwindow toggles it.

        Most quickfix commands have two forms, one of them will jump to the
        first match (in a normal window):

        :make
        :grep
        :helpgrep
        :vimgrep (without j flag)
        :cscope find (depending on 'csquickfix')

        take you to the first match

        :make!
        :grep!
        :vimgrep (with j flag)

        don't.

        The following commands:

        :cnext
        :cprev
        :cnfile
        :cpfile
        :cfirst
        :clast

        let you navigate from match to match, even if the quickfix window isn't
        open.

        If I misunderstod you, please try to formulate your question more clearly.


        Best regards,
        Tony.
        --
        "They're unfriendly, which is fortunate, really. They'd be difficult
        to like."
        -- Avon

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Ben Fritz
        On Dec 3, 12:21 am, Tony Mechelynck ... I think the OP wants to open each file name from the result list in a new
        Message 3 of 3 , Dec 3, 2009
          On Dec 3, 12:21 am, Tony Mechelynck <antoine.mechely...@...>
          wrote:
          >
          > If I misunderstod you, please try to formulate your question more clearly.
          >

          I think the OP wants to open each file name from the result list in a
          new buffer/window/tab.

          I would just enter a command to go to the next hit:

          :cnext<Enter>

          Then re-run the command as many times as needed:

          99999@:

          This will automatically terminate when an error (such as "E553: No
          more items") is encountered. After this, you will have loaded each
          buffer.

          You could tweak it using the switchbuf option to open a new window or
          tab for each result, except when there is already a window/tab open,
          with :set switchbuf=split,useopen or newtab,usetab.

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