I see how to search and replace in specific lines, specifying by line number, and how to search and replace using the current line as reference to a number of lines down.
How do I search and replace in the current line only? I'm looking for a simple solution that does not involve specifying line numbers as the linked solutions do.
Replace all occurrences of str1 with str2 in certain line:
str1
str2
:s/str1/str2/g
remove the g option if you want to replace only the first occurrence.
g
1.4m articles
1.4m replys
5 comments
57.0k users