I'm using vim to try a template system named handlebars, and I installed a vim plugin to get some syntax-highlighting for *.handlebars. I can get coloration if I do this : :set filetype=handlebars
, but when I open a template, it is monochrome.
My .vim folder looks like this:
.
|-- autoload
| `-- pathogen.vim
|-- bundle
| |-- handlebars
| | |-- example.handlebars
| | |-- ftdetect
| | | `-- handlebars.vim
| | |-- ftplugin
| | | `-- handlebars.vim
| | |-- indent
| | | `-- handlebars.vim
| | |-- MIT-LICENSE
| | |-- README.md
| | `-- syntax
| | `-- handlebars.vim
What can I try to get automatic filetype detection?
Here is the content of handlebars.vim :
if has("autocmd")
au BufNewFile,BufRead *.handlebars,*.hbs set filetype=handlebars
endif
I think I have autocmd, because :autocmd outputs something.
UPDATE
Here is the content of my .vimrc :
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
syntax on
set softtabstop=2
set shiftwidth=2
set tabstop=2
set expandtab
set number
set background=dark
set laststatus=2
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
colorscheme solarized
filetype on
filetype plugin on
Here is my .vim folder if someone wants to take a look at it : https://github.com/greg0ire/dotvim