VI command - r & s

r

One other replacement edit is given by the r command. r replaces a single character with another single character. You do not have to press ESC to return to command mode after making the edit.

s

The S command, as is usually the case with uppercase commands, lets you change whole lines. In contrast to the C command, which changes the rest of the line from the current cursor position, the S command deletes the entire line, no matter where the cursor is. vi puts you in insert mode at the beginning of the line. A preceding count replaces that many lines.

Both s and S put you in insert mode; when you are finished entering new text, press ESC.

3 Responses to “VI command - r & s”

  1. compra cialis…

    [..] trackback comment [..]…

  2. compra cialis…

    [..] trackback comment [..]…

  3. earn money says:

    I’ve seen progression in every post. Your newer posts are simply wonderful compared to your posts in the past. Keep up the good work!

Leave a Reply