开发者

VIM equivalent for (something like) 6xi?

开发者 https://www.devze.com 2022-12-23 09:07 出处:网络
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开发者_开发知

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

精彩评论

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

关注公众号