天道酬勤,学无止境

vim替换命令

Vim replacement command in Linux

Replace the first c in the line where the cursor is with a:s/c/aReplace all c in the line where the cursor is with a:s/c/a/gAsk one by one whether to replace the first c in the line where the cursor is with a:s/c/a/cAsk one by one whether to replace all c in the line where the cursor is with a:s/c/a/cgReplace the first c in each line with a:%s/c/aReplace all c in each line with a:%s/c/a/gAsk one by one whether to replace the first c in each line with a:%s/c/a/cAsk one by one whether to replace all c in each line with a:%s/c/a/cgWithout %: replace the line where the cursor is located, with %

2021-04-19 16:26:11    分类:博客    vim替换命令   linux