Skip to content

Sangdol/mintabline.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mintabline

Minimalist Tabline

mintabline screenshot

This project is inspired by tabline.

Features

  • Displays minimal characters with tab numbers.
  • Displays the directory name of Neovim terminal buffers.
  • Displays icons using nvim-web-devicons or vim-devicons.
  • Allows configuration of the maximum tab name length.
  • Allows labeling tabs with a custom prefix.
  • Adjusts tab visibility dynamically based on the current window width.

Installation

Use your favorite Vim plugin management tool, e.g., vim-plug:

Plug 'sangdol/mintabline.vim'

devicons

You can add icons with nvim-web-devicons or vim-devicons.

If both plugins are installed, nvim-web-devicons takes precedence.

" Optionally, add one of the following:
Plug 'nvim-tree/nvim-web-devicons'
Plug 'ryanoasis/vim-devicons'

Please follow the installation guides for these plugins if icons do not appear.

Configuration

g:mintabline_tab_max_chars

You can set the maximum length of tab names with g:mintabline_tab_max_chars.

For example:

let g:mintabline_tab_max_chars = 15

The full name will be shown when a tab is active.

Usage

Tab labels

By default, the tab name is derived from the active buffer in that tab. You can set a custom prefix on the tab by setting the tab-local variable t:tab_label.

A simple command to change the label is:

command! -nargs=* Tablabel let t:tab_label=<q-args> | redrawtabline

Tip: accessing tabs with keymaps

A simple Vimscript can be used to configure keymaps to select tabs.

For example, the script below enables Number + , to select a tab (e.g., you can type 1, to select the first tab):

for i in range(1, 9)
  exec 'nnoremap ' .. i .. ', ' .. i .. 'gt'
endfor

License

MIT

About

Minimalist Tabline with tab numbers, icons and Neovim terminals

Topics

Resources

License

Stars

Watchers

Forks

Contributors