Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 96: Line 96:
 
Using vimgrep to search hundreds of files can be slow. A search taking only a few seconds using an external grep program might take nearly a minute with vimgrep. One reason for this is that vimgrep uses Vim's procedures to read files, which can involve execution of several autocommands.
 
Using vimgrep to search hundreds of files can be slow. A search taking only a few seconds using an external grep program might take nearly a minute with vimgrep. One reason for this is that vimgrep uses Vim's procedures to read files, which can involve execution of several autocommands.
   
βˆ’
You can make use of the <code>:noautocmd</code> command modifier to significantly increase search speed by temporarily disabling all autocmds during the execution of the <code>:vimgrep</code>. It may also solve other issues you may have, such as unwanted interaction with plugins that trigger off BufRead events. Use it as follows:
+
You can make use of the <code>:noautocmd</code> command modifier to drastically increase search speed by temporarily disabling all autocmds during the execution of the <code>:vimgrep</code>. It may also solve other issues you may have, such as unwanted interaction with plugins that trigger off BufRead events. Use it as follows:
   
 
<pre>
 
<pre>
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)