search for text in vim code example
Example 1: search and replace vim
:%s/foo/bar/g
Example 2: vim search for word
# Basic syntax:
/word # To search for the word "word"
# If a match is found, use n and N to navigate to next or previous matches
# Note, special characters like "/" need to be escaped with \. E.g., to
# search for path/to/directory you'd write:
/path\/to\/directory