You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here's a line of text.
then another.
and finally a third line.
let's say I go to visual mode and select some text (selection indicated by upper case letters)
here's a line OF TEXT.
THEN ANOther.
and finally a third line.
while the text is visually selected, when I hit : I go to command mode with a line range
:'<,'>
and let's say I end up doing
:'<,'>s/t/ZZ/g
that would leave the file like this
here's a line of ZZexZZ.
ZZhen anoZZher.
and finally a third line.
THE PROBLEM IS: I didn't select the whole first two lines, I only selected of text.\nthen ano
I don't want every single tin the lines that include my visual selection to be replaced, I only want the ts that are within the selection itself to be replaced. That last ZZ shouldn't have happened becase that t was outside my selection.
Is there anyway to do this?
Can we add a syntax (I propose :`<,`>) for when we want comands to operate only the selection itself, not all the lines that contain it.
The text was updated successfully, but these errors were encountered:
Feature already in Vim?
no
Feature description
let's say I have a text file
let's say I go to visual mode and select some text (selection indicated by upper case letters)
while the text is visually selected, when I hit
:
I go to command mode with a line rangeand let's say I end up doing
that would leave the file like this
THE PROBLEM IS: I didn't select the whole first two lines, I only selected
of text.\nthen ano
I don't want every single
t
in the lines that include my visual selection to be replaced, I only want thet
s that are within the selection itself to be replaced. That lastZZ
shouldn't have happened becase thatt
was outside my selection.Is there anyway to do this?
Can we add a syntax (I propose
:`<,`>
) for when we want comands to operate only the selection itself, not all the lines that contain it.The text was updated successfully, but these errors were encountered: