Skip to content

akinsho/lightline-statuslinetabs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightline-StatuslineTabs

A very small plugin to add tabs to status line for users of the lightline plugin.

screenshot of plugin

Usage

The active tab is surrounded by the separators (these default to unicode braces) the remaining tabs are rendered using the tab_number_icons map each number is rendered according to the icon it is mapped to e.g. 1: 🍎.

Installation

  • You can install this plugin using the plugin manager of your choice.

Example:

 Plug 'itchyny/lightline.vim'
 Plug 'Akin909/lightline-statuslinetabs'

Integration

  1. Register the component
let g:lightline = {}

let g:lightline.component_expand = {
\  'statuslinetabs': 'lightline#statuslinetabs#show',
\ }
  1. Add the component to lightline, e.g. to add to the left side of the statusline use -
let g:lightline = {
    \ 'active': {
    \   'left': [ ['statuslinetabs'] ],
    \}

Configuration

  • Tab Number Icons - To configure this provide an alternative map of the following format
    let g:lightline#statuslinetabs#tab_number_icons = {
        \ 1: 'Tab 1',
        \ 2: 'Tab 2',
        \ 3: 'Tab 3',
        \}
    
    The keys must be numbers from 1-10 inclusive and the map should be called g:lightline#statuslinetabs#tab_number_icons
  • Tab Item separators
    • g:lightline#statuslinetabs#left_separator should be set to your desired icon
    • g:lightline#statuslinetabs#right_separator should be set to your desired

Motivation

I split this out from my init.vim as it might be of use to other people. That being said if you'd like to make a change consider, forking this repo or making a PR rather than raising an issue, I'm lazy/working on other OSS projects and not looking for a time consuming maintainership 😄.

About

A Vim plugin to show tabs in the Lightline Statusline

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published