On 13-10-19 06:46 AM, Dennis Drescher wrote:
Hi,
I am new to the Geany IDE but I am really liking it. I am using it in Ubuntu. One particular application I want to adapt if for requires color highlighting. I am tying to work through the user manual ( http://www.geany.org/manual/current/index.html#lexer-filetype) but admittedly, it is a steep learning curve for me. I have created color highlighting/syntax for this same application in Gedit but their system is totally different. I think Geany will be a much better environment if I can get color highlighting working.
I created a custom filetypes file (a copy of the filetypes.latex) and put it in the .config/geany/filedefs folder. I added the type to the filedefs_extensions.conf and I am trying to edit the filetypes.usfm to get the
Rename it to filetypes.USFM.conf and make sure the one you added to filetypes_extensions.conf has the same exact name 'USFM' as in the .conf filename.
Also just to be sure, you copied filedefs_extensions.conf into ~/.config/geany or you edited the system-wide one in-place as root or something?
color highlighting to start working. To start, I have edited these two sections:
[keywords] # all items must be in one line primary=\id \h \toc1 \mt1
I'm not really sure but you might need to escape those backslashes to prevent the configuration file parser from interpreting them as escape sequences like `\id \h \toc1` etc.
[settings] # default extension used when saving files extension=usfm
I think you might also need these two in [settings] group:
lexer_filetype=LaTeX tag_parser=LaTeX
This is a sample of data I am testing with:
\id cid \h heading \toc1 Table of Contents \mt1 Main Title
So far I have not had any success getting any markers to "light up". Any suggestions on what I should do next. Thanks in advance for any help anyone can give.
Geany often dumps useful information onto terminal which can also be accessed from Help->Debug Messages. You might find something noteworthy in there.
Cheers, Matthew Brush
On 20 October 2013 00:46, Dennis Drescher dennis@dreschers.info wrote:
Hi,
I am new to the Geany IDE but I am really liking it. I am using it in Ubuntu. One particular application I want to adapt if for requires color highlighting. I am tying to work through the user manual ( http://www.geany.org/manual/current/index.html#lexer-filetype) but admittedly, it is a steep learning curve for me. I have created color highlighting/syntax for this same application in Gedit but their system is totally different. I think Geany will be a much better environment if I can get color highlighting working.
You need to read the section on making custom filetypes.
I created a custom filetypes file (a copy of the filetypes.latex) and put it in the .config/geany/filedefs folder. I added the type to the filedefs_extensions.conf and I am trying to edit the filetypes.usfm to get the color highlighting to start working. To start, I have edited these two sections:
[keywords] # all items must be in one line primary=\id \h \toc1 \mt1
If you use the latex lexer you don't need to put the backslashes.
[settings] # default extension used when saving files extension=usfm
You need to specify a lexer_filetype=latex setting so Geany knows how to identify parts of your file to highlight (assuming you copied filetypes.latex because latex is similar).
Regards Lex
This is a sample of data I am testing with:
\id cid \h heading \toc1 Table of Contents \mt1 Main Title
So far I have not had any success getting any markers to "light up". Any suggestions on what I should do next. Thanks in advance for any help anyone can give.
Kind regards,
Dennis
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users