1

I want when i type :tabnew , that it automatically create numbered (indexed) tabs according to which tab in order it is. if it's 3rd tab that will be opened, than to show number 3 before tab name ( 3 [tab name] )

I can create tab with some name, like :tabnew hello but number is still staying 1 ( 1 [tab name1] | 1 [tab name2] | 1 [tab name3] )

I want it to show like index, so I can quickly jump to it with <n>gt ( 1 [tab name1] | 2 [tab name2] | 3 [tab name3] )

so i can just jump without counting which tab it is, to 3rd from 1st, with 3gt

If I disable vim airline, then with this function I get that functionality, but airline is overshadowing it, so it's useless with airline enabled.

screen shot:

screenshot


environment:

vim: 9.0

vim-airline: 0.11

OS: Manjaro latest

airline configuration:

let g:airline_powerline_fonts = 1
let g:airline_extensions = ['tabline']
let g:airline_highlighting_cache = 1
let g:airline_theme='wombat'
let g:airline#extensions#tabline#enabled = 1           " enable airline tabline
let g:airline#extensions#tabline#show_close_button = 0 " remove 'X' at the end of the tabline
let g:airline#extensions#tabline#tab_min_count = 2     " minimum of 2 tabs needed to display the tabline
let g:airline#extensions#tabline#show_splits = 0       " disables the buffer name that displays on the right of the tabline
let g:airline#extensions#tabline#enabled = 1

terminal: xfce terminal 1.0.4

$TERM variable: xterm-256color

color configuration (:set t_Co?): t_Co=256

1
  • I suspect the number you are seeing is the number of splits.
    – D. Ben Knoble
    Feb 26, 2023 at 14:10

1 Answer 1

2

So, the solution is to include this in vimrc

let g:airline#extensions#tabline#tab_nr_type = 1 " tab number

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.