Lightweight Vim plugin to enhance the tabline including numbered tab page labels; it's written entirely in Vim script.
Shows the tab page number on every tab label for quickly navigating to the desired tab <number>gt
.
Rename the current tab page label.
Tabs display an indicator when a buffer has been modified and not saved.
Dynamically updates the filename of the currently focused window in the tab page.
Eliminates inefficient use of string concatenation operator by using printf
where possible.
Does not show filename extensions to preserve the amount of tab label space.
Performs runtime calculation of maximum tab label length and truncates accordingly (Dynamic resizing of tab labels).
Options are configurable from .vimrc
.
Enhancement of tab label truncation algorithm Toggle tab page numbers on and off by keyboard shortcut Toggle tab label filename extensions on and off by keyboard shortcut Toggle tab label truncation on and off by keyboard shortcut
In progress: keyboard shortcuts and enhancement of tab label truncation algorithm.
You may choose your preferred method of installation.
Windows users, change all occurrences of
~/.vim
to~\vimfiles.
Run the following commands in a terminal:
mkdir -p ~/.vim/bundle
cd ~/.vim/bundle
git clone https://github.com/webdevel/tabulous.git
echo 'set runtimepath^=~/.vim/bundle/tabulous' >> ~/.vimrc
Restart Vim.
Run the following commands in a terminal:
mkdir -p ~/.vim/bundle
cd ~/.vim/bundle
git clone https://github.com/webdevel/tabulous.git
Restart Vim.
If your Vundle version is less than
0.10.2,
changePlugin
toBundle
.
Enter this in your .vimrc
:
Plugin 'webdevel/tabulous'
Then enter the following command-lines in Vim:
:source %
:PluginInstall
Enter this in your .vimrc
:
NeoBundle 'webdevel/tabulous'
Then enter the following command-lines in Vim:
:source %
:NeoBundleInstall
Enter this in your .vimrc
:
Plug 'webdevel/tabulous'
Then enter the following command-lines in Vim:
:source %
:PlugInstall
Tabulous adds the following commands available from Vim's Command-Line mode.
Rename the current tab page label name to <string>
. The new label name is remembered until the buffer associated with the label name is wiped out or you use TabulousRename
again on the same label name.
:TabulousRename <string>
No configuration is necessary by default. However, there are options if you want to set them. Any of the following configuration options may simply be added to a new line in your .vimrc
.
This disables the plugin entirely.
let loadTabulous = 1
This enables or disables tab page label truncation. The default is 1
enabled.
let tabulousLabelNameTruncate = 0
This sets the tab close string for mouse clicks. The default is X
enabled.
let tabulousCloseStr = ''
This sets the tab label name options which may be valid filename-modifiers recognized by the Vim command fnamemodify
. The defaults are :t:r
which remove directories and file extension from a tab label name.
let tabulousLabelNameOptions = ''
This sets the string that indicates the buffer associated with a tab has been modified, but not yet saved. The default value is shown below.
let tabulousLabelModifiedStr = '+'
This sets the string on the left of the tab label. The default value is shown below.
let tabulousLabelLeftStr = ' '
This sets the string on the right of the tab label. The default value is shown below.
let tabulousLabelRightStr = ' '
This sets the string on the right of the tab label number. The default value is shown below.
let tabulousLabelNumberStr = ' '
This sets the string on the left of the tab label name. The default value is shown below.
let tabulousLabelNameLeftStr = ''
This sets the default tab label name. The default value is shown below.
let tabulousLabelNameDefault = '[No Name]'
There are no default mappings for renaming your tabs, but you can map it easily like this:
map <C-t> :call g:tabulous#renameTab()<cr>
This maps Ctrl + t
to rename your tab.
Tabulous is free and open source software. It is licensed by the GNU General Public License version 2 (GPLv2).