Vim-TabSideBar

To show tab pages vertically on Vim


Project maintained by rbtnn Hosted on GitHub Pages — Theme by mattgraham

What is Vim-TabSideBar?

TabSideBar is to show tab pages vertically on Vim, so it is like Tab Sidebar of Opera browser's plugins. TabSideBar and TabLine are different implementations. You can use both TabSideBar and TabLine.

How to use

If you want to use TabSideBar, you put following codes in .vimrc.

set showtabsidebar=2
set tabsidebarcolumns=20

It provides following features for TabSideBar.

Options

  • 'tabsidebar' 'tsb' string (default empty) global or local to tabpage

    When nonempty, this option determines the content of the tab page. The option consists of printf style '%' items interspersed with normal text. So this option is like &statusline or &tabline.

    set tabsidebar=%m%r%f\ (%l/%L)
  • 'tabsidebarcolumns' 'tsbc' number (default 0) global

    The option has number of columns for the current tab page.

    set tabsidebarcolumns=32
  • 'showtabsidebar' 'stsb' number (default 0) global

    The value of this option specifies when the tabsidebar with tab page labels will be displayed:

    • 0: never
    • 1: only if there are at least two pab pages
    • 2: always
    This option is like &laststatus or &showtabline.

    set showtabsidebar=2

Functions

  • gettabsidebar({tabnr})

    If {tabnr} is valid, return the tab page {tabnr} label.
    If {tabnr} is invalid, return emtpy string.

    setlocal tabsidebar=%m%r%f\ (%l/%L)
    echo gettabsidebar(tabpagenr())
    " %m%r%f (%l/%L)
  • settabsidebar({tabnr}, {text})

    If {tabnr} is valid, set {text} to the tab page {tabnr} label and return 1.
    If {tabnr} is invalid, do nothing and return 0.

    " set the &tabsidebar for current tab page
    call settabsidebar(tabpagenr(), "")
    " set the &tabsidebar for tab page 3
    call settabsidebar(3, "")

Commands

  • :redrawtabsidebar

    Redraw the tab pages in TabSideBar.

    redrawtabsidebar

Highlights

  • TabSideBar

  • TabSideBarSel

  • TabSideBarFill

Issues

This tabsidebar branch has following issues:

  1. Rendering

  2. No test