Saturday, August 28, 2010

Re: Run lgrep then immediately open Location list

On Aug 28, 3:50 pm, Britton Kerin <britton.ke...@gmail.com> wrote:

> This command might work for you:
>
>      :command! -nargs=+ MyLgrep execute 'silent lgrep! <args>' | lopen 42
>


That command looked so nifty that I thought adapting it to :helpgrep
might work well:

:command! -nargs=+ MyHelp execute 'silent lhelpgrep <args>' | lopen 6

And to my amazement, it did.
This is great because I hated having to open the location window
myself every time I used helpgrep, and I had no idea how to change the
default behavior.
Thank you!
Plowing through the help files is much more pleasant now. In fact, I
wish something like that were the default behavior for :helpgrep. It
just makes more sense, it seems to me, to let users choose from the
results first, instead of jumping to the first file.


--
You received this message from the "vim_use" 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

No comments: