歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> Linux資訊 >> Linux文化

VI裡面有沒有查找,替換的功能,怎麼實現


>>> 此貼的回復 >> 研究一下吧: http://edt1023.sayya.org/vim/node6.html

>>> 此貼的回復 >> 有呀,看manual...

>>> 此貼的回復 >> %s/this/that/g

>>> 此貼的回復 >> some examples: Searching: / search ? search backward # search current word n repeat search in same direction N Repeat search in opposite direction /[Return] repeat search forward ?[Return] repeat search backward

Replacing: cw replace a word c2w replace 2 words c2b replace 2 words backward c0 replace to the beginning of line c$ replace to the end of line cc replace entire line r replace 1 character ~ chaning case: upper -> lower, lower -> upper :%s/string1/string2/g Replace string1 with string2 in the whole document


Copyright © Linux教程網 All Rights Reserved