smarty.vim : smarty syntax file
script karma |
Rating 41/29,
Downloaded by 3499 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Ken Earl |
|
script type |
syntax |
|
description |
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. |
|
install details |
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. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.22.42.14
|