I set Tagbar automatically open when a new file in vim, it is ok and fine. but if open a new file as a tab in opened vim, Tagbar would not be opened, how to tell vim to keep open Tagbar open with a new tab?

1 Answer 1


For me such line in .vimrc does the job:

autocmd FileType python,c,cpp TagbarOpen
  • how to set it for all type file? May 18, 2020 at 7:58
  • 1
    Try add this line: "autocmd BufNew,BufRead,BufEnter * TagbarOpen". But do you really need Tagbar on text files for example?
    – Dmitry
    May 19, 2020 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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