A question about VIM

Les Mikesell lesmikesell at gmail.com
Sat Dec 9 02:43:08 UTC 2006


On Fri, 2006-12-08 at 19:34, chengmj at gionee.com 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 at gmail.com





More information about the fedora-list mailing list