您可以在 vi/vim 中的逗号(或任何任意字符)之间替换或删除吗? [英] Can you substitute or delete between commas (or any arbitrary character) in vi/vim?
本文介绍了您可以在 vi/vim 中的逗号(或任何任意字符)之间替换或删除吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,我有这样的文字:
For example, I have text like this:
I talked to a friend, I hiked a mountain, I am working with blah blah,
我想删除或替换我爬过一座山
.为什么 ci,
或 di,
不起作用?有没有办法在逗号之间抓取、替换或删除?
And I want to delete or substitute I hiked a mountain
. Why doesn't ci,
or di,
work? Is there a way to grab, substitute, or delete between commas?
推荐答案
有一些插件可以让您创建自定义文本对象.不安装插件,假设你的光标在两个逗号之间,你可以这样做:
there are plugins to let you create customized text object. without installing plugins, assume your cursor is between two commas, you could do:
T,c,
或
t,c,
模拟你的ci,
for di,
把上面的c
改成d
to simulate your ci,
for di,
change the above c
into d
相关帮助文档:
:h t
:h T
:h ,
这篇关于您可以在 vi/vim 中的逗号(或任何任意字符)之间替换或删除吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文