Is there a vim command to relocate a tab?

前端 未结 7 1601
南笙
南笙 2021-01-29 18:16

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?

7条回答
  •  一向
    一向 (楼主)
    2021-01-29 19:04

    Move Current Tab to the nth Position

    :tabm n
    

    Where n is a number denoting the position (starting from zero)


    Move Tabs to the Left / Right

    I think a better solution is to move the tab to the left or right to its current position instead of figuring out the numerical value of the new position you want it at.

    noremap   :-tabmove
    noremap  :+tabmove
    

    With the above keymaps, you'll be able to move the current tab:

    • To the left using: Alt + Left
    • To the right using: Alt + Right

提交回复
热议问题