Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Vim for edit files. When I open file with .tt extension I have to use command set filetype=html in order to set syntax highlighting on for this file. How can I use this command by default automatically when I open an *.ff files in Vim?

p.s. or may be you know some good and proven vim plugins to set .tt syntax highlighting?

share|improve this question
Is it .tt or .ff, and what kind of (supposedly HTML-like) file type is that?! – Ingo Karkat Feb 2 '13 at 19:49
.tt is extension of template-toolkit files which may content html code too. – edem Feb 2 '13 at 20:05
up vote 2 down vote accepted

See :help new-filetype; you have some choices where to put the command (lump them together in ~/.vim/filetype.vim, or separate them in a file in ~/.vim/ftdetect/...), but it boils down to this:

au! BufRead,BufNewFile *.tt     setfiletype html
share|improve this answer
Thank you very much for the advice! – edem Feb 2 '13 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .