<div dir="ltr">Hi,<div><br></div><div>Couple of comments below.</div><div><br></div><div>Cheers</div><div>Lex<br><div class="gmail_extra"><br><br><div class="gmail_quote">On 3 September 2013 19:59, Daniel Carrera <span dir="ltr"><<a href="mailto:dcarrera@gmail.com" target="_blank">dcarrera@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I want to add syntax highlighting for Gnuplot files. I have made an<br>
effort to follow the documentation but the syntax highlighting doesn't<br>
work. My guess is that I got the file contents wrong. I am using the<br>
instructions in the manual:<br>
<br>
<a href="http://www.geany.org/manual/dev/index.html#custom-filetypes" target="_blank">http://www.geany.org/manual/dev/index.html#custom-filetypes</a><br>
<br>
As instructed, I edited  filetype_extensions.conf  and inserted the<br>
following line:<br>
<br>
Gnuplot=*.plt;*.gp;<br>
<br>
I also created filetypes.Gnuplot.conf and I have every indication that<br>
Geany can in fact read this file:<br>
<br>
1) I now have a new menu entry: Document > Set Filetype > Gnuplot file.<br>
2) Geany seems to recognize that a file with the .plt or .gp extension<br>
is a Gnuplot file (it says "Gnuplot" on the status bar).<br>
3) All this stops working if I remove filetypes.Gnuplot.conf<br>
<br>
So clearly Geany can see the file. But I do not have any kind of<br>
syntax highlighting that I can see. So I suppose that my file contents<br>
are wrong. Here is the file. Can anyone see an obvious problem with<br>
it?<br>
<br>
-------------------------- // --------------------------<br>
# For complete documentation of this file, please see Geany's main documentation<br>
[styling]<br></blockquote><div><br></div><div>It is better to use named styles rather than setting hard colours, then your filetype will also adapt with loaded colour schemes.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

# foreground;background;bold;italic<br>
default=0x000000;0xffffff;false;false<br>
commentline=0xd00000;0xffffff;false;false<br>
number=0x007f00;0xffffff;false;false<br>
word=0x111199;0xffffff;true;false<br>
string=0xff901e;0xffffff;false;false<br>
character=0x404000;0xffffff;false;false<br>
operator=0x301010;0xffffff;false;false<br>
identifier=0x000000;0xffffff;false;false<br>
backticks=0x000000;0xd0d0d0;false;false<br>
param=0x009f00;0xffffff;false;false<br>
scalar=0x105090;0xffffff;false;false<br>
error=0xff0000;0xffffff;false;false<br>
here_delim=0x000000;0xddd0dd;false;false<br>
here_q=0x7f007f;0xddd0dd;false;false<br>
<br>
<br>
[keywords]<br>
primary=at help plot set terminal eps png svg enhanced plot key top<br>
down left right label xlabel ylabel xrange yrange<br>
<br>
<br>
[settings]<br></blockquote><div><br></div><div>To get highlighting you need to specify a lexer using the lexer_filetypes setting, see <a href="http://www.geany.org/manual/current/index.html#settings-section">http://www.geany.org/manual/current/index.html#settings-section</a></div>
<div><br></div><div>Since there isn't a GNUPlot lexer you need to specify something "close enough".</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

# default extension used when saving files<br>
extension=plt<br>
<br>
# the following characters are these which a "word" can contains, see<br>
documentation<br>
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<br>
<br>
# single comments, like # in this file<br>
comment_single=#<br>
# multiline comments<br>
#comment_open=<br>
#comment_close=<br>
<br>
# set to false if a comment character/string should start a column 0<br>
of a line, true uses any<br>
# indentation of the line, e.g. setting to true causes the following<br>
on pressing CTRL+d<br>
        #command_example();<br>
# setting to false would generate this<br>
#       command_example();<br>
# This setting works only for single line comments<br>
comment_use_indent=true<br>
<br>
# context action command (please see Geany's main documentation for details)<br>
context_action_cmd=<br>
<br>
[indentation]<br>
#width=4<br>
# 0 is spaces, 1 is tabs, 2 is tab & spaces<br>
#type=1<br>
<br>
[build_settings]<br>
# %f will be replaced by the complete filename<br>
# %e will be replaced by the filename without extension<br>
# (use only one of it at one time)<br>
run_cmd="./%f"<br>
-------------------------- // --------------------------<br>
<br>
Thanks for the help.<br>
<br>
Cheers,<br>
Daniel.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br></div></div></div>