Author Topic: Syntax highlighting file for Geany  (Read 2454 times)

Tomaaz

  • Guest
Syntax highlighting file for Geany
« on: 30. June 2013, 12:51:53 »
I could create a configuration file for Geany, but the question is - what about a file extension? Are you going to use something like .bb or .brb?

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: Syntax highlighting file for Geany
« Reply #1 on: 30. June 2013, 17:22:30 »
I had not planned on enforcing particular file extension.
As it stands now you can save your code with any file extension.

So, if you want, you can make a colorizer for .bb or .brb and anyone who uses Geany and and BrowserBasic can save and load with those extensions.


Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: Syntax highlighting file for Geany
« Reply #2 on: 30. June 2013, 17:30:20 »
here is the latest list of commands:

for next if then else elseif endif while wend rem var type select case default endselect function endfunction return break to as msgbox endtype rgb inputbox foreach step

rgb str$ lcase$ ucase$ left$ right$ mid$ mid replace$ trim$ ltrim$ rtrim$ space$ string$ len instr chr asc mod abs sgn int exp sqrt log cos sin tan atn atn2 rnd rand fix pow val min max ubound inputbox

print setfont getfont setbackgroundcolor getbackgroundcolor getalpha setalpha setcolor getwidth getheight setdimensions setlinewidth getlinewidth setlinecap getlinecap setimagesmoothing getimagesmoothing line strokerectangle fillrectangle strokecircle fillcircle strokearc fillarc strokepolygon fillpolygon setpixel getpixel draw drawcentered translate scale rotate push pop canvas imageload sprite spritesheet keydown mousex mousey mousepressed soundcanplay soundload soundplay soundpause soundstop soundinstances soundplayinginstances getexpirationtime setexpirationtime soundavailable soundcanplaytype medialoaded mediapending imagewidth imageheight imagedraw spritewidth spriteheight spritedraw clear spritesheet getsprite animation animationupdate setanimationsprite getanimationsprite touchavailable touchpressed

Tomaaz

  • Guest
Re: Syntax highlighting file for Geany
« Reply #3 on: 30. June 2013, 17:33:23 »
Thanx! :) What about build commands?

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: Syntax highlighting file for Geany
« Reply #4 on: 30. June 2013, 17:39:33 »
Not sure I get you on this one.
If you mean how to build, it is just browserbasic.exe <filename>
this outputs filename.html

Tomaaz

  • Guest
Re: Syntax highlighting file for Geany
« Reply #5 on: 30. June 2013, 17:42:42 »
That's exactly what I wanted. Thanx! :)

SteveOW

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: Syntax highlighting file for Geany
« Reply #6 on: 30. June 2013, 18:26:20 »
hey Tomaaz,

I had a quick try of Geany on Windows7 but when I try to navigate to open a folder it doesnt recognize folders beginning with underscore and it doesnt follow windows shortcuts (it tries to open them as files).

I couldnt find any relevant config options.

Should I give up? :-\

cheers,
SteveOW.

Tomaaz

  • Guest
Re: Syntax highlighting file for Geany
« Reply #7 on: 30. June 2013, 18:48:35 »
Steve, yes, it looks like Geany doesn't recognize windows shortcuts and I have no idea if there is a way to fix it. However it works properly with folders beginning with underscores on my computer. Strange...  ???

SteveOW

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: Syntax highlighting file for Geany
« Reply #8 on: 02. July 2013, 17:19:52 »
@Tomaaz
Somehow my Geany is now recognizing folders beginning with underscore, which is nice.
I really like the way Geany can list function links in a side panel.
I couldnt find a way to do that in PN.
If you get a BrowserBasic config working I would love to have a copy or instructions how.

cheers, SteveOW.

PS I vote for .bb as browserbasic filetype.
I think the shortname BB for BrowserBasic could really help it spread.

Tomaaz

  • Guest
Re: Syntax highlighting file for Geany
« Reply #9 on: 03. July 2013, 14:28:14 »
I have problem with making Geany work properly wit BrowBasic files. Syntax highlighting works, build commands work, code folding works, display on the side panel doesn't. :(

PS I vote for .bb as browserbasic filetype.
I think the shortname BB for BrowserBasic could really help it spread.

At the moment it looks like the file extension must have exactly 3 characters. If you use .bb the name of output file is cut on the right side. That's probably because BrowserBasic replaces last 4 characters of the original name (.txt) with the new ones (.html).

Guilect

  • Moderator
  • Full Member
  • *****
  • Posts: 110
    • View Profile
Re: Syntax highlighting file for Geany
« Reply #10 on: 04. July 2013, 01:37:14 »
@Tomaaz,

I have adjusted the way that BB looks at the filename.
Instead of removing a fixed number of characters from the end of the filename/extension;
BB now looks for the last occurrence of a "." and removes anything after that.
So in the next release, an extension of .bb should work fine.

Tomaaz

  • Guest
Re: Syntax highlighting file for Geany
« Reply #11 on: 12. July 2013, 01:57:10 »
Thanx Guilect! But I still haven't solved the problem with side panel. :( I'll keep trying. When BrowserBasic 1.0 is released I will post configuration files (with or without the side panel working).