我知道你可以使用cw
改变这个词,ciw
改变内部词,但是我想要做的是改变这个词后面的词。在vim中引用后改单词?
例如,我有这个
this.option('test');
现在我的光标是在第一个引号('),我想改变单词测试。如果我按cw
它也会删除我的光标所在的第一个引号。另一方面,我正在寻找一个模仿a
模式(在光标之后插入的模式)的命令,所以在我的情况下删除光标后的单词并将其放入插入模式?
我知道你可以使用cw
改变这个词,ciw
改变内部词,但是我想要做的是改变这个词后面的词。在vim中引用后改单词?
例如,我有这个
this.option('test');
现在我的光标是在第一个引号('),我想改变单词测试。如果我按cw
它也会删除我的光标所在的第一个引号。另一方面,我正在寻找一个模仿a
模式(在光标之后插入的模式)的命令,所以在我的情况下删除光标后的单词并将其放入插入模式?
cw
不是“更改单词”,它是“更改为下一个单词”。
将光标放在任一单引号上,可以使用ci'
“在单引号之间切换”。
随着光标的第一单引号,你也可以这样做:
wciw move to next word then change inner word
wcw move to next word then change to next word
wct' move to next word then change until next single quote
wce move to next word then change to end of the word
lciw move to next character then change inner word
lcw move to next character then change to next word
lct' move to next character then change until next single quote
lce move to next word then change to end of the word
<Right>ciw move to next character then change inner word
<Right>cw move to next character then change to next word
<Right>ct' move to next character then change until next single quote
<Right>ce move to next word then change to end of the word
见:help navigation
。
如果光标在(“)比你可以使用
ci'
这将删除文本,并设置你插入模式作出改变。
所以它是'内部的变化。
感谢您的纠正和'ci''命令。这正是我期待的! – supersan