title: camelCase to underscore in vi(m)
body: <p>If for some reason I want to selectively convert camelCase named things to being underscore separated in vim, how could I go about doing so?</p>
  
  <p>Currently I've found that I can do a search <code>/s[a-z][A-Z]</code> and record a macro to add an underscore and convert to lower case, but I'm curious as to if I can do it with something like :</p>
  
  <p><code>%s/([a-z])([A-Z])/\1\u\2/gc</code></p>
  
  <p>Thanks in advance!</p>
  
  <p><strong>EDIT:</strong> I figured out the answer for camelCase (which is what I really needed), but can someone else answer how to change CamelCase to camel_case?</p>