Skip to content

Instantly share code, notes, and snippets.

@ayuLiao
Created April 24, 2019 07:11
Show Gist options
  • Save ayuLiao/b5dbfaf648c149b5fe6bc644c725b14f to your computer and use it in GitHub Desktop.
Save ayuLiao/b5dbfaf648c149b5fe6bc644c725b14f to your computer and use it in GitHub Desktop.
语法为
:[addr]s/源字符串/目的字符串/[option]
全局替换命令为:
:%s/源字符串/目的字符串/g
比如要将文件中的 SCORE 替换为 NEW
:%s/SCORE/NEW/g
这样就将文件全局中的SCORE替换为NEW了
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment