Maik Klein
Maik Klein

Reputation: 16148

How do I swap the position of two tab pages?

For example swap tab at position 2 with tab at position 3. Is there a general way of doing it?

Position starts from 1 in the example because that is how vim lables it

For example if I want to swap tab3 with tab2 and I am currently on tab3. I can do :tabm 1 and it will swap it correctly.

But if I am on tab2 and I want to swap tab2 to tab3 again, :tabm 2 doesn't do anything.

I know that in this example I could use tabm +1 ortabm -1 but I also want to swap over bigger ranges. Like 2 with 7.

Upvotes: 1

Views: 71

Answers (1)

romainl
romainl

Reputation: 196526

Assuming you have a or n in the values of the mouse option (see :help 'mouse'), you can simply click and drag them.

Upvotes: 1

Related Questions