Giter VIP home page Giter VIP logo

taberian.vim's Introduction

taberian.vim

Clickable tabs per VIM window.

1.webm

Taberian applies the concept of tabs to VIM windows. Each VIM window (split) may contain a number of tabs, so user can switch between them, rearrange, close etc.

Taberian works out of the box and does not require any configuration. If there are less than two tabs then Taberian will not display anything. To start, create a new tab via <C-W>t.

Default mappings:

Mapping Description
<C-W>t Create a new tab by cloning the current tab.
<C-W>x Close the current tab.
<C-W>m Go to tab on the left.
<C-W>, Go to tab on the right.
<C-W>. Move the current tab one position to the left.
<C-W>/ Move the current tab one position to the right.
<C-W>c Check if there are any taberian tabs present and ask user to confirm closing the window.
<A-1> Go to tab 1.
<A-2> Go to tab 2.
<A-3> Go to tab 3.
<A-4> Go to tab 4.
<A-5> Go to tab 5.
<A-6> Go to tab 6.
<A-7> Go to tab 7.
<A-8> Go to tab 8.
<A-9> Go to tab 9.
<C-Tab> or <A-0> Go to previous tab, useful to switch between two recent tabs.

If you wish to not use the default mappings, disable them by defining g:taberian_no_default_mappings variable:

g:taberian_no_default_mappings = true

You can define your own mapping using this example:

map <silent> <C-W>t  <Cmd>TaberianNewTab<CR>
map <silent> <C-W>x  <Cmd>TaberianCloseCurrentTab<CR>
map <silent> <C-W>m  <Cmd>TaberianGotoLeftTab<CR>
map <silent> <C-W>,  <Cmd>TaberianGotoRightTab<CR>
map <silent> <C-W>.  <Cmd>TaberianMoveCurrentTabLeft<CR>
map <silent> <C-W>/  <Cmd>TaberianMoveCurrentTabRight<CR>
map <silent> <C-W>c  <Cmd>TaberianConfirmWindowClose<CR>
map <silent> <A-1>   <Cmd>TaberianGoToTabNr 0<CR>
map <silent> <A-2>   <Cmd>TaberianGoToTabNr 1<CR>
map <silent> <A-3>   <Cmd>TaberianGoToTabNr 2<CR>
map <silent> <A-4>   <Cmd>TaberianGoToTabNr 3<CR>
map <silent> <A-5>   <Cmd>TaberianGoToTabNr 4<CR>
map <silent> <A-6>   <Cmd>TaberianGoToTabNr 5<CR>
map <silent> <A-7>   <Cmd>TaberianGoToTabNr 6<CR>
map <silent> <A-8>   <Cmd>TaberianGoToTabNr 7<CR>
map <silent> <A-9>   <Cmd>TaberianGoToTabNr 8<CR>
map <silent> <C-Tab> <Cmd>TaberianGoToPreviousTab<CR>
map <silent> <A-0>   <Cmd>TaberianGoToPreviousTab<CR>

taberian.vim's People

Contributors

noscript avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

taberian.vim's Issues

Broken on Neovim

Hitting <C-W>t results in the following error:

Error detected while processing function taberian#render_current_window:
line   21:
E329: No menu "WinBar"
line   22:
E730: using List as a String
E15: Invalid expression: gettabwinvar(tabpagenr(), winnr(), 'taberian').tabs->deepcopy()
line   23:
E121: Undefined variable: tabs
E116: Invalid arguments for function len
E15: Invalid expression: len(tabs)
line   24:
E121: Undefined variable: ts_count
E15: Invalid expression: ts_count < 2 " render only if more than 1 tab
line   29:
E121: Undefined variable: tabs
E116: Invalid arguments for function map
line   38:
E121: Undefined variable: tabs
E15: Invalid expression: tabs->len() * (7 + 2 + 4) + 4 " 7: tab nr (2) + space + tab name (3 chars + '…')
line   39:
E121: Undefined variable: min_win_width
E15: Invalid expression: win_width < min_win_width
line   43:
E121: Undefined variable: tabs
E116: Invalid arguments for function s:winbar_width
E15: Invalid expression: s:winbar_width(tabs) > win_width
line   49:
E121: Undefined variable: tabs
E116: Invalid arguments for function s:winbar_width
E15: Invalid expression: s:winbar_width(tabs) > win_width
line   58:
E121: Undefined variable: tabs
E116: Invalid arguments for function s:underscored
E15: Invalid expression: s:underscored(tabs[w:taberian.curr_nr])
line   60:
E121: Undefined variable: tabs
E116: Invalid arguments for function map
line   63:
E121: Undefined variable: tabs
E15: Invalid expression: tabs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.