title: Getting the return value from an internal Vim command in Vimscript
body: <p>I want to do something like</p>
  <pre class="lang-vim prettyprint-override"><code>let colors = execute(&quot;:highlight&quot;)
  </code></pre>
  <p>This is obviously incorrect; all I can do is <code>execute(&quot;:highlight&quot;)</code> which will open a window, but what I really need is to get the contents of that window into a variable — much like a <code>system()</code> call would do for external commands. Can this be done?</p>