I wish to replace part of my words, as selected by visual mode. E.g.:
I've got a simple text file:
------------------
hello there hehe
She's not here
------------------
I need to change all "he" into "her".
What I wish to do is not to type %s
command, but under visual mode:
v
to select "he"- Press some hot key, and vim prompts me to input the new text
- I type the new text, press Enter, done.
I guess we can do it with vmap? But how to achieve it? Thanks!
To get the solution all credits go to User @xolox from his answer which I developed to get the required task:
You can change the mapping
;
to any hot key you want.