Is there a vim command to relocate a tab?

Gavin picture Gavin · Nov 1, 2011 · Viewed 29.5k times · Source

How can I change the position / order of my current tab in Vim? For example, if I want to reposition my current tab to be the first tab?

Answer

maybeshewill picture maybeshewill · Aug 9, 2013

You can relocate a tab with :tabm using either relative or zero-index absolute arguments.

absolute:

  • Move tab to position i: :tabm i

relative:

  • Move tab i positions to the right: :tabm +i
  • Move tab i positions to the left: :tabm -i

It's a relatively new feature. So if it doesn't work try updating your vim.