简体   繁体   中英

Vim doesn't highlight syntax after using “tabe” open multiple files

I just started to learn Vim, and I found it is very annoying that vim dose not highlight syntax after using tabe command to open multiple files. Any solutions for that?

Let me explain more details of this situation.

  1. I open file A using vim
  2. I type ":tabe file B" to open the second file.

Two files now are opened in a same vim window. However, only file A has syntax highlight, file B does not have syntax highlight. Same situation also happens in ":sp file B".

If that really happens, then you found a bug in vim! But before we jump to any conclusions, my advice is that you first try to debug your vimrc: vi.stackexchange.com/questions/2003/how-do-i-debug-my-vimrc-file

BTW, it is very annoying that every newbie vim user tries to make it behave like every other graphical editor. So another suggested read: stackoverflow.com/questions/102384/using-vims-tabs-like-buffers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM