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?


For me such line in .vimrc does the job:

autocmd FileType python,c,cpp TagbarOpen
| improve this answer | |
  • how to set it for all type file? – Hossein Vatani May 18 at 7:58
  • Try add this line: "autocmd BufNew,BufRead,BufEnter * TagbarOpen". But do you really need Tagbar on text files for example? – Dmitry May 19 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.