I'm using the plugins Nerdtree and Airline in my vim. Here is my config:
autocmd VimEnter * NERDTree autocmd BufWinEnter * NERDTreeMirror " make Nerdtree available on each tab let g:airline_theme='sol' let g:airline#extensions#ycm#enabled = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#fnamemod = ':t' let g:airline#extensions#tabline#buffer_idx_mode = 1
When I execute vim, I can navigate files on the original tab as expected. For example, I opened five files with the help of Nerdtree on the original tab and then I could see the tabline as below:
Then, I press
t on some file in Nerdtree to open a new tab. On this new tab, there are two unexpected things:
I can see the name of Nerdtree is shown on the tabline, which isn't shown on the first tab.
No matter how many different files I try to open, there is always only one filename is shown on the tabline, meaning that the new filename will replace the old one.
In a word, I want the new tab (created by pressing
t in Nerdtree) to act just like the first one.
How to achieve this?