Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-04-10 09:39:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: The 8 space tabs in the editor are driving me nuts!

wet wrote:

Make no assumptions about the author’s desired markup.

Yeah, I totally get that. Putting code in to detect ‘unnecessary’ line feeds would make the core more complex and probably slow the parser down so I don’t mind really. Performance over beauty, I say :-) It’s just my tight-fisted nature about passing extra bytes onto people that occasionally gets the better of me. But I flip-flop between the two viewpoints depending on mood.

OTOH, a mildly daring plugin author might take the endeavour to produce a HTMLTidy plugin

I wrote a Pretty Printer for my university Final Year Project and can conclude I’m not that daring enough to tackle it again! Plus of course, there’d only be one person who used it: me :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#14 2009-04-10 14:56:10

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: The 8 space tabs in the editor are driving me nuts!

*carlos123 wrote:*http://forum.textpattern.com/search.php

This is enough of an irratation to me to go to another software other than TextPattern though it seems to be an excellent product.

Am I stuck having to accept TextPatterns 8 spaces? Is my only option to copy the code into my own editor?

And trying to figure out how to set the spacing that appears before each code line which is set by TextPattern to 8 spaces.

Too much ranting against Textpattern for something that isn’t Textpattern related at all.
It’s Firefox (or possible, any other browser you may be using) the one who renders a tab as 8 spaces.
And as far as I’ve investigated in about:config (as Bloke did) there isn’t a way to change how Firefox renders a tab.

Carlos, you may want to try upm_insert_tab.
That one insert a hard tab (an 8 spaces tab), but once you have it installed, you can replace the code (in Plugins -> upm_insert_tab -> edit), which this modified version
I’ve modified it to insert 4 spaces instead of 1 hard tab.

Last edited by maniqui (2009-04-10 16:21:12)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#15 2009-04-10 15:09:04

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: The 8 space tabs in the editor are driving me nuts!

@Bloke, wet:

Re: the white space.

I also use forms that generate no output (sometimes they are just a few txp:variable or blocks of txp:php) or that just “count” things (using, for example, rvm_counter) and output the count on <!-- --> blocks (well, that’s another story, I sometimes use forms as “functions”).

Anyway, I was thinking that it could be great to have the option to trim white space.
I’m not concerned about tidying up HTML output just to look nice, but I would like to remove large blocks of white space.

I will open another thread with a few ideas I’ve in mind: a trim attribute for <txp:php> (ideally, for a few other txp tags too), a <txp:xxx_squeeze> plugin? (where xxx eq smd ;)) for squeezing white space or maybe for generating minified static files (js and css). :P

Last edited by maniqui (2009-04-10 15:09:32)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#16 2009-04-10 15:48:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: The 8 space tabs in the editor are driving me nuts!

I could update my plugin to let you pick what to insert when you hit tab. Would folks be interested in that?

Offline

#17 2009-04-10 16:18:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: The 8 space tabs in the editor are driving me nuts!

Mary wrote:

I could update my plugin to let you pick what to insert when you hit tab. Would folks be interested in that?

Yes please!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB