我无法找到一个解决方案(在这里和网上),只需选择/插入/删除由圆点包围的东西(开发中的常见情况):
someobject.some-property-with-hyphens.otherproperty
Run Code Online (Sandbox Code Playgroud)
如何选择中间物业?
我试过了 :
vi. (dot is for executing last command)
viw (don't include hyphens)
4viw (still nop)
vis (select full line)
Run Code Online (Sandbox Code Playgroud)
app.object['key'].$object_with_a_dollar_sign.function()
Run Code Online (Sandbox Code Playgroud) 假设我在我的代码中调用一个对象的方法就像
if abc.xyz then foo
Run Code Online (Sandbox Code Playgroud)
我的光标位于'abc'中的'c',我想将abc.xyz更改为其他内容.如果我键入,ciw我将只替换'abc'.我可以使用什么而不是iw选择整个'abc.xyz'?
vim ×2