I'm not sure if it will work in viemu, but in VIM you can do the following...
Using Yank and Paste
Yank the text to a specific register. Select the text in visual mode and use the command "ay
to yank the text to the register a
. Then when pasting call the command "ap
, which pastes the contents of the a
register.
Using Normal Command
But I would strongly prefer to use the normal command. Just select the lines
SOMETHING_XXXXXXXXXXXXXX_ELSE
SOMETHING_XXXXXXXXXXXXXX_ELSE2
SOMETHING_XXXXXXXXXXXXXX_ELSE3
SOMETHING_XXXXXXXXXXXXXX_ELSE4
using line visual mode (<C-v>
) and then issue this command: :'<,'>normal fXct_HELLOWORLD
. Then you'll have
SOMETHING_HELLOWORLD_ELSE
SOMETHING_HELLOWORLD_ELSE2
SOMETHING_HELLOWORLD_ELSE3
SOMETHING_HELLOWORLD_ELSE4
This means that it will run the command fXct_HELLOWORLD
for each line. Let me explain the command:
- fX - moves the cursor until the first X;
- ct_ - deletes everything untill _ and puts you in insert mode;
- HELLOWORLD - the word which will substitute XXXXXXXXXXXXXX;