One features I like with Visual Studio is the ability to search in open files only. For example, if I recently did changes to some files and I would like to trace those changes, I might search for a certain word, but only in those files to avoid getting a large list of necessary matches.
Is this possible with Vim?! What I am interested in is being able to open the files I have changed so for using:
gvim `git diff --name-only`
then search those files for what I want.
A nice way to do that is to use vim's internal grep command (
:vim
):This will open a small window (called
quickfix
) with the search results and links to open the corresponding files (they don't have to be open).