OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: Armagon on June 02, 2006, 03:59:30 pm

Title: Making Scite More Useable
Post by: Armagon on June 02, 2006, 03:59:30 pm
SciTE has some problems, when used under pdaXrom, but I've managed to fix some of them, and am posting my new configuration file here.

Before you use my file, though, note that it will cause problems with the version of SciTE in beta 1 (and possibly beta 2).  I am using beta 1, and found that changing the fonts to support antialiasing causes some issues where the text was not placed on the screen correctly.  Fortunately, I was able to uninstall SciTE and then install the SciTE from the Beta 3 feed onto my pdaXrom Beta 1.  [I have no idea if Beta 2 users will need to update, but I expect that if they do, this would work fine.  I also expect that trying to install SciTE from Beta 4 will not work on versions of pdaXrom before Beta 4.]  If you don't want to upgrade, though, read the rest of the message and remove the exclamation marks in front of the font names on your copy of the file -- that should work.

Now then, the configuration file should be called /usr/share/scite/SciTEGlobal.properties.  It is a good idea to back up your copy first!

You can also easily edit this file within SciTE, by choosing Options -> Open Global Options File on the menu.  Most of the changes you make will be applied immediately when you save the file.

I hope the new settings work well for you.

---------------

In addition to posting my new file, I'm going to show what I've changed here so you can make your own edits.  I imagine some of you will have good ideas for even better changes, and if so, please post them.

I will be jumping around the file to explain what I've changed.  Most of these lines can be found by searching.  [I have also posted a couple of other settings files for you to diff against; if anyone has an unaltered settings file for the SciTE that comes with beta 3, please post it, as this is the best file to diff against.]

First, let's make the help feature useful by using the right browser:

Quote
     command.scite.help=dillo "file://$(SciteDefaultHome)/SciTEDoc.html"
Now, let's change the default window sizes so they fit on the screen.

Quote
if PLAT_GTK
     position.left=50
     position.top=20
position.width=540
position.height=370

...

fileselector.width=400
fileselector.height=300

Make selected text visible (I sure couldn't see what was selected or not before doing this!)

Quote
## I couldn't see my selections at all
## Thus I made them white on black
selection.fore=#FFFFFF
selection.back=#000000

Make the caret (that little blinking bar that shows where you are editing) more visible, as well as the entire line being edited:

Quote
caret.period=250

...

caret.fore=#0000FF
caret.width=3
caret.line.back=#a0a0ff

Increase the font sizes

There is a part in the file where fonts are specified.  Except for the monospace font, I left the font names intact.  I just doubled the fonts' sizes.  

IMPORTANT! The exclamation mark in front of the font name makes SciTE use antialiasing, so that the fonts look nice.  This is buggy with the version of SciTE with pdaXrom beta1.  So, either remove the exclamation marks, or do as I did -- remove SciTE and install SciTE from Beta 3 feed.

Quote
if PLAT_GTK
      font.base=font:!Bitstream Vera Sans,size:18
      font.small=font:!Bitstream Vera Sans,size:16
      font.comment=font:!Bitstream Vera Serif,size:18
      font.code.comment.box=$(font.comment)
      font.code.comment.line=$(font.comment)
      font.code.comment.doc=$(font.comment)
      font.text=font:!Bitstream Charter,size:18
      font.text.comment=font:!Serif,size:18
      font.embedded.base=font:!Serif,size:18
      font.embedded.comment=font:!Serif,size:18
      font.monospace=font:!Lucida Console,size:18
      font.vbs=font:!Bitstream Vera Sans Mono,size:18


You can also change the size really quickly with these two lines:

Quote
magnification=0
output.magnification=0
Set the number to whatever you like (say -2), and that number will be added to the font size.  (So, the base font, at size 18, plus -2, is now size 16.)  IIRC, just change the number and save the file and you'll see the change right away.  Note that there are two of these numbers.  Magnification works for text you are editing, and output.magnification is for text in the output panes.  I believe the numbers are valid in a range of -10 to +20.

Dynamic text resizing

I had to look into the source to figure out how to do this (and even then it was a pain, but boy is it worth it!)

Quote
# User defined key commands
user.shortcuts=\
Ctrl+Shift+V|IDM_PASTEANDDOWN|\
Ctrl+PageUp|IDM_PREVFILE|\
Ctrl+PageDown|IDM_NEXTFILE|\
Ctrl+1|2334|\
Ctrl+2|2333|\

Now if you press Ctrl-2, it will zoom in, and if you press Ctrl-1, it will zoom out.  (Those numbers correspond to enumerated values in the code named SCI_ZOOMOUT and SCI_ZOOMIN.  I did try using the names, and I also tried adding this to the popup menu (a.k.a. user.context.menu), but was unable to.)

Turning on tabbed editing

SciTE will let you open up several files, each in its own tab.  The number is specified by buffers.

Quote
buffers=10
Turning on Unicode support

Quote
# Unicode
code.page=65001
#code.page=0
#character.set=204
# Required for Unicode to work on GTK+:
LC_CTYPE=en_US.UTF-8
output.code.page=65001

Faster drawing

There are several variables to play with that should affect how quickly the application redraws.  I don't believe I've found the perfect settings, but here is what I've got them set to right now.

Quote
buffered.draw=1
two.phase.draw=1

cache.layout=2
output.cache.layout=2
Title: Making Scite More Useable
Post by: VoiDeR on June 04, 2006, 09:56:08 am
Great howto! I always thought scite was a great editor but it had a few flaws but this howto cleared up almost all of them. Thanks