smarty.vim : smarty syntax file
| script karma
Downloaded by 2937
Comments, bugs, improvements
script versions (upload new version)
|A friend and I found that there were no acceptable vim syntax files for smarty, so we took the only one we could find and added everything from the smarty documentation (http://smarty.php.net/manual/en) to it. If nothing else, this is a very good start on a complete smarty syntax file. We have even used vimtip #498 to use autocomplete with this syntax and so far it seems to work well.|
|just drop it in your ~/.vim/syntax directory, then put this somewhere in your vimrc file:
au BufRead,BufNewFile *.tpl set filetype=smarty
additionally, if you would like dictionary completion, feel free to add something like this:
au Filetype smarty exec('set dictionary=/home/user/.vim/syntax/smarty.vim')
au Filetype smarty set complete+=k
This will allow <Control-x><Control-k> for dictionary autocomplete.
We have a mapping that makes it a bit easier:
imap <S-Space><S-Space> <C-X><C-K>
You could use imap <C-Space> <C-X><C-K>, but we have that mapped for normal omni (auto) completion.
Click on the package to download.
ip used for rating: 18.104.22.168