I have some .c files that don't automatically highlight in vim. This problem only recently started. I have not edited my .vimrc file:
set number
nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR>
set ignorecase
syntax on
filetype plugin indent on
nnoremap <C-H> :Hexmode<CR>
inoremap <C-H> <Esc>:Hexmode<CR>
vnoremap <C-H> :<C-U>Hexmode<CR>
au BufWinLeave * mkview
au BufWinEnter * silent loadview
set tabpagemax=15
set wrap
The weird thing is when I open a file that doesn't automatically highlight, and type :set syntax=C
, it works, but if I reload my .vimrc file using :so ~/.vimrc
the highlighting goes away. This doesn't happen with other .c files.
Try to remove all files in ~/.vim/view
(eventually make a backup before deleting it).
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