On 2009-05-06, Miao Jiang wrote:
> I write my own indent file indent/sphinx.vim for sphinx.conf
> and add
> au! BufRead,BufNewFile sphinx.* setfiletype sphinx
> to the .vimrc
>
> but when I try edit sphinx.conf. the filetype still show conf instead
> of sphinx.
> How can I solve the problem?
>
> My vim version: 7.1.314 (Debian 5 vim-full)
The simplest solution is to change your autocommand to use
set filetype=sphinx
instead of
setfiletype sphinx
so that the result would be
au! BufRead,BufNewFile sphinx.* set filetype=sphinx
It would also work to move your current autocommand towards the top
of your .vimrc, ahead of your "filetype plugin indent on" command.
Both of these solutions worked for me, using vim-7.2.148.
A more correct solution would be to follow the instructions here:
:help new-filetype
HTH,
Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---