title: VIM: how to replace a word
body: <p>I guess, the problem is pretty common. Let's say, we have a source file and wish to replace some string with another string.</p>
  
  <p>Usually, I use the following command:</p>
  
  <pre><code>:%s/test/testValue/gc
  </code></pre>
  
  <p>But, what if the string is pretty long and we need just to touch it up? It is boring to type something like that:</p>
  
  <pre><code>%s/someLongAndDirtyString/somelongAndDirtystring/gc
  </code></pre>
  
  <p>Is it possible to place a cursor on <code>someLongAndDirtyString</code> word, press some magic key and get the following in the last line?</p>
  
  <pre><code>%s/someLongAndDirtyString/someLongAndDirtyString/gc
  </code></pre>
  
  <p>Then we may change the new string a bit and proceed with replacing.</p>
  
  <p>Sure, it is just an idea. Please, provide me with the best way of doing such replacements.</p>
  
  <p>Thanks</p>