On Fri, 2006-12-08 at 19:34, chengmj@xxxxxxxxxx wrote: > In Linux, the condition is similar. The difference is that I use vim > command ":! grep "STATUS" *.h" and the searching results are displayed > in shell. > how can I display the searching results automatically > in vim instead of the shell? If you want to read the output of a shell command into the edit buffer it would be :r !command after starting vim. If you want to iterate through the files, you need to expand the list on the command line as you start vim - perhaps like vim `grep -l STATUS *.h` Then you can cycle through the files with :n -- Les Mikesell lesmikesell@xxxxxxxxx