How about the U operation to get the original word and redo U to get back
to the current. This will mapp F3, modify according to your needs (add \<
and \> etc)
nn <F3> UyiwU:%s/<c-r>"/<c-r><c-w>/g
OR to save the :s for subsequent use,
nn <F3> UyiwU:.s/<c-r>"/<c-r><c-w>/e<cr>
regards,
-Arun
On Sun, 22 Apr 2007, Yakov Lerner wrote:
Is it possible to do the following, or maybe some plugin already exist.
If not, how would I script it. Let's say I have some long identifier
EXPECTED_GCONFIG scattered around the file. I put cursor
after _ and change it to EXPECTED_CONTENTS somehow, maybe char-by-char,
not necessarily in one optimal op.
Now I'd like to auto-convert the last word change into s/// command,
automatically, so I can use & to change remaining occurencies.
How could I script such thing ?
Thanks
Yakov