find and replace on vim. for those who use vim, there is a feature on vim that you can use to do find and replace. This feature (find and replace) is a standard ability that every text editor should have, including vim.
for example, many files that are edited using default windows texteditor on windows machine will have “^M”. this annoying end-pf-line character, will give error when the script is run under linux. therefore, you need to edit the file and do find and replace on that file, and vim can do that for you.
to do find and replace, you need to be on the “command mode” (press esc) and to the syntax below:
tadaaa… you already done a find and replace.
to undo, just press u
picture from thegeekstuff.com