For the most part Vim just works. For example, on Ubuntu if you
apt-get install vim
then it comes with syntax highlighting for Perl scripts (ending in .pl), Perl modules (ending in .pm) and HTML files (ending in .html). It also comes with brace matching for the Perl code, but no <html> tag matching </html>. This is a real pain if you're trying to make sense of a large HTML file in Vim.
HTML tag matching
1. Find plugin/matchit.vim and copy it into your personal vim plugin directory ~/.vim/plugin (creating it if it's not already there)
mkdir -p ~/.vim/plugin
cp `locate plugin/matchit.vim` ~/.vim/plugin
2. Add this line to your Vim config file ~/.vimrc
echo filetype plugin on >> .vimrc
Then voilà! With Vim you can now jump between matching tags like <html> and </html> using the % key.
Template Toolkit syntax highlighting and tag matching
Of course if you're working on a Perl Template Toolkit we're back to square one because you have HTML'ish files called something like:
At this point you just need to add the following line to your ~/.vimrc file
echo au BufRead,BufNewFile *.tt setfiletype html >> ~/.vimrc
and once again you have HTML highlighting and tag matching just like an HTML file (although the TT delimiters [% %] are still ignored by Vim).