[Geany] filetype configuration for embedded perl-code
Johannes Deutsch
j_deutsch at xxxxx
Fri Feb 10 14:10:28 UTC 2012
Dear mailing-list,
i work a lot with perl's Text::Template module to embed perl-code in
various filetypes. In the template-file a perl fragment is listed
between distinct delimiters, e.g. '[@@' that signals the beginning perl
code and '@@]' that signals the end of perl code.
For instance, I assume that i use the module with LaTeX files. As geany
support syntax highlighting for both perl-code as well as latex-code my
question is whether it's possible to instruct geany to highlight the
latex code of the template and the perl-fragments within the delimiters.
To make things more clear, a short example file:
#########################################################
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage{pstricks,pst-plot}
\pagestyle{empty}
\begin{document}
\psset{ury=1cm, urx=2cm, Dy=0.6 ,Dx=2, xAxisLabel=$t$/s, yAxisLabel=$y
$/m}
\begin{psgraph}{->}(0,0)(-0.5,-2.7)(10.5,2.5){12cm}{9cm}%
\listplot{%
%
[@@
# perl fragment that syntax has to be highlighted according to
# filetypes.perl
listplot(data('integrate(sub { sin($_[0]) }, 0, $x, 1e-5,
1e-5)',0,10,400));
@@]
%
}
\end{psgraph}
\end{document}
##########################################################
Maybe somebody of you experts can help me to achieve this!? And please
be gentle with me since i haven't gather any experience customizing
geany :)
With best regards and thanks for your effort
--
Johannes Deutsch
Web: http://www.jd-weblog.de
More information about the Users
mailing list