Privacy Policy
© 2025 linux101.dev

Vim: Search and Replace

Efficiently find and replace text within your file using these powerful commands.

CommandDescription
/patternSearch forward for pattern.
?patternSearch backward for pattern.
nRepeat the last search in the same direction.
NRepeat the last search in the opposite direction.
:%s/old/new/gReplace all occurrences of old with new in the file.