Quantcast
Channel: What is the difference between s, c and r commands in vi/vim? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by chirlu for What is the difference between s, c and r commands in vi/vim?

$
0
0

Assume you have foo in the document, and the cursor is on the f.

Now, pressing rb will change this to boo, and you are back in command mode. Pressing sb will accomplish the same, but you are in insert mode and can insert more characters. Finally, c requires some kind of motion; e.g. you can type cw to remove the whole word and enter insert mode. On the other hand, cl is essentially the same as s.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>