Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In answer to your question about opening up a tab as output, I don't think there's any built in way to do this. There's the <a href="http://www.vim.org/scripts/script.php?script_id=2511" rel="nofollow noreferrer">RunView plugin</a> (see my answers to <a href="https://stackoverflow.com/questions/3922561/sending-email-from-vim/3922642#3922642">this question</a> and <a href="https://stackoverflow.com/questions/3797294/annoyance-when-running-scripts-in-vim-windows-ruby">this one</a>), but I don't think that it supports using a separate tab (it works with a split window: what I think you refer to when you say 'view').</p> <p>Regarding an interactive console: no, this is not possible. See <code>:help design-not</code>.</p> <p>As for general use of Vim, try to get used to the idea of buffers and the fact that each 'view' (my term), whether it be a split window, a tab or whatever is just a means of looking at a particular buffer. You can have multiple views on a single buffer, so you can have a source file vertical split with two headers in one tab and the same source file vertically split with another header and a different bit of the same source file in another tab. This is very powerful once you get used to it. The <code>Ctrl-W</code> keyboard shortcuts are your friend (e.g. <code>Ctrl-W, h</code> to go left one window).</p> <p>As for changing a tab into a split window, I don't think there's a direct way to do this (how would Vim know which tabs you wanted to join?). You can break a split into a tab with <code>Ctrl-W + T</code>, but to go back you'd have to create a couple of mappings. This is off the top of my head but something like this might work:</p> <pre><code>command! TakeThis let takebufnr = bufnr("")&lt;CR&gt; command! SplitTaken exe 'split #' . takebufnr&lt;CR&gt; nmap ,t :TakeThis&lt;CR&gt; nmap ,s :SplitTaken&lt;CR&gt; </code></pre> <p>Then press <code>,t</code> on the buffer you want to grab and <code>,s</code> on the one you want to split with the 'taken' buffer.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload