Vim-TabSideBar

To show tab pages vertically on Vim


rbtnn/vim

vim/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
set tabsidebarwrap
set tabsidebar=%!TabSideBar()
function! TabSideBar() abort
    try
        let lines = [printf('TabPage:%d', g:actual_curtabpage)]
        for x in getwininfo()
            if x.tabnr == g:actual_curtabpage
                let s = '[No Name]'
                if x.terminal
                    let s = '[Terminal]'
                elseif x.quickfix
                    let s = '[QuickFix]'
                elseif x.loclist
                    let s = '[LocList]'
                else
                    let s = fnamemodify(bufname(x.bufnr), ':t')
                endif
                let lines += [printf('  %s', s)]
            endif
        endfor
    catch
        return string(v:exception)
    endtry
    return join(lines, "\n")
endfunction
                        

Features

It provides following features for TabSideBar.

Options

  • &tabsidebar
  • &tabsidebarcolumns
  • &showtabsidebar
  • &tabsidebarwrap

Functions

  • gettabsidebar({tabnr})
  • settabsidebar({tabnr}, {text})

Commands

  • :redrawtabsidebar

Highlights

  • TabSideBar
  • TabSideBarOdd
  • TabSideBarEven
  • TabSideBarSel
  • TabSideBarFill