In this article, we will see Find and replace in Vi or vim editor with examples. IN Vim or vi, we can easily find and replace text using :s(:substitute) command. We can run this command only in normal mode. To go back to normal mode just press on ESC key from your keyboard. Find and replace operation is case-sensitive which means “R2schools” and “r2schools” are not same.
Syntax to Find and Replace in Vi or Vim editor:
:[range]s/{pattern}/{string}/[flags] [count]