一个对“web前端”和“互联网创业”有着浓厚兴趣的90后草根站长!
我们在用vim编辑器编辑一个文件的时候,经常要用到替换的功能
比如hello world
hello world
我们想将hello改为hello the
hello
hello the
常见的办法
:1,$s/hello/hello the/gc
还有没有别的办法呢,答案是有的
:1,$s/ctrl+r ctrl+w/hello the/gc
我们还可以
用*来搜索当前鼠标光标所在位置的单词
如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术
转载请注明:vim快速复制当前单词 出自老鄢博客 | 欢迎分享
表情