搜尋字串並取代
:%s/search_from/replace_to/g
加一個 "c" ,可在取代前,逐一確認是否取代 replace:
:%s/search_from/replace_to/gc replace with qqqqqq (y/n/a/q/l/^E/^Y)?
搜尋略過大小寫的差異:
:%s/search_from/replace_to/gi
取代指定行數範圍的字串,例如要取代 10 ~ 50 行的字串:
:10,50s/search_from/replace_to/g