Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 May 2013, 13:47
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
scite-hacking trying to add BaCon & HUG highlighting
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Wed 05 Oct 2011, 10:47    Post subject:  scite-hacking trying to add BaCon & HUG highlighting
Subject description: looking for an official Bacon filetype
 

I hacked at the scite /scintilla properties tying to add BaCon & HUG highlighting


*Well some may have seen that I added Bacon /HUG Highlighting to geany and you can also compile from the geany GUI unofficially it was a hack (using a chainsaw) but it works nicely

but in order to someday (I hope) we can get an official Bacon /HUG highlighting for geany and scite
or at the least get the ball rolling in that direction

I thought this would be easier to do but it wasnt I spent three days just to get a simple hack going
there are a lot of files to look through but.. seeing it can be done may motivate someone
else
who likes to code in C and do it the "right way"

there are some really nice advantages using scite for the documentation of help pages
or how to's to see the highlighted keywords in your source code
you can export BaCon code to HTML ,RTF , PDF ,LaTeX, XML Very Happy

I could have stripped out the properties files to reduce the size
but that would be counter productive for exporting all the code type highlighting
to HTML ,RTF , PDF ,LaTeX, XML

this is alpha-hacked feedback needed to improve things

*I will clean things up a bit then upload the modified sources with a diff*

Joe
export-as .png
 Description   
 Filesize   40.69 KB
 Viewed   402 Time(s)

export-as .png

scite-bacon-highlighting.png
 Description   
 Filesize   152.65 KB
 Viewed   389 Time(s)

scite-bacon-highlighting.png


_________________
slackware 14

Last edited by big_bass on Fri 07 Oct 2011, 00:01; edited 3 times in total
Back to top
View user's profile Send private message 
GatorDog


Joined: 12 Sep 2006
Posts: 136

PostPosted: Wed 05 Oct 2011, 16:13    Post subject:  

big_bass,
Quote:
this is alpha-hacked, feedback needed ...

How to change scite font and size? It's too small for my screen resolution setup.
I looked for a menu item and a .config file but could not find a way to change font and size.
The "use monospace font" option gives a very washed out/faded font.
From the scite help, I tried: SciTE "-font.base=font:Monospace,size:14"
but that produced odd behavior, invisible? text.
Edit: Found "font" in Options/Global settings, but no change, (restarted scite).
_______________________________

HUG and Bacon specific keywords are not highlighted yet?
For example, REPEAT, LOCAL, ENABLE, SHOW, READLN ...
LANGUAGE/FREEBASIC didn't seem to effect it.

Common basic keywords like IF, SELECT, CASE, REM, SUB, END, WHILE ... are highlighted.

Some variable string names highlighted, most are not.

And compile not implemented yet?

Scite seems a little sluggish in navigating a large program.

GatorDog
Back to top
View user's profile Send private message 
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Wed 05 Oct 2011, 16:44    Post subject:  

Hey GatorDog

what I do for text size is the same I do for the browsers
and that is the old fashioned keyboard combo Ctrl + + or Ctrl --
to adjust the size quickly

I havent played around with the fonts yet but that should be documented
somewhere most likely in the global.properties ?

the main selling point of scite is making color coded files
for documentaion

I use geany for compiling and everyday work

I think it is possible to add a compile option because C code
has an option to compile its a matter of digging in a little deeper

the second reason is geany recomends you get a filetype
working for scite first then they can modify a new one for geany


thanks for trying I will work on all the points you suggested

I am learning more about this as I go



Joe

_________________
slackware 14
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1231
Location: Ukraine

PostPosted: Wed 05 Oct 2011, 17:12    Post subject:  

Dear GatorDog and Joe,

I changed the global settings for font and other things (statusbar on, taskbar on, size etc). The font settinsgs are around line 402 of the Global options file:

Code:
if PLAT_GTK
   font.base=font:!DejaVu Sans Mono,size:13
   font.small=font:!DejaVu Sans,size:11
   font.comment=font:!DejaVu Sans,size:13
   font.code.comment.box=$(font.comment)
   font.code.comment.line=$(font.comment)
   font.code.comment.doc=$(font.comment)
   font.code.comment.nested=$(font.comment)
   font.text=font:!DejaVu Sans,size:13
   font.text.comment=font:!DejaVu Sans,size:13
   font.embedded.base=font:!DejaVu Sans,size:13
   font.embedded.comment=font:!DejaVu Sans,size:13
   font.monospace=font:!DejaVu Sans Mono,size:13
   font.vbs=font:!DejaVu Sans Mono,size:13


I will also have a look regarding keywords and compile options for baCon in Scite.

Thanks Joe...

With kind regards,
vovchik
Back to top
View user's profile Send private message 
GatorDog


Joined: 12 Sep 2006
Posts: 136

PostPosted: Wed 05 Oct 2011, 17:40    Post subject:  

Code:
if PLAT_GTK
   font.base=font:!DejaVu Sans Mono,size:13
   font.small=font:!DejaVu Sans,size:11
   font.comment............
<snip>
Made all the difference in the world. Very Happy
Had to use "Liberation Mono", evidently "DejaVu Sans Mono" not on my system.

The tabs spacing is rather large. Three tabs pretty much puts you half way across the page.
While editing, tried changing the tabs.
Code:
# Indentation
tabsize=8
indent.size=8

to-

# Indentation
tabsize=3
indent.size=3
That didn't seem to effect it.

TTFN
rod
Back to top
View user's profile Send private message 
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Thu 06 Oct 2011, 10:43    Post subject:  

hey guys
thanks for the help

I need to recompile from source again Confused
but no problem I have some free time Friday

geany development
Code:
We try to use an unmodified version of Scintilla -
 any new lexers or other changes should be passed on to
the maintainers at http://scintilla.org. We normally update
to a new Scintilla release shortly after one is made. See also scintilla/README.




the freebasic isnt working with the mods
it is getting the color from visual basic instead this is why
only some keywords are seen (this took me awhile to figure out)

but will keep at it this looks interesting
that you can modify the keywords
maybe we can make a super light Bacon only
viewer if we keep at it

edit this file to get a smaller box size
/usr/share/scite/SciTEGlobal.properties

Code:
if PLAT_GTK
   position.left=5
   position.top=22
position.width=376
position.height=540


I took 200 off each the preset values they were 576 and 740
Joe

_________________
slackware 14
Back to top
View user's profile Send private message 
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Thu 06 Oct 2011, 23:56    Post subject:  

http://www.murga-linux.com/puppy/viewtopic.php?t=72399here is the scite package I compiled and un edited sources except for the *.desktop file and used a slack.desc

http://www.puppy2.org/slaxer/scite-2.29-i486-2.tgz

this way we all start at the same place and all line numbers match up and we can diff to this
package /original sources so that we we have a clean reference point

Joe

its easier to write my own keyword generator and have it output phpbb code
so I can post in the forum here is a start
http://www.murga-linux.com/puppy/viewtopic.php?t=72399

*will come back to this and finish it off

_________________
slackware 14
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0668s ][ Queries: 13 (0.0068s) ][ GZIP on ]