Closed nn1900 closed 10 years ago
Is vim correctly detecting *.m
files as Objective-C? What's the output of set ft
? You may need to add something like:
autocmd BufNewFile,BufRead *.h,*.m,*.pch setlocal filetype=objc
To your vimrc
@Keithbsmiley that works for me. thanks a lot.
Yeah, I think Vim defaults to associating .m
files with Matlab...
When I use "vim filename.m" to create a new file for edit, there's no syntax color highlighting. It only works for editing existing file. I have also tried c/c++ source files, and that worked fine for me. Is this a bug or?
my vimrc file looks as below:
execute pathogen#infect() set nocompatible filetype on filetype plugin indent on syntax on
" tab space settings set autoindent set smartindent set tabstop=4 set shiftwidth=4 set expandtab set number