当前位置:网站首页>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
边栏推荐
- 《ClickHouse原理解析与应用实践》读书笔记(7)
- 日志特征选择汇总(基于天池比赛)
- ArrayList源码深度剖析,从最基本的扩容原理,到魔幻的迭代器和fast-fail机制,你想要的这都有!!!
- 如何让导电滑环信号更好
- NPDP在国内有认可度吗?看一看就明白了!
- Summary of log feature selection (based on Tianchi competition)
- Sword finger offer II 041 Average value of sliding window
- MySQL查询为什么没走索引?这篇文章带你全面解析
- ROS problems (topic types do not match, topic datatype/md5sum not match, MSG XXX have changed. rerun cmake)
- nmap工具介绍及常用命令
猜你喜欢

Nacos microservice gateway component +swagger2 interface generation

神经网络与深度学习-5- 感知机-PyTorch

break net

能力贡献 GBASE三大解决方案入选“金融信创生态实验室-金融信创解决方案(第一批)”

C语言-Cmake-CMakeLists.txt教程

Introduction à l'outil nmap et aux commandes communes

用户之声 | 对于GBase 8a数据库学习的感悟

About snake equation (1)

Sum of submatrix

Nmap tool introduction and common commands
随机推荐
Android 创建的sqlite3数据存放位置
Version 2.0 of tapdata, the open source live data platform, has been released
《ClickHouse原理解析与应用实践》读书笔记(7)
PHP 计算个人所得税
Application of slip ring in direct drive motor rotor
Uniapp one click Copy function effect demo (finishing)
快速熟知XML解析
Reading notes of Clickhouse principle analysis and Application Practice (7)
Introduction to grpc for cloud native application development
mysql/mariadb怎样生成core文件
nmap工具介绍及常用命令
The numerical value of the number of figures thought of by the real-time update of the ranking list
Anaconda3 tutorial on installing and adding Tsinghua image files
Tencent game client development interview (unity + cocos) double bombing social recruitment 6 rounds of interviews
ClickHouse原理解析与应用实践》读书笔记(8)
Anaconda3 download address Tsinghua University open source software mirror station
Codeforces Round #633 (Div. 2) B. Sorted Adjacent Differences
About snake equation (2)
How to realize batch control? MES system gives you the answer
给刚入门或者准备转行网络工程师的朋友一些建议