<p><code>:vimgrep</code> looks like a really useful thing.</p>

<p>Here's how to use it:</p>

<pre><code>:vim[grep][!] /{pattern}/[g][j] {file} ... 
</code></pre>

<p><code>:help</code> says that you can essentially glob <code>{file}</code> to name, say, <code>*.c</code> for the current directory. I may have started Vim with a list of files that is complicated enough that I don't want to manually type it in for <code>{file}</code>, and besides Vim already knows what those files are.</p>

<p>What I would like to do is vimgrep over any of:</p>

<ul>
<li><code>:args</code></li>
<li><code>:files</code></li>
<li><code>:buffers</code></li>
</ul>

<p>What variable(s) would I use in place of <code>{file}</code> to name, respectively, any of those lists in a <code>vimgrep</code> command?</p>

You can do this:
```
```
:bufdo vimgrep /pattern/ %
```
```
% substitutes the buffer name.