Hello,

I only fairly recently found out about :copen :lopen etc.  Some snippets using
them are popular on vim_use:

    
http://groups.google.com/group/vim_use/browse_thread/thread/211ed834076e7526/9f756b498db39636?lnk=gst&q=Run+lgrep+then+immediately+#9f756b498db39636

At minimum, I think these commands deserve a pointer from the grep section
of quickfix.txt.  It can take years to find them otherwise.  I've attached
a patch which does this and also includes a command example.  I think
its worth including, because for me (and apparently some others at least)
the default :grep (and :lgrep and :helpgrep) behavior is somewhere between
painful and unusable.  In the past I've usually just ended up using the shell.

Also, :grep! is usually more useful than :grep.  Jumping to the first error
usually makes sense when compiling but usually doesn't when grep'ing.  One does
in theory get led to a description of the !-form functionality when reading
the :grep documentation, so I'm not sure the docs can be regarded as needing
fixing.  But :grep! does make things behave better and odds are many people
don't find out about it.  The attached patch helps with this issue as well.

There are two other problems I have with the way grep works in vim (and most
other editors for that matter):

 * Its not easy to filter the grep results.  When a user needs to grep it
   usually means:

      a. the project is biggish

      b. they have little idea where the occurences they are interested
         in are located, and

      c. there are likely multiple file types involved.

   This means that much of the output of the grep is going to be
   uninteresting.  One can go back and change the file list, but its usually
   a hassle to get the list just right.  This is enough of a trouble for
   me that I often end up going to the terminal and tacking on a bunch of
   '| grep -v "junk_pattern"' things until I get what I want.

 * Support for context is poor.  A single line is often not enough,
   but putting '-C 1'  in 'grepprg' makes :cn ~200% slower.

I have a module that fixes these issues for me though its pretty messy
and fragile as it depends on slicing up, saving, :cgetfile'ing, reparsing,
and re-presenting the error file.

I just mention them because they are issues I'd love to see vim address
properly someday.

Britton

-- 
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

Attachment: quickfix_doc_patch
Description: Binary data

Raspunde prin e-mail lui