I am using the vim-airline plug-in to improve my status line at the bottom of a vim session.
In my vimrc I have,
let g:airline#extensions#tabline#enabled = 1
What this does is, it assigns a tab at the top of each buffer with the file that is open in that buffer.
My problem is that, the text in that tab has the entire path of the file that is open in the buffer. Whereas I only want the name of the file in the tab of the buffer.
For example if I open the file ~/abcd/bcd/cd/d.txt
in a buffer, then the tab for the corresponding buffer has the text ~/a/b/c/d.txt
whereas I would like it to simply be d.txt
.
Could someone please tell me if there is a way to accomplish this?
add the following to your vimrc:
let g:airline#extensions#tabline#fnamemod = ':t'
it takes anything from :help filename-modifiers
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With