开发者

VIM equivalent for (something like) 6xi?

There's a command in VIM where you can say how many chars to replace, and VIM will put a "$" at that many characters out, and you can type in the replacement for those characters. The o开发者_开发知识库riginal and new text can be different lengths. What's the command for this?


The nearest I can think of is '6s'; that deletes the next 6 characters and leaves you in insert mode, but it doesn't show a '$' at the end - it just removes the material.


It is the behavior of c command when 'cpoptions' contains $ (so it is a default behavior for vi and some configurations of Vim).


The command is s. In your example, it would be 6s.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜