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.

This entry was posted in linux. Bookmark the permalink.

3 Responses to VI command – r & s

  1. Pingback: comprar cialis

  2. Pingback: compra cialis

  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

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">