title: Reordering methods using vim
body: <p>I have 2 methods in a source file: </p>
  
  <pre><code>def Foo
    puts "hello"
    puts "bar" 
  end 
  
  def Bar
    puts "hello"
    puts "bar" 
  end
  </code></pre>
  
  <p>I would like to swap the order of the methods, so Bar is first.  </p>
  
  <p>Assuming the cursor is on the d in <code>def Foo</code>, the simple way is to:</p>
  
  <pre>
  shift v -> jjjj -> d -> jjj -> p -> O -> esc 
  </pre>
  
  <p>But that feels a little long winded and does not account well for arbitrarily long methods:</p>
  
  <p>What is the most efficient way to do this in Vim, keystroke wise? </p>
  
  <p><strong>EDIT</strong>
  Keep in mind, I would like the solution to account for a situation where the methods are in a context of a big class, so <kbd>G</kbd> is probably best avoided</p>