title: Yanking all marked lines in vim
body: <p>Often times when reviewing log files in vim, I'll highlight interesting lines using marks. At some point, I'd like to be able to copy all of the interesting lines (either all marked lines, or a list of marks) to either a register or another file (it doesn't really matter which; the goal is to facilitate writing a summary). I haven't been able to find any built in way to do this; is it possible in vim?</p>
  
  <p>I suppose it's probably a fairly straightforward function; probably looking something like this, but my vimscript abilities are very weak:</p>
  
  <pre><code>for cur_mark in list_of_marks
      goto mark
      yank current line and append to register
  </code></pre>
  
  <p>Has anyone ever written anything similar that they can point me to?</p>
  
  <p>Thanks</p>
  
  <p>EDIT: I posted the accepted solution at <a href="https://github.com/mikeage/vim-yankmarks" rel="nofollow">https://github.com/mikeage/vim-yankmarks</a></p>