I need to substitute a list of words with the same long list of words.
So, for example, you have: "A", "b", "c", "g", "d", "e"
And you want to replace each word with the uppercase of each word: "A", "B", "C", "D", "E", "F",
I know how to find each line using a regular expression: (A \ | b \ | c \ | d \ | e \ | e)
I know that you can make a global replacement for each word. But when the word length becomes large, this approach will become inexhaustible and inelegant.
Is there a way to somehow make one global replacement? Similar to:
:%s/\(a\|b\|c\|d\|e\|f\)/INSERT_REPLACEMENT_LIST/
I am not sure if this is possible.
vim regex replace substitution
Trevor boyd smith
source share