Applying a VIM macro to a set of lines

  1. Start a macro typing q + macro name (in that case was q as well)
  2. Record the commands. I was using ds' which uses the surround plugin to delete the quotes.
  3. Finish the recording with q again.
  4. Select the lines with V
  5. Apply the macro to the select lines with :norm! @q

Reference: