Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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)
Offline
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)
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
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