Is there any plugin that I can use to auto indent html in "smarty" template.
the way i do this in vim is like:
while editing a smarty template:
:set filetype=html
press "=G" after moving cursor to the head of file Is there a plugin for vim that can do this for me?
For anyone who's still looking for an answer to this, simply add the following line to your vimrc:
au BufRead,BufNewFile *.tpl set filetype=html
The above will treat .tpl files as HTML. You can swap the values (tpl/html) for whatever other combination as well.
Once your file is open, just use this keystroke to indent:
gg=G
This plugin handles indenting of HTML and PHP in Smarty templates: https://github.com/blueyed/smarty.vim
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With