The help says that virtual replace mode commands in Vim gr
& GR
replace characters in screen estate and not in file.
:help Virtual-Replace-mode
I am understanding this as something like changing the characters on the display but not in the buffer itself. Is that right? It seems incorrect.
I can use an explanation and probably a scenario or an example where this feature is relevant.
Best Answer
In Virtual-Replace-Mode the Buffer is harder fixed to its origin position.
When entering normal replace mode and hitting
Internet<CR>And others
the new buffer will be like this:When doing the same in Virtual-Replace the result will be
Another example (tabstop=2;sts=0):
Pressed keys:
<Tab><Tab>
Replace-Mode result:
Virtual-Replace-Mode result:
Because in Replace mode the replacement is done char by char, where
Tab
is one char, no matter how many chars are displayed. In Virtual-Replace-Mode visible length of theTab
(:h 'ts'
,:h 'sts'
) is used to replace the chars.