sh-zenburnish: SyntaxHighlighter Evolved, zenburn stylee
Ok, more real coding avoidance*. I hacked together a little SyntaxHighlighter Evolved colour scheme so that my eyes aren't offended when I post code in this blog. Here's an example with lines 5-7 highlighted:
package dt.particles
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Point;
import flash.geom.Rectangle;
/**
* Particle manager.
*
* @author David Wagner
*
*/
public class PMan extends Sprite
{
private var _emitters :Array;
private var _bd :BitmapData;
private var _b :Bitmap;
private var _r :Rectangle;
private var _zeroPoint :Point;
/**
* Constructor.
*
* @param p_width Width of the particle area.
* @param p_height Height of the particle area.
*
*/
public function PMan( p_width :int, p_height :int )
{
super();
_zeroPoint = new Point();
_r = new Rectangle( 0, 0, p_width, p_height );
_bd = new BitmapData(_r.width, _r.height, true, 0x000000);
_b = new Bitmap(_bd, "never", false);
addChild(_b);
_emitters = [];
}
/**
* Adds a new particle emitter.
*
* @param p_particleCount Number of particles
* @param p_x Emitter X
* @param p_y Emitter Y
* @param p_colours Array of colours the particles are randomly chosen from
* @param p_bouncy Indicates if the particles should bouncy at the edge of the area, or die.
* @param p_boundingArea Indicates a constraining box the particles must appear in. If null, the full size of the area is used.
*
*/
public function addEmitter( p_particleCount :Number, p_x :Number, p_y :Number, p_colours :Array, p_bouncy :Boolean, p_boundingArea :Rectangle = null ) :void
{
if( p_boundingArea == null )
{
p_boundingArea = _r;
}
_emitters.push( new PEmitter( p_particleCount, p_x, p_y, _bd, p_boundingArea, p_colours, p_bouncy ) );
}
/**
* Updates each emitter.
*
* @param p_emitter
* @param p_index
* @param p_array
*
*/
private function forEach_updateEmitter( p_emitter :PEmitter, p_index :int, p_array :Array ) :void
{
p_emitter.update();
}
/**
* Updates all the emitters.
*
*/
public function update() :void
{
_bd.lock();
_bd.fillRect(_r, 0x00ffffff);
_emitters.forEach( forEach_updateEmitter );
_bd.unlock();
}
}
}
You can grab the theme from, along with installation instructions:
Assuming I don't break anything when I move flat tomorrow, I may actually get around to finishing off the post on ActionScript bytecode that I've been fiddling with.
fb-zenburnish: A zenburn inspired colour scheme for FlashBuilder 4
Ok, in order to avoid any real coding at the weekend, I set about messing with the colours and settings within FlashBuilder 4 to turn it into something a little less searing on the eyeballs. These are the results:
Certainly more soothing on my eyeballs anyway. You can grab the theme from:
There are instructions for installation in the README file, but for the sake of padding out an entry to make it seem like I wrote more, here they are in full:
- Launch FlashBuilder.
- Choose File → Export → Other.
- Open General and select Preferences.
- Click next, select "Export all" and "Browse…" to save a backup of your current preferences somewhere.
- Keep that backup safe in case this all goes titsup.
- Choose File → Import → Other.
- Open General and select Preferences.
- Browse to where you've downloaded fb-zenburnish.epf and select it. Make sure "Import all" is selected, ignore any warnings and hit "Finish".
- Panic, as your colours look crazy-ass.
- Choose File → Restart to reload Eclipse.
- Exhale gently and let the sublime colours wash, soothingly, through your eyeballs, caressing your optic nerves, and then engaging in a group hug with your brain.
Well, I like it anyway. I don't hold with this modern nonsense of having a white background for everything. I'm a programmer, not a surface dweller.
In case you are interested, the original (and best, of course) zenburn for vim theme is here:
P.S. I highly recommend downloading Inconsolata to use a programming font. It's beautiful, and practical. I generally use Anonymous Pro for texty programming stuff, but that doesn't seem to work very well in Eclipse. I may switch all my editors to Inconsolata though, now I know it exists.


