I have opened a file in a horizontal or vertical split and which to put it in a new tab instead. Can this be done easily?

3 Answers 3


Very easily, use CTRL+W, SHIFT+T.

See the help page:

:help CTRL-W_T

Note that this is case sensitive: <C-W>T is different to <C-W>t.

  • 5
    Is it possible to do the reverse of this (move a tab to a split)?
    – aruuu
    Jun 14, 2018 at 1:21

The long-and-straight-forward way would be to open a new tab and open the file's buffer there.


:b can TAB-complete from arbitrary parts of the file name, so this shouldn't take too long.


Canonical Solution

Suppose there are two buffers:

  1 #h   "match_this_partially.md"  line 1
  2 %a   "food/tacos.txt"           line 1

You currently have food/tacos.txt open. You want to open match_this_partially.md in a new tab.

Simply use the following:

:tab sb partial

-- or --

:tab sb 1

You can also use wildmenu tab completion in place of partial.

long form:

  • :tab sbuffer {buffer}


  • :help :tag
  • :help :sbuffer

Alternative Keyboard Solution

Open file in a new split open it in a new tab with the following:


Use case

Note: for me ]b simply is mapped with nnoremap <silent> ]b :silent execute v:count.'bnext'<cr>

If I have few buffers I might do something like this:

  1. <c-w>v -- create a new vertical split
  2. ]b -- navigate to next buffer (essentially with :bnext)
  3. <c-w>T -- open split in new tab (this destroys the split in the first tab)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.