I want to insert text like this:
similar text wordA similar text ... similar text wordB similar text ... similar text wordC similar text ...
I know I can paste the text many times then use the substitution to change single word for each line, however I still find this method very inconvenient.
Is there a way to save a word or a word list into a "variable" then use this variable to generate similar text ?
EDIT I made something unclear in the original question, in fact I'm trying to make some very alike function definitions, so
wordB... may appear many times in each clone of text and the text may contain many lines. the pattern is exactly like this:
similar_text1 wordA similar_text2 wordA similar_text3 ... similar_text1 wordB similar_text2 wordB similar_text3 ... similar_text1 wordC similar_text2 wordC similar_text3 ...
(text may contain new lines, and wordA,wordB... may exist many times)
2nd EDIT The "similar_text" parts maybe different each time I do such job, so the solution for this job is better to be reusable. Because I'm trying to make very alike function definitions, or a string to function mapping table.
After reading answers and some practice, I find that it is more convenient to think this job as some kind of substitution, because separate "part1","part2"..."partN" which may contain newlines is hard to write, so write a template first:
similar_text1 $WORD similar_text2 $WORD similar_text3 ... (text may contain <ENTER>, make sure $WORD not exist in "similar_text" parts )
Then trying to put clones of the text but replacing $WORD with a list of words is more straight thinking.
So it seems my problem changed to be "how to clone a text block many times, but each time by substituting a keyword in it with a word from a list?"