You are here: PSPad forum > English discussion forum > Re: TWIG highlighter help
Posted by: kr37 | Date: 2015-05-24 19:57 | IP: IP Logged
Hello, does anybody have a highlighter ini for Twig? If not, I would like to make one, but could use a little guidance.
It is a simple language, but the delimiters are different from what PSPad seems to know about. Mainly there are three types of delimiter: {{ {# {%
{{ foo }}
{# comment #}
{% if foo %}{% endif %}
Twig files can look like this:
<!DOCTYPE html>
<html>
<head>
{# This is a comment #}
{{ category }}
{% block head %}
<link rel="stylesheet" href="style.css" />
<title>{% block title %}{% endblock %} - My Webpage</title>
{% endblock %}
</head>
<body>
<div id="content">{% block content %}{% endblock %}</div>
<div id="footer">
{% block footer %}
© Copyright 2011 by <a href="http://domain.invalid/">you</a>.
{% endblock %}
</div>
</body>
</html>
Thank you for any help!
Edited 2 time(s). Last edit at 2015-05-24 19:59 by kr37.
Posted by: pspad | Date: 2015-05-24 20:15 | IP: IP Logged
Use standard HTML highlighter
Go to menu Settings / Highlighter settings
On the page "specification" check Smarty nad Django support
Posted by: kr37 | Date: 2015-05-25 23:38 | IP: IP Logged
Thank you, that's a great help. Is there any (relatively easy) way I could get that Enable Smart/Django support on a user-defined Twig.INI?
Posted by: pspad | Date: 2015-05-26 01:06 | IP: IP Logged
No, cause thewre is no way how to define user highlighter based on HTML with another included bracket based tags
Posted by: kr37 | Date: 2015-05-29 06:46 | IP: IP Logged
OK, thanks for the clear answer. Anyway it's already a help with the Django info.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR