Computer Science - Unix - Discussion

Discussion :: Unix - Section 2 (Q.No.2)

2. 

Which command will be used with vi editor to replace text from cursor to right?

[A]. r
[B]. R
[C]. s
[D]. S
[E]. None of the above

Answer: Option B

Explanation:

No answer description available for this question.

Siddhi said: (Jan 16, 2013)  
r: Replace single character under cursor (no <Esc> needed).
R: Replace characters, starting with current cursor position, until <Esc> hit.

Jayachitra said: (Nov 25, 2013)  
R: Replaces text from cursor to right(exiting text overwritten).

Shikha said: (Jun 27, 2015)  
Can anyone explain this command using example?

John said: (Dec 12, 2015)  
Nothing brother, when you are in command mode of vi editor, just move the cursor to the position from where you want to replace text and then enter "shift+r" (R).

Now onwards what ever you type will replace the existing text. To exit out of replacing text just press "esc" and it will take you back to the command mode.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.