Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Sangdol/mintabline.vim
Minimalist Tabline with tab numbers, icons and Neovim terminals
https://github.com/Sangdol/mintabline.vim
neovim vim vim-plugin
Last synced: 3 months ago
JSON representation
Minimalist Tabline with tab numbers, icons and Neovim terminals
- Host: GitHub
- URL: https://github.com/Sangdol/mintabline.vim
- Owner: Sangdol
- License: mit
- Created: 2022-03-04T15:37:00.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-24T14:57:28.000Z (3 months ago)
- Last Synced: 2024-11-24T15:33:40.915Z (3 months ago)
- Topics: neovim, vim, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 163 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Mintabline
===Minimalist Tabline

This project is inspired by [tabline](https://github.com/Sangdol/tabline.vim).
Features
---* Displays minimal characters with tab numbers.
* Displays the directory name of Neovim terminal buffers.
* Displays icons using [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) or [vim-devicons](https://github.com/ryanoasis/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](https://github.com/junegunn/vim-plug)
```vim
Plug 'sangdol/mintabline.vim'
```### devicons
You can add icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) or [vim-devicons](https://github.com/ryanoasis/vim-devicons).
If both plugins exist `nvim-web-devicons` takes precedence.
```vim
" Optionally add one of these
Plug 'nvim-tree/nvim-web-devicons'
Plug 'ryanoasis/vim-devicons'
```Please follow the installation guide of the plugins if icons don't show up.
Configuration
---### `g:mintabline_tab_max_chars`
You can set the maximum length of tab names with `g:mintabline_tab_max_chars`.
For example,
```vim
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 drawn 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
```vim
command! -nargs=* Tablabel let t:tab_label= | 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, i.e. you can type `1,` to select the first tab.
```vim
for i in range(1, 9)
exec 'nnoremap ' .. i .. ', ' .. i .. 'gt'
endfor
```License
---MIT