Set WP-Syntax tab width

Since I’m using the WP-Syntax plug-in on my blog I tried to optimize font size and the tab width. Like a lot of developers I heavily use tabs in my source code. These tabs are really wide within the browser so I was looking for a way to minimize the used space.

I’m not a CSS guy but it seems like there is no way to set a specific tab width. So why not replace the tab with white space?

My change to wp-syntax/wp-syntax.php:

function wp_syntax_highlight($match)
    global $wp_syntax_matches;
    $i = intval($match[1]);
    $match = $wp_syntax_matches[$i];
    $language = strtolower(trim($match[1]));
    $line = trim($match[2]);
    $escaped = trim($match[3]);
    $code = wp_syntax_code_trim($match[4]);
    $code = str_replace ( '\t' , '   ' , $code );

Zend Framework CLI Tool Usage

God damn it. I spent hours trying to generate the basic filestructure using the Zend_Tool (zf.php) shipping within the Zend Framework download. It didn’t work and I got really frustrated.

Well, guess what. Now I downloaded the next version (1.9.5) and it works!

Just open the terminal, navigate to the bin directory within the framework download and type (Mac OS X):

./ create project ./

This is what get’s generated: Zend_1_9_5_Structure