Highlighting everything between { and } for Smarty templates
Posted: 07 Aug 2010 10:25
I have been trying to make a copy of the HTML syntax file which also enables the highlighting of everything between opening and closing braces { and }. This would allow a very convenient editing of Smarty templates: everything would be the same as plain HTML (which makes up the bulk of Smarty files), except for the special template codes, which are always in between { and }.
Some example Smarty code:
Anyone have an idea on how to achieve this? Many thanks!
Edit: I forgot to mention, I am not particularly interested in detailed Smarty highlighting, so I don't care about special colours for Smarty keywords, operators, etc. Just a single colour for an entire Smarty block would be ideal.
Some example Smarty code:
Code: Select all
{if isset($meta_keywords) AND $meta_keywords}
<meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" />
{/if}
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta name="generator" content="PrestaShop" />
<meta name="robots" content="{if isset($nobots)}no{/if}index,follow" />
<link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico" />
Edit: I forgot to mention, I am not particularly interested in detailed Smarty highlighting, so I don't care about special colours for Smarty keywords, operators, etc. Just a single colour for an entire Smarty block would be ideal.