QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1142|回复: 3

How to find and replace in VI?

[复制链接]
发表于 2003-10-22 21:00:33 | 显示全部楼层 |阅读模式
As we all know, using command "/pattern" or "?pattern" in vi/vim will locate the pattern string.
But, how to replace the pattern with another string ??
发表于 2003-10-22 22:14:09 | 显示全部楼层
http://vcd.cosoft.org.cn/
或许你能在这里找到答案
回复

使用道具 举报

发表于 2003-10-23 00:32:39 | 显示全部楼层
%s/pattern/replacestring/g for whole file
回复

使用道具 举报

 楼主| 发表于 2003-10-23 00:36:14 | 显示全部楼层
What does the "g" mean here?Global?
Thanks for you reply, and i will try.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-20 14:59 , Processed in 0.035780 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表