Find and replace whole words in vim March 20, 2023 by Tarik You can use \< to match the beginning of a word and \> to match the end: %s/\<word\>/newword/g