title: How to copy the value of a vim option to a register
body: <p>In vim you can set option with <code>:set</code>. For example </p>
  
  <blockquote>
    <p>:set spell</p>
  </blockquote>
  
  <p>to enable spell control. And </p>
  
  <blockquote>
    <p>:set spellfile=/home/custom_spell.txt</p>
  </blockquote>
  
  <p>to set the location of the custom spell file.</p>
  
  <p>You can print the value of an option with echo. For example</p>
  
  <blockquote>
    <p>echo &amp;spellfile</p>
  </blockquote>
  
  <p>Now I would like to copy the value of the option spellfile to a buffer. How can I do that?</p>