In addition to useful special characters in search pattern matching, vim can also do some excellent stuff in the second phrase of its substitution statements, as documented in sub-replace-special: <a href="http://vimdoc.sourceforge.net/htmldoc/change.html#sub-replace-special" rel="nofollow">http://vimdoc.sourceforge.net/htmldoc/change.html#sub-replac...</a><p>I find \U, \L and \E to be most useful, for example:<p><pre><code> :%s/ALL_CAPS_\(.*\)_HUZZAH/SOME_LOWERCASE_\L\1\E_HUZZAH/g
</code></pre>
Will translate "ALL_CAPS_IS_GREAT_HUZZAH" to "SOME_LOWERCASE_is_great_HUZZAH". Super handy in certain situations.<p>It's also worth noting that these "magic" settings affect :s, :g, / and ?.