当前位置:网站首页>Vim 字符串替换
Vim 字符串替换
2022-07-08 00:34:00 【彭世瑜】
语法:
:<range> s/<search_string>/<replace_string>/<modifier>
参数说明
- range - 定义执行“查找和替换”函数的范围,有两个不同的值:
- % - 对整个文件执行
- <start _line> <end_line> - 在一组特定的行上面执行操作
- search_string - 需要替换的字符串
- replace_string - 替换旧字符串的新字符串
- modifier - 确定替换行为,有几个不同的值:
- g - 全局替换
- gc - 在每次更换之前要求确认
- gn - 忽略替换功能并突出显示查找结果。
示例
# 全局替换a为b
:%s/a/b/g
边栏推荐
- Apache multiple component vulnerability disclosure (cve-2022-32533/cve-2022-33980/cve-2021-37839)
- Mysql database (2)
- ArrayList源码深度剖析,从最基本的扩容原理,到魔幻的迭代器和fast-fail机制,你想要的这都有!!!
- NPDP在国内有认可度吗?看一看就明白了!
- Anaconda3 tutorial on installing and adding Tsinghua image files
- Chapter 7 behavior level modeling
- Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
- 系统测试的类型有哪些,我给你介绍
- 什么样的MES系统才是好系统
- powerbuilder 中使用线程的方法
猜你喜欢
Voice of users | winter goes and spring comes, waiting for flowers to bloom -- on gbase 8A learning comprehension
【目标跟踪】|atom
[target tracking] |atom
日志特征选择汇总(基于天池比赛)
滑环使用如何固定
How to make enterprise recruitment QR code?
Partage d'expériences de contribution à distance
Usage of hydraulic rotary joint
云原生应用开发之 gRPC 入门
Remote sensing contribution experience sharing
随机推荐
About snake equation (5)
Introduction to grpc for cloud native application development
adb工具介绍
What kind of MES system is a good system
Qml 字体使用pixelSize来自适应界面
第七章 行为级建模
Introduction à l'outil nmap et aux commandes communes
mysql/mariadb怎样生成core文件
ArrayList源码深度剖析,从最基本的扩容原理,到魔幻的迭代器和fast-fail机制,你想要的这都有!!!
Introduction to ADB tools
nacos-微服务网关Gateway组件 +Swagger2接口生成
如果时间是条河
qt--將程序打包--不要安裝qt-可以直接運行
能力贡献 GBASE三大解决方案入选“金融信创生态实验室-金融信创解决方案(第一批)”
QML fonts use pixelsize to adapt to the interface
发现值守设备被攻击后分析思路
How mysql/mariadb generates core files
Nmap tool introduction and common commands
Version 2.0 de tapdata, Open Source Live Data Platform est maintenant disponible
微软 AD 超基础入门