vi工具的常用命令
Vi: Search and Replace
Change to normal mode with <ESC>.
Search (Wraped around at end of file):
Search STRING forward : / STRING. Search STRING backward: ? STRING. Repeat search: n Repeat search in opposite direction: N (SHIFT-n)
Replace
: Same as with sed
,
Replace OLD with NEW:
First occurrence on current line: :s/OLD/NEW Globally (all) on current line: :s/OLD/NEW/g Between two lines #,#: :#,#s/OLD/NEW/g Every occurrence in file: :%s/OLD/NEW/g
本文详细介绍vi编辑器中搜索和替换操作的使用方法。包括如何进行正向和反向搜索,重复搜索,以及如何在单行或多行内替换文本等实用技巧。
3041

被折叠的 条评论
为什么被折叠?



