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
vim replace word
To quickly change a word you can use cw,caw or ciw. Use c$ or just C to quickly change from the cursor to the end of a line, cc to change an entire line, or cis for a sentence
Source: vim.fandom.com