Hello
I am using Red Hat 5, and I would like to use Geany for editing text files for a very specific purpose (data files used for defining numerical simulations). As such, I need to define a whole new configuration file with specific keywords for syntax highlighting as well as code folding or for the tags of the symbol list.
As I understood from the documentations of the release 0.20, it is very easy to modifiy an existing configuration file, but it seems to be harder to build a new configuration file from scratch and include it in the Geany interface (not in place of an existing one, but as a new one added to the available language choices).
Please could you tell me if this is feasible, and if so, how ?
Best regards,
Thomas Puech # " Ce courriel et les documents qui lui sont joints peuvent contenir des informations confidentielles ou ayant un caractère privé. S'ils ne vous sont pas destinés, nous vous signalons qu'il est strictement interdit de les divulguer, de les reproduire ou d'en utiliser de quelque manière que ce soit le contenu. Si ce message vous a été transmis par erreur, merci d'en informer l'expéditeur et de supprimer immédiatement de votre système informatique ce courriel ainsi que tous les documents qui y sont attachés." ****** " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system." #
On Fri, Jan 20, 2012 at 2:35 AM, thomas.puech@snecma.fr wrote:
Hello
I am using Red Hat 5, and I would like to use Geany for editing text files for a very specific purpose (data files used for defining numerical simulations). As such, I need to define a whole new configuration file with specific keywords for syntax highlighting as well as code folding or for the tags of the symbol list.
As I understood from the documentations of the release 0.20, it is very easy to modifiy an existing configuration file, but it seems to be harder to build a new configuration file from scratch and include it in the Geany interface (not in place of an existing one, but as a new one added to the available language choices).
Please could you tell me if this is feasible, and if so, how ?
I'm presuming that you mant syntax highlighting. To do that you need to have more than just the filetype file. How much depends on your target language:
1. you need lexical analyser code in the Scintilla editing widget Geany uses and a mapping in sciwrappers.h from the states the lexer determines to the style names that are used in filetype files
2. you need to add a new filetype to Geany in filetypes.c and add the extensions to filetypes.extensions
3. you need a filetypes file
But there are shortcuts
1. if you can use the lexer from a language already in Geany then you only need a custom filetype, see the manual.
2. if you can use a lexer already in scintilla but not included in Geany you only need the wrappers and filetypes.c additions. Follow the examples of existing languages.
Otherwise you need to write the C++ code for the lexer and add it to Scintilla first.
Its all possible, but how much work depends on the level you need.
Cheers Lex
On 01/19/2012 07:35 AM, thomas.puech@snecma.fr wrote:
Hello
I am using Red Hat 5, and I would like to use Geany for editing text files for a very specific purpose (data files used for defining numerical simulations). As such, I need to define a whole new configuration file with specific keywords for syntax highlighting as well as code folding or for the tags of the symbol list.
As I understood from the documentations of the release 0.20, it is very easy to modifiy an existing configuration file, but it seems to be harder to build a new configuration file from scratch and include it in the Geany interface (not in place of an existing one, but as a new one added to the available language choices).
Please could you tell me if this is feasible, and if so, how ?
Hi,
The HACKING[1] file has a very basic (but complete) list of things that need to be done to add a filetype. It doesn't go into great detail but if you have any specific questions, always feel free to ask. The geany-devel mailing list may be more appropriate for specific questions about the code.
" This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
Heh, funny since your mail will end up in multiple publicly available archives visible to the world and indexed by search engines :)
Cheers, Matthew Brush