Ben Schmidt wrote:
On 16/03/11 1:13 AM, Anthony Campbell wrote:
I have a directory with over 400 files, some of which contain a
particular string I want to modify manually. Is there any way to tell
vim to edit just the files which contain the specified string?
Check out the :vimgrep command. Use it alongside :cn :copen and friends.
It will not only let you open all the files with that string, but jump
to each match. E.g:
:vimgrep /pattern/ *
:cn
:cn
:cn
Don't forget to use :help to find out more!
One may use netrw for this, too:
:Explore *//pattern
and then use <shift-down> and <shift-up> (:Nexplore, :Pexplore).
Regards,
Chip Campbell
--
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