[FX.php List] Problem with text formatting

Joel Shapiro jsfmp at earthlink.net
Wed Aug 15 12:59:41 MDT 2007


On Aug 15, 2007, at 8:13 AM, Bob Patin wrote:
> At Devcon I saw a nice demo of Textmate and CSSEdit (thanks to the  
> good Joel Shapiro), which I vow to start using, but Dreamweaver's  
> really handy for its combination of preview, FTP, and code.  
> However, yesterday it really messed up a page I was working on; I  
> added a table row above my FOREACH code for cranking out records  
> into a table, and Dreamweaver most kindly deleted my PHP code. It  
> took me quite a while (it's a really complex page) to find it  
> too... very aggravating. A good reason to bail on Dreamweaver


Credit where credit's due...

'twas the good Michael Ward who showed us CSSEdit, as well as shared  
some things I didn't know about TextMate (e.g. how easy it can be to  
create your own 'snippets' or 'bundles' in TextMate, so that a few  
key strokes could, for example, automatically enter all the standard  
initial FX.php calls.)

Things I love about TextMate are all the automated entries it  
performs for you, for instance:

- type: php [then press tab key] and you get <?php  ?> with your  
cursor in the middle

- type a quote, paren, bracket, etc. and TM enters the twin closing  
character and places the cursor between them

- select text and press a quote key, paren, bracket, etc. and TM  
wraps the selected text in quotes (or brackets, parens...)

- select text and press cmd+/ and TM comments out (or uncomments) all  
selected text

- type the beginning of some php function and then press escape to  
cycle through all possible completions, or option-esc to get a popup  
list.  Making your selection then puts in all the relevant  
parameters, each selectable by simple tabbing,
e.g.:
    type: strp [then option+esc] to select strpos (from a list of  
strpbrk, strpos, strptime); then TM gives you:
      strpos(string haystack, string needle, [int offset])
    tabbing through selects each of the code 'clues', e.g. 'string  
haystack'

- drag images or files into a TextMate document and you get correctly  
formatted links, etc.

There's so much more that I'd love to know, but the little I do know  
so far makes coding so much easier and faster for me.

I heartily recommend all you old-school BBEdit users check out  
TextMate :-)
<http://macromates.com/>

-Joel



More information about the FX.php_List mailing list