On Tue, 2002-06-04 at 10:31, Clifton Wood wrote:

> Use information: Right now, I don't know of a way to make VIM auto detect a 
> template file when it is loaded, however it's fairly simple to do by hand in 
> VIM.
> 
>       - First, move the "template.vim" file into ~/.vim/syntax.
>       - Load any template file
>       - Execute the following commands:
>               :syntax on
>               :source ~/.vim/template.vim
>               :set syntax="template"
> 
> - Cliff
> - Programmer/Analyst/Editor, OSDN

To get vim to auto-detect the filetype create a file 'filetype.vim'
inside ~/.vim/ with:

" TT filetype
if exists("did_load_filetypes")
    finish
endif

augroup filetypedetect
    au! BufRead,BufNewFile *.tpl        setfiletype template
    au! BufRead,BufNewFile *.tt2        setfiletype template
    au! BufRead,BufNewFile *.ttc        setfiletype perl
augroup END



Shay





Reply via email to