开发者

VIM: Certain .c files opening without syntax highlighting

开发者 https://www.devze.com 2023-03-24 02:49 出处:网络
I have some .c files that don\'t automatically highlight in vim. This problem only recently started. I have not edited my .vimrc file:

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 t开发者_Python百科he 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).

0

精彩评论

暂无评论...
验证码 换一张
取 消