New answers tagged

0 votes

Replace characters in relative linespan

I prefer using Visual Line mode for this. Enter Visual Line mode with V. This will highlight the current line. 5j to also select the next five lines. Enter command line mode with : and the command ...
user avatar
1 vote

Replace characters in relative linespan

I actually figured it out a few minutes later: define a range based on current location . and relative line number +{} or -{}, e.g. :.,+5s/foo/bar/g. I'll leave the question up anyway for the sake of ...
user avatar
  • 215

Top 50 recent answers are included