Can someone please explain, how to style more than one "primary" list of keywords per filetype?
e.g. my filetypes.common is
... [named_styles] ... #word=0xff0000 #word2=0x00ff00 #word3=0x0000ff ...
and filetypes.mytype is
... [styling] ... word=0x00ffff word2=0xff00ff # word3=0xffff00 ... [keywords] primary=one two three secondary=four five six # ???=seven eight nine
Result is, everything is fine with my "primary" hilites. But I don't get any "secondary".
What if I want to have five or six differently styled keyword lists per filetype?
Wolfram
Am Montag, den 08.02.2010, 18:10 +0100 schrieb Wolfram Kläger:
Can someone please explain, how to style more than one "primary" list of keywords per filetype?
e.g. my filetypes.common is
... [named_styles] ... #word=0xff0000 #word2=0x00ff00 #word3=0x0000ff ...
and filetypes.mytype is
... [styling] ... word=0x00ffff word2=0xff00ff # word3=0xffff00 ... [keywords] primary=one two three secondary=four five six # ???=seven eight nine
Result is, everything is fine with my "primary" hilites. But I don't get any "secondary".
What if I want to have five or six differently styled keyword lists per filetype?
Wolfram
Hi Wolfram, I assume you are using Geany 0.18 at this present? - I'm afraid what you want to do is not possible yet, because Geany versions until 0.18 just know about word1 and word2 as far as I know. The method Geany works with those configuration files is getting some work at the present and it will be easier to set styles then. I'm not sure if it will be possible to customize the keywords then as you wish, but maybe the developers think it is a good idea to implement this.
In any case: Stay tuned for Geany 0.19!
Best Regards, Dominic
Am 08.02.2010 22:22, schrieb Dominic Hopf:
I assume you are using Geany 0.18 at this present? - I'm afraid what you want to do is not possible yet, because Geany versions until 0.18 just know about word1 and word2 as far as I know.
I am reading the manual etc. over and over again. Where is my mistake, when I cannot even setup my word2 style?
The method Geany works with those configuration files is getting some work at the present and it will be easier to set styles then. I'm not sure if it will be possible to customize the keywords then as you wish, but maybe the developers think it is a good idea to implement this.
In any case: Stay tuned for Geany 0.19!
Few days ago, I discovered Geany and decided to replace my longtime favorite EditPlus. If Geany is going to deliver more than two keyword styles, fine. If not, I'm certainly happy with it, anyway. But, if not done already, have a look at EP's
Preferences, Styles, Settings & Syntax
in conjunction with a typical *.stx config file. IMHO, this fits perfectly any keyword style needs, I can imagine.
Wolfram
On Mon, 08 Feb 2010 18:10:52 +0100 Wolfram Kläger wolfram.klaeger@web.de wrote:
Can someone please explain, how to style more than one "primary" list of keywords per filetype?
e.g. my filetypes.common is
... [named_styles] ... #word=0xff0000 #word2=0x00ff00 #word3=0x0000ff ...
BTW, Named styles are just names to use instead of style values in each of the filetypes.foo files.
and filetypes.mytype is
... [styling] ... word=0x00ffff word2=0xff00ff # word3=0xffff00 ... [keywords] primary=one two three secondary=four five six # ???=seven eight nine
Result is, everything is fine with my "primary" hilites. But I don't get any "secondary".
What if I want to have five or six differently styled keyword lists per filetype?
It depends on the filetype lexer used for syntax highlighting. Some support more than one keyword set. Have a look at the system filetype to see what entries are listed under keywords, those are the only ones you can override.
More generally, I would like Geany to by default separate type, constant and other keywords with different styles for each filetype that supports this. E.g. int red, __FUNC__ green and 'for' blue.
Regards, Nick
Am 09.02.2010 17:29, schrieb Nick Treleaven:
BTW, Named styles are just names to use instead of style values in each of the filetypes.foo files.
Yes. I feel like having understood this.
It depends on the filetype lexer used for syntax highlighting. Some support more than one keyword set. Have a look at the system filetype to see what entries are listed under keywords, those are the only ones you can override.
Unfortunately, I'm not sure how to understand this. I tried to twiddle the filetypes.pascal settings. Looking at the original file, the style list is
[styling]
# foreground;background;bold;italic default=0x000000;0xffffff;false;false identifier=0x000000;0xffffff;false;false comment=0xd00000;0xffffff;false;false comment2=0x3f5fbf;0xffffff;false;false commentline=0xd00000;0xffffff;false;false preprocessor=0x007f7f;0xffffff;false;false preprocessor2=0x007f7f;0xffffff;false;false number=0x007F00;0xffffff;false;false hexnumber=0x007F00;0xffffff;false;false word=0x111199;0xffffff;true;false string=0xff901e;0xffffff;false;false stringeol=0x000000;0xe0c0e0;false;false character=0x404000;0xffffff;false;false operator=0x301010;0xffffff;false;false asm=0x804080;0xffffff;false;false
I am allowed to adjust the style "word", but I am not allowed to introduce a new line
word2=0xsomething
right?
If I was a C programmer, for instance, I were lucky and could adjust both predefined styles, "word" and "word2", right?
If it's that easy, just throw a couple of
word*....
lines in all filetype specs, please!
But don't forget to update the manual, how I am supposed to assign these styles in my [keywords] section :)
Wolfram
On Tue, 09 Feb 2010 20:45:45 +0100 Wolfram Kläger wolfram.klaeger@web.de wrote:
It depends on the filetype lexer used for syntax highlighting. Some support more than one keyword set. Have a look at the system filetype to see what entries are listed under keywords, those are the only ones you can override.
Unfortunately, I'm not sure how to understand this. I tried to twiddle the filetypes.pascal settings.
I said to look under keywords:
[keywords] # all items must be in one line primary=absolute abstract add and array as asm assembler automated begin byte ca se cdecl char...
There is only the 'primary' keyword set there, so for Pascal there is only one keyword set possible, hence no word2 style.
To take another example, C:
[keywords] # all items must be in one line primary=asm auto ... secondary= # these are some doxygen keywords (incomplete) docComment=attent...
The C scintilla lexer supports 3 keyword sets, so there are three corresponding styles: word word2 commentdockeyword
Looking at the original file, the style list is
[styling]
# foreground;background;bold;italic default=0x000000;0xffffff;false;false identifier=0x000000;0xffffff;false;false comment=0xd00000;0xffffff;false;false comment2=0x3f5fbf;0xffffff;false;false commentline=0xd00000;0xffffff;false;false preprocessor=0x007f7f;0xffffff;false;false preprocessor2=0x007f7f;0xffffff;false;false number=0x007F00;0xffffff;false;false hexnumber=0x007F00;0xffffff;false;false word=0x111199;0xffffff;true;false string=0xff901e;0xffffff;false;false stringeol=0x000000;0xe0c0e0;false;false character=0x404000;0xffffff;false;false operator=0x301010;0xffffff;false;false asm=0x804080;0xffffff;false;false
I am allowed to adjust the style "word", but I am not allowed to introduce a new line
word2=0xsomething
right?
If I was a C programmer, for instance, I were lucky and could adjust both predefined styles, "word" and "word2", right?
If it's that easy, just throw a couple of
word*....
lines in all filetype specs, please!
It's not that easy, the Scintilla (editing component) only supports a fixed set of keywords for each lexer, some only have one. It could be that Geany doesn't support all of the Scintilla keyword sets, but usually we are quite up to date.
But don't forget to update the manual, how I am supposed to assign these styles in my [keywords] section :)
http://www.geany.org/manual/dev/index.html#keywords-section
What else should we add?
Regards, Nick
Hi, I just found interesting bug, when Geany outputs whole file into search results.
Steps to reproduce: 1) Place the attached file in some directory. 2) Try 'search in files' in that directory. Search for keyword 'ini_set'. 3) Whole file should appear in messages/search results.
Version: 0.18
Best regards Daniel
On Wed, 10 Feb 2010 17:21:29 +0100 Daniel Milde info@milde.cz wrote:
I just found interesting bug, when Geany outputs whole file into search results.
Steps to reproduce:
- Place the attached file in some directory.
- Try 'search in files' in that directory. Search for keyword
'ini_set'. 3) Whole file should appear in messages/search results.
Strange. This may be a grep bug. If I run the command: grep ini_set *
from a terminal then the whole file is not shown like in Geany, but even so the lines don't seem to be correct matching lines.
What's even stranger is that ack and pcregrep also have this problem and the file seems to be UTF-8.
Aha - just tried looking at the file with less/cat and it seems there may be strange line endings. This is confusing grep.
Regards, Nick
P.S. BTW your email should have been in a new thread - it's not a reply.
Nick Treleaven píše v St 10. 02. 2010 v 17:13 +0000:
On Wed, 10 Feb 2010 17:21:29 +0100 Daniel Milde info@milde.cz wrote:
I just found interesting bug, when Geany outputs whole file into search results.
Steps to reproduce:
- Place the attached file in some directory.
- Try 'search in files' in that directory. Search for keyword
'ini_set'. 3) Whole file should appear in messages/search results.
Strange. This may be a grep bug. If I run the command: grep ini_set *
from a terminal then the whole file is not shown like in Geany, but even so the lines don't seem to be correct matching lines.
What's even stranger is that ack and pcregrep also have this problem and the file seems to be UTF-8.
Aha - just tried looking at the file with less/cat and it seems there may be strange line endings. This is confusing grep.
Regards, Nick
P.S. BTW your email should have been in a new thread - it's not a reply. _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Ah, that's it :) That are Mac line endings.
I was glad that I finally found a Geany bug and again nothing :) Thanks
Regards Daniel
On Wed, 10 Feb 2010 18:51:31 +0100 Daniel Milde info@milde.cz wrote:
Aha - just tried looking at the file with less/cat and it seems there may be strange line endings. This is confusing grep.
Regards, Nick
P.S. BTW your email should have been in a new thread - it's not a reply. _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Ah, that's it :) That are Mac line endings.
I was glad that I finally found a Geany bug and again nothing :)
Well, this is kind of a bug in our Find in Files design of using grep as ideally it would work with mac line endings, but I'm not sure what to do about it.
Regards, Nick
Am 10.02.2010 13:23, schrieb Nick Treleaven:
There is only the 'primary' keyword set there, so for Pascal there is only one keyword set possible, hence no word2 style.
Thanks for confirmation.
http://www.geany.org/manual/dev/index.html#keywords-section
What else should we add?
Nothing. I just couldn't believe it. But probably somebody has some reason to restrict this or that language this or that way.
As mentioned above, EditPlus has a charming simple and universal solution. To whomever it may concern, have a look and see, how easy it is to provide any number of stylings for any filetype, including a user-defined set of consistent stylenames.
I don't know Scintilla, didn't even notice, that Geany depends from it. But maybe there is a chance to unify all these lexers by one and only one set of generic styles. Since, at least as I know various programming and scripting languages, they differ in appropriate stylenames, but not in the number of usefully applicable styles.
Wolfram
Am 10.02.2010 13:23, schrieb Nick Treleaven:
http://www.geany.org/manual/dev/index.html#keywords-section
What else should we add?
The manual should make clear, that users are not supposed to edit anything within the [keywords] section of filetypes.*.
By trial and error, I figured out, that it is useless to modify or extend the preset list of keywords, apparently a very rough subset of the Pascal.API list of Scite, according to
http://scite-interest.googlegroups.com/web/pascal.api
With Geany, standard constants, variables and types like Boolean, Integer etc. are missing. As well as standard functions and procedures.
Taking into account all the compiler-specific peculiarities, e.g. Delphi vs. FreePascal, is there any chance to see a forthcoming Geany version, that will support user-editable keyword lists?
Wolfram
On Thu, 11 Feb 2010 13:41:31 +0100 Wolfram Kläger wolfram.klaeger@web.de wrote:
The manual should make clear, that users are not supposed to edit anything within the [keywords] section of filetypes.*.
You can edit existing sets of keywords, you just can't add your own ones.
By trial and error, I figured out, that it is useless to modify or extend the preset list of keywords, apparently a very rough subset of the Pascal.API list of Scite, according to
http://scite-interest.googlegroups.com/web/pascal.api
With Geany, standard constants, variables and types like Boolean, Integer etc. are missing. As well as standard functions and procedures.
As only one keyword set is supported, I don't think you want functions/procedures/variables highlighted the same as keywords, but maybe we could add the standard types. Do you want to make a patch?
Taking into account all the compiler-specific peculiarities, e.g. Delphi vs. FreePascal, is there any chance to see a forthcoming Geany version, that will support user-editable keyword lists?
This is already supported - see above.
If you want to request other keyword styles at the Scintilla project, go ahead.
Regards, Nick
Am 11.02.2010 18:54, schrieb Nick Treleaven:
On Thu, 11 Feb 2010 13:41:31 +0100 Wolfram Klägerwolfram.klaeger@web.de wrote:
The manual should make clear, that users are not supposed to edit anything within the [keywords] section of filetypes.*.
You can edit existing sets of keywords, you just can't add your own ones.
You are kidding.
If you want to request other keyword styles at the Scintilla project, go ahead.
You mean, request word by word? And allover again, if I change my mind?
Thanks Wolfram
On Thu, 11 Feb 2010 20:40:44 +0100, Wolfram wrote:
Am 11.02.2010 18:54, schrieb Nick Treleaven:
On Thu, 11 Feb 2010 13:41:31 +0100 Wolfram Klägerwolfram.klaeger@web.de wrote:
The manual should make clear, that users are not supposed to edit anything within the [keywords] section of filetypes.*.
You can edit existing sets of keywords, you just can't add your own ones.
You are kidding.
If you want to request other keyword styles at the Scintilla project, go ahead.
You mean, request word by word? And allover again, if I change my mind?
Just for record, Wolfram unsubscribed from the list, so if anyone wants to answer, CC him.
Regards, Enrico