I work a lot with smarty templates at work and one of the things that has irritated me for a while now is that the matchit plugin didn’t work in smarty template files. The convention is to name the smarty template files .tpl and vim knows this so it gives the file the filetype ‘smarty’. Doing so confuses matchit since it doesn’t know what a smarty file is. To solve this all you need to do is add a little code in
As the comment says the code is taken from vim’s default HTML filetype plugin file.