vim替换字符串 粘贴复制
时间: 2023-10-12 10:04:15 浏览: 130
在vim中,要替换字符串,你可以使用以下命令:
- 要在整个文件中替换指定的字符串,可以使用命令:%s/目标字符串/替换字符串/g。例如,要将文件中所有的"yearning"替换为"sentry",可以使用命令::%s/yearning/sentry/g。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [vim替换字符串命令详解](https://blog.csdn.net/yuezhilangniao/article/details/111405326)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [linux vim替换指定字符串](https://blog.csdn.net/AlexanderRon/article/details/122047772)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文