title: Search and replace a multiline pattern inside Vim
body: <p>I have a function like</p>
  
  <pre><code>myFunction (
    myStruct_1_Ptr *var1, /* commenty */
    myStruct_2_Ptr *var2, /* commenty */
    myStruct_3_Ptr *var3, /* commenty */
    int info1,
    int info2,
    int info3,
    int info4
  )
  </code></pre>
  
  <p>Than I moved all those infos inside a wrapping struct and I want to make it look like</p>
  
  <pre><code>myFunction (
    myStruct_1_Ptr *var1, /* commenty */
    myStruct_2_Ptr *var2, /* commenty */
    myStruct_3_Ptr *var3, /* commenty */
    myStruct_4_Ptr *var4  /* This is where all infos went in */
  )
  </code></pre>
  
  <p>The function is invoked by a similar syntax, by just removing the syntax in front.</p>
  
  <pre><code>myFunction (
    var1, /* commenty */
    var2, /* commenty */
    var3, /* commenty */
    var4  /* This is where all infos went in */
  );
  </code></pre>
  
  <p>How can I do it with search and replace (or anything else)? I have written here only the declaration part that lives only in two places&mdash;in the corresponding <code>.c</code> and <code>.h</code> files, but I want to do it similarly with all the places I invoke the function. The variables' names that are given to the function are all the same.</p>
  
  <p>An alternative way to S&amp;R could probably be to execute a macro on all instances of the function across multiple files, but I am unsure how to do that.</p>