when I use vim to edit .mak files, the syntax highlight is not applied to the file. Here is my .vimrc
" Pathogen
call pathogen#infect()
call pathogen#helptags()
filetype off
filetype plugin indent on
syntax on
set nu
colorscheme denkai
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
let g:NERDTreeWinPos = "right"
let NERDTreeShowHidden=1
nmap <silent> <F3> : wincmd p<CR>
nmap <silent> <F2> : NERDTreeToggle<CR>
nmap <silent> <TAB> : bNext<CR>
set noswapfile
set nobackup
set backspace=indent,eol,start
set undofile
set undodir=$HOME/.vim/undo
set undolevels=1000
set undoreload=10000
set noexpandtab
set listchars=tab:▸-,eol:$,trail:~,nbsp:~
set cursorline
set cursorcolumn
hi CursorLine cterm=NONE ctermbg=darkcyan ctermfg=black guibg=darkblue guifg=white
hi CursorColumn cterm=NONE ctermbg=darkcyan ctermfg=black guibg=darkblue guifg=white
au BufNewFile, BufRead, BufReadPost *.mak set filetype=mako
au BufRead, BufNewFile *.mak set syntax=mako
I have tried turning filetype and syntax off and on at the end of the file (removing it from the top of the file to the end) but it wasn't working.
I'd like the filetype to be detected automatically and applied the proper syntax (mako) when editing those files.
When I type :set ft=mako it works wonderfully.
Thanks for the help!
You might want to check out Mako.vim and see if it helps, it's possible that vim doesn't have a syntax file for mako files. Otherwise you will need to create a syntax file as outlined here.