On 31/10/2005, at 10.59, Frédérik Bilhaut wrote:
I was wondering if TextMate has the feature often called "smart home/end" in other editors ? [...]
It doesn't, but you could record a macro which does:
- move to beginning of line (ctrl A)
- regexp search for: (?=\S|$)
And bind that to the home key. For smart end you'd search for: (?=\s*$
Actually, this moves to the second column with lines that have no whitespace at the front. It'd be better to do:
1) move to beginning of line (ctrl A) 2) regexp search for: (?<=\S|$) 3) move left
The regexp uses a look-behind to place the cursor after the first non-whitespace character. Cheers,
Ben ___________________ Ben Jackson Diretor de Desenvolvimento
ben@incomumdesign.com http://www.incomumdesign.com