搜尋此網誌

網頁

2013年9月12日 星期四

Vim 取代所有字串



當需要替換大量字串時,可以於套用以下命令:

str1 : 需要被替換掉的字串

str2: 欲替換的新字串

:g/str1/s//str2/g

沒有留言:

張貼留言