I am using vim together with NERDTree and MiniBufExplorer. My colorscheme is peaksea. If I start vim, no syntax is highlighted in the first buffer. The other buffers have syntax highlighted. I have "syntax enable" in my vimrc. If I type :edit the syntax gets highlighted. So I tried
autocmd VimEnter * edit
but still nothing is highlighted. Did anyone encounter a similar problem or has anyone an idea how to fix this?
I remapped F12 to redo my syntax highlighting in case it gets messed up:
nnoremap <F12> :syntax sync fromstart<cr>
Maybe you can just run it as an autocmd event in your vimrc based on reading a new buffer?
autocmd BufReadPost * :syntax sync fromstart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With