当前位置:网站首页>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
边栏推荐
- node js 保持长连接
- Remote sensing contribution experience sharing
- 滑环在直驱电机转子的应用领域
- ArrayList源码深度剖析,从最基本的扩容原理,到魔幻的迭代器和fast-fail机制,你想要的这都有!!!
- Codeforces Round #649 (Div. 2)——A. XXXXX
- Introduction à l'outil nmap et aux commandes communes
- Plot function drawing of MATLAB
- Codeforces Round #643 (Div. 2)——B. Young Explorers
- Why did MySQL query not go to the index? This article will give you a comprehensive analysis
- Apache多个组件漏洞公开(CVE-2022-32533/CVE-2022-33980/CVE-2021-37839)
猜你喜欢
Matlab r2021b installing libsvm
微信小程序uniapp页面无法跳转:“navigateTo:fail can not navigateTo a tabbar page“
How to make enterprise recruitment QR code?
ANSI / NEMA- MW- 1000-2020 磁铁线标准。. 最新原版
为什么更新了 DNS 记录不生效?
Android 创建的sqlite3数据存放位置
子矩阵的和
I don't know. The real interest rate of Huabai installment is so high
Usage of hydraulic rotary joint
系统测试的类型有哪些,我给你介绍
随机推荐
Remote Sensing投稿经验分享
【错误】加载h5权重出错AttributeError: ‘str‘ object has no attribute ‘decode‘
Usage of xcolor color in latex
The usage of rand function in MATLAB
qt--將程序打包--不要安裝qt-可以直接運行
如何制作企业招聘二维码?
Anaconda3 tutorial on installing and adding Tsinghua image files
regular expression
ArrayList源码深度剖析,从最基本的扩容原理,到魔幻的迭代器和fast-fail机制,你想要的这都有!!!
Wechat applet uniapp page cannot jump: "navigateto:fail can not navigateto a tabbar page“
[target tracking] |dimp: learning discriminative model prediction for tracking
Redux使用
保姆级教程:Azkaban执行jar包(带测试样例及结果)
burpsuite
【目标跟踪】|DiMP: Learning Discriminative Model Prediction for Tracking
Redission源码解析
Optimization of ecological | Lake Warehouse Integration: gbase 8A MPP + xeos
Capability contribution three solutions of gbase were selected into the "financial information innovation ecological laboratory - financial information innovation solutions (the first batch)"
Introduction à l'outil nmap et aux commandes communes
metasploit