The WP-Syntax plug-in is great. Exactly what I’m looking for so that I can embed code snippets in my blog. Thank you Ryan. But one thing that struck me was that the tab size was too big. It’s set at 8 spaces by default. No bueƱo. I like my tabs to be 4 characters.
So find the geshi.php file in wp-content/plugins/wp-syntax/geshi/ and open it in your favorite editor.
Find the following line (#503 as of this writing):
503
var$tab_width=8;
And change the 8 to whatever you like. Done. Lovely. Have a Coke.
UPDATED Sunday, March 1, 2009
Eh… so that doesn’t actually work. I tried another fix I found here, but that ended up changing the font size in the code. So I’m just going to use TextMate to convert all of the tabs to spaces in my code samples.
Quick Tip #2 – Adjust default wp-syntax tab size
The WP-Syntax plug-in is great. Exactly what I’m looking for so that I can embed code snippets in my blog. Thank you Ryan. But one thing that struck me was that the tab size was too big. It’s set at 8 spaces by default. No bueƱo. I like my tabs to be 4 characters.
So find the geshi.php file in wp-content/plugins/wp-syntax/geshi/ and open it in your favorite editor.
Find the following line (#503 as of this writing):
And change the 8 to whatever you like. Done. Lovely. Have a Coke.
UPDATED Sunday, March 1, 2009 Eh… so that doesn’t actually work. I tried another fix I found here, but that ended up changing the font size in the code. So I’m just going to use TextMate to convert all of the tabs to spaces in my code samples.