Yes should be possible, Geany has Highlighting for Freebasic, this is what I use.
unfortunatly ";" is not recognizid as an Command thats why because of the font I use the difference between ";" and ":" is near to unvisible
The Screenshot is zoomed, in Original it's smaller :-)
I use the "highlighting" file created by Trev which he generated by outputting all the keywords for GCB. I did post my copy of this modified for Geany onto the forum as I had to modify it to use all lower case.
I have Geany set up to use a colour scheme which makes comments very obvious:
This reduces some of the silliness that I create for myself...
hhm, editing the ~/.config/geany/filedefs/filetypes.freebasic was no Mystery. It works now for the GCB special Keywords also.
But the Comments are still the same. How did you do that?
Please show your the Content of filetypes.freebasic for this
Mine is: # single comments, like # in this file
comment_single=' ;
I changed the original comment_single='
but this has no effect
The editor here messed it up, so I wonder why does ; not work for me ..
My Geany is 1.33
Last edit: bed 2020-04-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Small addition: I will simply replace the ";" with "'", I find a semicolon as comment separator extremely unusual anyway.
After all, in many other programming languages the semicolon is part of the syntax.
Somewhere I had read the reason why semicolons were used in Great Cow Basic... ...I can't find at the moment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Changing that as you did, had no effect at all for me either. I tried to add the semicolon into the same line as you did (replacing or in addition to the single quotation mark) and it did nothing. I think it is overridden in another config file. I couldn't be bothered to look for it at the time, but as you've asked... Give me a minute and I'll see if I can find it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No. Sorry, I can't seem to find it anywhere. There are at least two copies of the "filetypes" file on my Mac. If I delete both I lose all syntax highlighting but editing either one, both or none changes nothing.
I've also tried deleting the filetypes.conf file(s), leaving only one entry in there but still it refuses to change from a single quote. Good job that's my preferred coment indicator.
There must be something I'm missing somewhere, but I just can't see it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Only trouble with this is that in the dark theme, compiler messages and warnings are difficult to see against the dark background. If you find this to be the case, I can ad vise you that changing the value of background-color in this section from #242424 (or it may have been #333333) to #0000f0 makes the messages rather more visible:
Modifying the line in the FreeBasic filetypes configuration file for Geany like this:
#singlecomments,like#inthisfilecomment_single=' ;
Seems to have no effect on initial testing.
What it actually does affects the context sensitive command "toggle comments" in highlighted text.
If you change the line in the configuration file to:
#singlecomments,like#inthisfilecomment_single=?;
Any lines that are highlighted when the "Cmd+E" [macOS - Linux may be different] keys are pressed will result in the highlighted lines of code having "?" prepended to them.
Normal comments would look like this:
'Brightness now set in "Idle" mode'If Item = S_Brt Then'Let Minim = 0'Let Maxim = 5'Let BrightValue = Adjust'#IfDef UseLCD'PrintAdjust(1)'Print "Bright "'Locate 1, 14'Print BrightValue'#EndIf'If LastBrightness <> BrightValue Then'Set_Colours'Show_WS2812Time(ShowTime) 'Show the clock with the new brightness levels'Wait 2 S'Let LastBrightness = BrightValue'End If'End If
Comments toggled using the change in the config file to use "?" for single comments results in this:
?Brightnessnowsetin"Idle"mode?IfItem=S_BrtThen?LetMinim=0?LetMaxim=5?LetBrightValue=Adjust?#IfDefUseLCD?PrintAdjust(1)?Print"Bright "?Locate1,14?PrintBrightValue?#EndIf?IfLastBrightness<>BrightValueThen?Set_Colours?Show_WS2812Time(ShowTime)'Show the clock with the new brightness levels?Wait2S?LetLastBrightness=BrightValue?EndIf?EndIf
Hope that helps someone.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In a big Source Code I used many waits ..
so far so good.
In this 3 line is an error, do you find it?
it comes to several syntax Errors:
The Error is in the #define are you seeing it?
I was about to build a Demo File for Debug submitting, then... BANG I found it myself ;-)
It tooks me 1 hour :-(
It was a ":" instead of ";" as Comment separator ........
Ps: here it is correctly hilighted, which was not the case in Geany :-(
Which goes to show that Highlighting is not just to make the code look Pretty.
Any chance of porting the Highlighter file to Geany ?
Yes should be possible, Geany has Highlighting for Freebasic, this is what I use.
unfortunatly ";" is not recognizid as an Command thats why because of the font I use the difference between ";" and ":" is near to unvisible
The Screenshot is zoomed, in Original it's smaller :-)
Last edit: bed 2020-04-22
I use the "highlighting" file created by Trev which he generated by outputting all the keywords for GCB. I did post my copy of this modified for Geany onto the forum as I had to modify it to use all lower case.
I have Geany set up to use a colour scheme which makes comments very obvious:
This reduces some of the silliness that I create for myself...
Last edit: mkstevo 2020-04-24
I had overseen that :-(
Will apply it immediatly
hhm, editing the ~/.config/geany/filedefs/filetypes.freebasic was no Mystery. It works now for the GCB special Keywords also.
But the Comments are still the same. How did you do that?
Please show your the Content of filetypes.freebasic for this
Mine is:
# single comments, like # in this file comment_single=' ;
I changed the original comment_single='
but this has no effect
The editor here messed it up, so I wonder why does ; not work for me ..
My Geany is 1.33
Last edit: bed 2020-04-26
Small addition: I will simply replace the ";" with "'", I find a semicolon as comment separator extremely unusual anyway.
After all, in many other programming languages the semicolon is part of the syntax.
Somewhere I had read the reason why semicolons were used in Great Cow Basic... ...I can't find at the moment.
Changing that as you did, had no effect at all for me either. I tried to add the semicolon into the same line as you did (replacing or in addition to the single quotation mark) and it did nothing. I think it is overridden in another config file. I couldn't be bothered to look for it at the time, but as you've asked... Give me a minute and I'll see if I can find it.
No. Sorry, I can't seem to find it anywhere. There are at least two copies of the "filetypes" file on my Mac. If I delete both I lose all syntax highlighting but editing either one, both or none changes nothing.
I've also tried deleting the filetypes.conf file(s), leaving only one entry in there but still it refuses to change from a single quote. Good job that's my preferred coment indicator.
There must be something I'm missing somewhere, but I just can't see it.
In the meantime I eliminated the ugly ";" so every thing is fins, thaanx for your time anyway :-)
There is a new version of Geany. V1.3.6
This has a very good looking dark theme.
Only trouble with this is that in the dark theme, compiler messages and warnings are difficult to see against the dark background. If you find this to be the case, I can ad vise you that changing the value of background-color in this section from #242424 (or it may have been #333333) to #0000f0 makes the messages rather more visible:
Modifying the line in the FreeBasic filetypes configuration file for Geany like this:
Seems to have no effect on initial testing.
What it actually does affects the context sensitive command "toggle comments" in highlighted text.
If you change the line in the configuration file to:
Any lines that are highlighted when the "Cmd+E" [macOS - Linux may be different] keys are pressed will result in the highlighted lines of code having "?" prepended to them.
Normal comments would look like this:
Comments toggled using the change in the config file to use "?" for single comments results in this:
Hope that helps someone.
The managed Reserved words will be in the next release, meanwhile here is the file prior to the release. https://sourceforge.net/p/gcbasic/code/HEAD/tree/GCBASIC/trunk/reservedwords.txt
This is much larger. We, specificially Jim Giordano, has spent many hours creating this master reservedword list.
Enjoy