I guess, the problem is pretty common. Let's say, we have a source file and wish to replace some string with another string.

Usually, I use the following command:

:%s/test/testValue/gc

But, what if the string is pretty long and we need just to touch it up? It is boring to type something like that:

%s/someLongAndDirtyString/somelongAndDirtystring/gc

Is it possible to place a cursor on someLongAndDirtyString word, press some magic key and get the following in the last line?

%s/someLongAndDirtyString/someLongAndDirtyString/gc

Then we may change the new string a bit and proceed with replacing.

Sure, it is just an idea. Please, provide me with the best way of doing such replacements.

Thanks

Edit
Report