[TxMt] Feature request: Run commands on events

Allan Odgaard allan at macromates.com
Tue Apr 26 07:56:43 UTC 2005


On Apr 26, 2005, at 9:51, Sune Foldager wrote:

> Otherwise I agree with Tom; When do you NOT want to strip it on save?

When your source is under source control and other work on the source 
as well. Stripping ws on save may cause a lot of lines to be changed, 
and thus the likelihood of merge conflicts and screwed up history is 
big.

However, I was talking about editing patterns about having return 
remove ws to the left.

If I have code like:

      |one_expression;    // caret in the start of this line
       other_expression;

I may want to add a trace statement above “one_expression”, I do that 
using, return, arrow-up, log<tab> (snippet doing the trace expression).

If return hadn't preserved the ws then I'd need to do a few tabs first. 
I may however make tab indent to current level, when line has less ws 
than current level and is otherwise empty.

Ideally I should keep “virtual” ws around for these situations and 
remove that on save. So it's there if the user expects it, but it's not 
persistent.




More information about the textmate mailing list