Vim Recall繁體中文

Move a split into its own tab

<C-w>T

Example

Normal mode. Tab 1: a.txt on the left, b.txt on the right. Right split focused.

Before
Tab 1: a.txt on the left; b.txt on the right Focused window: b.txt

  1. <C-w>T b.txt moves to Tab 2 · a.txt stays in Tab 1

After
Tab 1: a.txt Tab 2: b.txt · focused

Details & Vim help

Move the current window from a split layout to a new tab page.

Give a crowded pane room without reopening its file.

This fails when the current tab contains only one window. Tab pages hold window layouts; they are not one-to-one file containers.

The window moves to a new tab page. Its text is unchanged.

Try it in Vim

  1. Start with at least two windows in the current tab.
  2. Focus the window to move.
  3. Press Ctrl-w, release it, then uppercase T.