Tuesday, December 24, 2013

Re: ag,vim and the quickfix window

On 24/12/13 08:54, Matteo Cavalleri wrote:
>> Yeah, there's that "needle-in-a-haystack" feeling. Happily, even for
>>
>> that, there is help. Read it when you have the time to concentrate on
>
> I've started to read it, but sometimes the problem is not searching, but knowing what you are looking for. I would have probably read everything about key maps, but an option to control fold opening... I think I could have never thought of that :)
>
When you're groping in the dark, and ":help {subject}" doesn't bring up
anything relevant, the :helpgrep command is a great thing to have — it
will search the whole text of the help files for any search pattern you
can think up (and IIRC, historically Vim got it in one version, and
:vimgrep only in the next one: that shows how much it was needed).

BTW, if you can afford to reserve three F keys, here are some mappings
which can help for the whole family of quickfix commands (including
:helpgrep, :vimgrep, :grep, :make, the :cscope searches for which
'cscopequickfix' is set…):

:map <F2> :cnext<CR>
:map <S-F2> :cprev<CR>
:map <F3> :cnfile<CR>
:map <S-F3> :cpfile<CR>
:map <F4> :cfirst<CR>
:map <S-F4> :clast<CR>

For :make you may want to set 'autowrite' or 'autowriteall' to get
auto-save of any corrections you make in the source.

Best regards,
Tony.
--
The person who marries for money usually earns every penny of it.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment