I frequently want to temporarily maximize a buffer in a tab page and then go back to the old buffer configuration that I was looking at. My current workflow for doing something like this is either to close all the other buffers using <c-w>o or to move the buffer I am currently looking at to its own tab <c-w>T. The problem with the second approach is that it removes the buffer from the original tab page.I populate three files a.txt, b.txt, and c.txt with a, b, and c respectively.% echo a > a.txt% echo b > b.txt% echo c > c.txtWhen I open all three of these files in one tab page, I get the following. Then I can move a.txt to a tab by itself. When I do, however, a.txt is removed from the original tab page. (So this would be after a <c-w>Tgt)I'd like the ability to choose at the time that I would have pressed <c-w>T to preserve the contents of the original buffer, create a new tab page containing only the buffer that is currently focused, and then focus the new tab page I've just created. In other commands, a command almost exactly like <c-w>T except that the original tab page is preserved and now a.txt is in two tab pages.Is there a way to do this?
Duplicate buffer into new tab instead of moving it
tabbed user interface
I'm not sure but you could try :tab split (or the shorter version :tab sp).The :split command should duplicate the viewport displaying a.txt, while the :tab modifier should move this viewport into a dedicated tab page.If you want to change the behavior of C-w T, you could remap it like this:nnoremap <C-w>T :tab split<CR>More generally, every time you find a command which splits the window, and you would rather it creates a new tab page instead, you can prefix it with :tab.It can be used, for example, to read a help buffer in a new tab page::tab help {your_topic}By default, the new tab page will appear after the current one. But if you want to make it appear somewhere else, you can prefix :tab with a count.For example, to duplicate the current viewport in a tab page after the 3rd one, you could type::3tab splitAnd to make it appear as the first one::0tab splitFor more information, you can read :h :tab::[count]tab {cmd}                   *:tab*        Execute {cmd} and when it opens a new window open a new tab        page instead.  Doesn't work for |:diffsplit|, |:diffpatch|,        |:execute| and |:normal|.        If [count] is given the new tab page appears after the tab        page [count] otherwise the new tab page will appear after the        current one.        Examples:            :tab split       opens current buffer in new tab page            :tab help gt     opens tab page with help for gt            :.tab help gt    as above            :+tab help       opens tab page with help after the next                             tab page            :-tab help       opens tab page with help before the                             current one            :0tab help       opens tab page with help before the                             first one            :$tab help       opens tab page with help after the last                             one