devnumbertwo - $h!t for developers

View Original

how to replace a string in vi

first occurrence on current line:

See this content in the original post

globally/all occurrences on current line – note the /g at the end, this makes it “global”

See this content in the original post

every occurrence in file:

See this content in the original post