Answers for "replacing a word in vim line by line"

1

vim replace text at end of line

# Basic syntax:
:%s/.*\zs<search_pattern>/<replacement>/
Posted by: Guest on July-22-2021
0

replace word in vim

# to search for the first occurrence of the string ‘foo’ in the current line and replace it with ‘bar’
:s/foo/bar/

# replace 'foo' with 'bar' in the entire file
:%s/foo/bar/g
Posted by: Guest on March-09-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language