[TxMt] auto indent/tidy of PHP code
Graeme Mathieson
mathie at woss.name
Tue Sep 6 15:25:43 UTC 2005
On 6 Sep 2005, at 15:25, William Macdonald wrote:
> In emacs w/ PHP-mode I can tidy a php script very easily by just
> pressing TAB on each of the lines. Even if I am in the middle of a
> word, pressing TAB just positions it correctly in relation to the
> line above. Tab does not break up a word, and pressing tab
> repeatedly does not move it further. Just enough to give nice
> consistent indentation.
I've been missing this feature too. The closest I've found is that
M-] and M-[ will in- and out-dent while the cursor is in the middle
of a line, though it does occasionally decide to move the cursor onto
the next line, and it doesn't automatically choose the 'right'
indentation level.
I keep thinking that M-] (to indent) and M-[ (to outdent) is the
wrong way round, though. Usually it's when you open a bracket that
you want to indent, close it you want to outdent... It's kinda like
how I always get confused with look-up and look-down with a joypad in
games. :-)
--
Mail: mathie at woss.name | Web: http://woss.name/
AIM: Math1e | PGP: 1024D/D72F2737
More information about the textmate
mailing list