And it searches through all the *.bat files looking for foo, and leaves
me editing the file with the first match - with a message like (1-5).
How do I go on to the next match/file?
:cn
See also
:help quickfix
Is that new? The old version I'm using has a command which is simply :grep.
I map :grep to do a lid query over the ID database generated by the mkid
program from GNU id-utils:
:set grepprg=lid\ --substring\ --result=grep\ '\\<$*\\>'
:set grepformat=%f:%l:%m
This provides a very fast identifier search over large source trees,
such as the Linux kernel. That, combined with tags, is almost perfect.
> And it searches through all the *.bat files looking for foo, and leaves
> me editing the file with the first match - with a message like (1-5).
> How do I go on to the next match/file?
:cn "next
:cp "previous
:cc <n> "go to the n-th match
:cope "open the matches in a separate window that you can navigate
I suggest to everyone to install the following mappings:
:map ^N :cn^M
:map ^P :cp^M
Rationale: the existing ^N and ^P mappings (next line, previous line)
are next to completely useless, since most users navigate
up and down using other means like arrow keys or hjkl.
OK. So obvious (not!)
>See also
>:help quickfix
I did that - but clearly couldn't decipher what needed to be deciphered.
Yes. It uses internal Vim regular expressions engine which is beneficial
especially on Windows.
m.
ps. "New" is relative. It was introduced in 7.0 which was ca. 3 years
ago :)
--
LaTeX + Vim = http://vim-latex.sourceforge.net/
Vim Universal Templates: http://vim.sf.net/script.php?script_id=1078
CLEWN - http://clewn.sf.net