mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-12-14 06:49:40 +08:00
11 lines
377 B
VimL
11 lines
377 B
VimL
|
function! airline#extensions#tabline#formatters#jsformatter#format(bufnr, buffers)
|
||
|
let buf = bufname(a:bufnr)
|
||
|
let filename = fnamemodify(buf, ':t')
|
||
|
|
||
|
if filename == 'index.js' || filename == 'index.jsx'
|
||
|
return fnamemodify(buf, ':p:h:t') . '/i'
|
||
|
else
|
||
|
return airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers)
|
||
|
endif
|
||
|
endfunction
|