Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-03 06:37:01

wosh
Member
Registered: 2005-01-15
Posts: 12

Edit your textpattern pages/forms/css in Textmate

I’ve created a Textmate bundle that allows you to connect to a mysql database and edit any data stored there within Textmate. The upshot of this is that you can now edit all your template data from Textpattern within Textmate.

If anyone is interested, there is a small video here: http://vivified.net/journal/sqledit-textmate-bundle
You can also download the bundle there.

Cheers,
Bastiaan

Offline

#2 2006-05-19 07:44:11

robmcm
New Member
Registered: 2006-05-17
Posts: 8

Re: Edit your textpattern pages/forms/css in Textmate

Wow thanks mate this is superb!!! Going to save a lot of time!

Offline

#3 2006-05-20 09:12:04

wosh
Member
Registered: 2005-01-15
Posts: 12

Re: Edit your textpattern pages/forms/css in Textmate

Glad someone finds this useful. If you have any feature suggestions, do let me know!

Offline

#4 2006-05-20 11:29:59

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Edit your textpattern pages/forms/css in Textmate

I like the look of this, any chance of a simple guide to installing the Mysql library – the instructions that come with it leave me a bit lost.

Thank you, Lee.

Offline

#5 2006-05-20 11:33:40

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: Edit your textpattern pages/forms/css in Textmate

lee wrote:

I like the look of this, any chance of a simple guide to installing the Mysql library – the instructions that come with it leave me a bit lost.

same here :(

Offline

#6 2006-05-20 11:58:49

wosh
Member
Registered: 2005-01-15
Posts: 12

Re: Edit your textpattern pages/forms/css in Textmate

Hi,
I agree that compiling the mysql extension can be a royal pain in the ass.

I recommend the following article:
http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger
Scroll down to “MySQL” and follow the steps (if you already have MySQL installed you can obviously skip that step).

Good luck!

Offline

#7 2006-05-20 12:01:04

wosh
Member
Registered: 2005-01-15
Posts: 12

Re: Edit your textpattern pages/forms/css in Textmate

If you’re into rails, you could also use the script found here:
http://sg.validcode.at/articles/2006/03/31/the-best-way-to-install-rails-on-os-x

That will set you up with rails, some gems, and the mysql bindings.

Offline

#8 2006-05-20 15:13:19

domfucssion
Plugin Author
Registered: 2004-10-23
Posts: 39

Re: Edit your textpattern pages/forms/css in Textmate

great – this might finally ween me off bbedit…

I got it running but the css in txp database is encoded (b64?), is they any way to convert that back and forth ‘cos for me that would be the main reason I would use this…

Offline

#9 2006-05-25 11:40:06

wosh
Member
Registered: 2005-01-15
Posts: 12

Re: Edit your textpattern pages/forms/css in Textmate

Ah, hadn’t thought of that yet (the base64 thing).
One solution is to use this: http://base64.darwinports.com/ (or a similar script…)

Then, simply select everything in your file, go to Text -> Filter through command.
Filter it through the decode utility, and you’re done.
The downside is you’ll have to do the reverse before saving.

Hope this helps (somewhat).

Offline

#10 2006-05-25 14:11:18

domfucssion
Plugin Author
Registered: 2004-10-23
Posts: 39

Re: Edit your textpattern pages/forms/css in Textmate

no worries, it is still paradise not editing in the browser for the other files.

One thing that bothers me in textmate Vs. bbedit though that I can’t get used to is the formatting. In bbedit i used to be able to run the “format” command and get a nice hierachical view of the source and I can’t get tm to do that. Any tips on that front?

thank you again

Offline

#11 2006-05-25 15:23:14

jamiew
Archived Plugin Author
From: NYC
Registered: 2005-01-08
Posts: 74
Website

Re: Edit your textpattern pages/forms/css in Textmate

this is amazing — trying it out now. thanks wosh!

Offline

#12 2006-05-28 09:32:30

wosh
Member
Registered: 2005-01-15
Posts: 12

Re: Edit your textpattern pages/forms/css in Textmate

domfucssion wrote:

One thing that bothers me in textmate Vs. bbedit though that I can’t get used to is the formatting. In bbedit i used to be able to run the “format” command and get a nice hierachical view of the source and I can’t get tm to do that. Any tips on that front?

I’m not a BBEdit user, so I’m not sure what the format command does exactly, however, did you try the text->indent selection command? Might be what you are looking for.

Offline

#13 2006-05-28 20:27:55

domfucssion
Plugin Author
Registered: 2004-10-23
Posts: 39

Re: Edit your textpattern pages/forms/css in Textmate

hi again, thanks for your suggestion, but it didn’t do it for me,

here’s what I am trying to do in textmate.
format:
<pre>
&lt;body&gt;
&lt;div&gt;dsdsd&lt;/div&gt;&lt;ul&gt;&lt;li&gt;baa&lt;/li&gt;&lt;li&gt;baa2&lt;/li&gt;&lt;/ul&gt;
&lt;/body&gt;
</pre> into:
<pre> &lt;body&gt; &lt;div&gt;dsdsd&lt;/div&gt; &lt;ul&gt; &lt;li&gt; baa &lt;/li&gt; &lt;li&gt; baa2 &lt;/li&gt; &lt;/ul&gt; &lt;/body&gt;
</pre>

Offline

#14 2006-05-29 07:17:59

wosh
Member
Registered: 2005-01-15
Posts: 12

Re: Edit your textpattern pages/forms/css in Textmate

I see, yes the indent selection command only does indentation, no linebreaks.
Try the Bundles->html->tidy command (ctrl-shift-h). That seems to do what you want.

Offline

#15 2006-10-01 02:25:38

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Edit your textpattern pages/forms/css in Textmate

@domfuccsion,

In the latest Textpattern Bundle, I have included a command, that will do that for you.
(It uses a perl script taken of course from elsewhere)
The only thing you need to do is, press opt cmd shift F (when you are in text.html.txp scope), and you get the human readable source format in your document, your asking for,
although it is not the same as tab indenting, but I used it a lot these days with some huge html templates, that have all sorts of divitis and white space there from cutting and pasting, and then with just one key stroke, I get back to where I was before.

Just thought , you might find this useful .

you can get latest v <a href=“http://www.consking.com/file_download/31”>here</a>

@Bastiaan, I’d like to try out your Bundle, but can’t find the download link.

regards, marios

Last edited by marios (2006-10-01 03:00:47)


⌃ ⇧ < ⌃ ⇧ >

Offline

Board footer

Powered by FluxBB