簡單的更換

:s/foo/bar 更換第一例項 FOO 與bar在當前行。

:s/foo/bar/g 更換的每個例項 FOO 與bar在當前行。

:%s/foo/bar/g 在整個檔案中用條形替換 foo 。 **