1. Adding /* */ to Geany

Can someone explain how to enable Geany to recognize the multi-line comment brackets (/* */) in Euphoria code?

Thanks!

new topic     » topic index » view message » categorize

2. Re: Adding /* */ to Geany

euphoric said...

Can someone explain how to enable Geany to recognize the multi-line comment brackets (/* */) in Euphoria code?

Thanks!

-- in filetypes.euphoria or filetypes.lua, set: 
 
comment_open=/* 

comment_close=*/ 
 
-- unfortunately, I think you can have to use either the double dash, 
-- "Euphoria Classic" method, 
comment_open = --  
-- in which case you leave the comment_close assignment blank: 
comment_close =  
or 
comment_open=/* 

comment_close =*/ 

Hope this helps.

Ken

new topic     » goto parent     » topic index » view message » categorize

3. Re: Adding /* */ to Geany

OK, with that, I found a file called "filetypes.Euphoria.conf" that contains this:

comment_single=-- 
# this is an alternative way, so multiline comments are used 
comment_open=/* 
comment_close=*/ 

Looks like it's almost setup to handle both cases... Maybe the filetypes.Euphoria.conf file isn't in the right place and/or isn't being utilized. The file is in c:\users\owner\AppData\Roaming\geany\filedefs.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Adding /* */ to Geany

euphoric said...

OK, with that, I found a file called "filetypes.Euphoria.conf" that contains this:

comment_single=-- 
# this is an alternative way, so multiline comments are used 
comment_open=/* 
comment_close=*/ 

Looks like it's almost setup to handle both cases... Maybe the filetypes.Euphoria.conf file isn't in the right place and/or isn't being utilized. The file is in c:\users\owner\AppData\Roaming\geany\filedefs.

From Geany's Help Manual:

Configuration files

Warning

You must use UTF-8 encoding without BOM for configuration files.

Configuration file paths

Geany has default configuration files installed for the system and also per-user configuration files.

The system files should not normally be edited because they will be overwritten when upgrading Geany.

The user configuration directory can be overridden with the -c switch, but this is not normally done. See Command line options.

Note

Any missing subdirectories in the user configuration directory will be created when Geany starts.

You can check the paths Geany is using with Help->Debug Messages. Near the top there should be 2 lines with something like:

Geany-INFO: System data dir: /usr/share/geany Geany-INFO: User config dir: /home/username/.config/geany Paths on Unix-like systems

The system path is $prefix/share/geany, where $prefix is the path where Geany is installed (see Installation prefix).

The user configuration directory is normally: /home/username/.config/geany

Paths on Windows

The system path is the data subfolder of the installation path on Windows.

The user configuration directory might vary, but on Windows XP it's: C:\Documents and Settings\UserName\Application Data\geany

Tools menu items

There's a Configuration files submenu in the Tools menu that contains items for some of the available user configuration files. Clicking on one opens it in the editor for you to update. Geany will reload the file after you have saved it.

Note

Other configuration files not shown here will need to be opened manually, and will not be automatically reloaded when saved. (see Reload Configuration below).

There's also a Reload Configuration item which can be used if you updated one of the other configuration files, or modified or added template files.

Reload Configuration is also necessary to update syntax highlighting colors.

Note

Syntax highlighting colors aren't updated in open documents after saving filetypes.common as this may take a significant amount of time.

Global configuration file

System administrators can add a global configuration file for Geany which will be used when starting Geany and a user configuration file does not exist.

The global configuration file is read from geany.conf in the system configuration path - see Configuration file paths. It can contain any settings which are found in the usual configuration file created by Geany, but does not have to contain all settings.

Note

This feature is mainly intended for package maintainers or system admins who want to set up Geany in a multi user environment and set some sane default values for this environment. Usually users won't need to do that.

Filetype definition files

All color definitions and other filetype specific settings are stored in the filetype definition files. Those settings are colors for syntax highlighting, general settings like comment characters or word delimiter characters as well as compiler and linker settings.

See also Configuration file paths.

Filenames

Each filetype has a corresponding filetype definition file. The format for built-in filetype Foo is:

filetypes.foo The extension is normally just the filetype name in lower case.

However there are some exceptions:

Filetype Extension C cpp C# cs Make makefile Matlab/Octave matlab There is also the special file filetypes.common.

For custom filetypes, the filename for Foo is different:

filetypes.Foo.conf See the link for details.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Adding /* */ to Geany

It seems my config files are all set up properly, but the multi-line commenting isn't highlighting properly.

The snippets work. The syntax coloring for single-line comments work. So why not multi-line? How do I specify the color for multi-line comments syntax highlighting?

new topic     » goto parent     » topic index » view message » categorize

6. Re: Adding /* */ to Geany

euphoric said...

It seems my config files are all set up properly, but the multi-line commenting isn't highlighting properly.

The snippets work. The syntax coloring for single-line comments work. So why not multi-line? How do I specify the color for multi-line comments syntax highlighting?

I have in the past tinkered with Geany and gotten multi line comments to work, but the regular single line comments didn't. I think (hope I'm wrong) that you can't have both single line and multi line comments working at the same time.

new topic     » goto parent     » topic index » view message » categorize

7. Re: Adding /* */ to Geany

irv said...
euphoric said...

It seems my config files are all set up properly, but the multi-line commenting isn't highlighting properly.

The snippets work. The syntax coloring for single-line comments work. So why not multi-line? How do I specify the color for multi-line comments syntax highlighting?

I have in the past tinkered with Geany and gotten multi line comments to work, but the regular single line comments didn't. I think (hope I'm wrong) that you can't have both single line and multi line comments working at the same time.

I have not been able to get both working at the same time. I take that back... the multi-line comments will work, but the color is black or dark grey, while the euphoria comments display correctly, in red.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu