Giter Site home page Giter Site logo

vim-wintabs's Introduction

vim-wintabs

Wintabs is a per-window buffer manager for Vim. It creates "tabs" for each buffer opened in every Vim window, and displays these buffers either on tabline or statusline. It brings persistent contexts to Vim windows and tabs, making them more awesome.

Screenshots

Wintabs with two native Vim tabs, showing buffers and tabs on tabline:

image

Wintabs with two Vim windows, showing buffers on statusline. It nicely preserves window layout when switching/closing tabs:

image

Wintabs manages long tablines nicely (better than Vim does!):

image

Installation

Use your favorite package manager to install:

  • Pathogen
    • git clone https://github.com/zefei/vim-wintabs ~/.vim/bundle/vim-wintabs
  • Vundle
    • Plugin 'zefei/vim-wintabs'
  • NeoBundle
    • NeoBundle 'zefei/vim-wintabs'

Usage

By default, wintabs maintains a list of buffers for each buffer opened in each window, and displays them on tabline. To navigate and manage these buffers, a few commands and key mappings are provided, and they are very similar to what Vim buffers/tabs have.

To make full use of wintabs, it is recommended to have the following commands or keys mapped, these are the essential ones:

commands             | mapping keys                 | replacing Vim commands
---------------------+------------------------------+-----------------------
:WintabsNext         | <Plug>(wintabs_next)         | :bn!
:WintabsPrevious     | <Plug>(wintabs_previous)     | :bp!
:WintabsClose        | <Plug>(wintabs_close)        | :bd
:WintabsOnly         | <Plug>(wintabs_only)         |
:WintabsCloseWindow  | <Plug>(wintabs_close_window) | :close, CTRL-W c
:WintabsOnlyWindow   | <Plug>(wintabs_only_window)  | :only, CTRL-W o
:WintabsCloseVimtab  | <Plug>(wintabs_close_vimtab) | :tabclose
:WintabsOnlyVimtab   | <Plug>(wintabs_only_vimtab)  | :tabonly

Below is an example of key mappings:

map <C-H> <Plug>(wintabs_previous)
map <C-L> <Plug>(wintabs_next)
map <C-T>c <Plug>(wintabs_close)
map <C-T>o <Plug>(wintabs_only)
map <C-W>c <Plug>(wintabs_close_window)
map <C-W>o <Plug>(wintabs_only_window)
command! Tabc WintabsCloseVimtab
command! Tabo WintabsOnlyVimtab

See :help wintabs-commands for all available commands and mappings.

Configuration

Wintabs has a handful of configuration options, see :help wintabs-options for details.

FAQ

A: Does wintabs support Vim sessions?

Q: Yes, as long as your sessionoptions contains "globals". Wintabs also supports xolox/vim-session out of the box.

License

MIT License.

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.