[TxMt] saving without trailing spaces and tabs...

Dan Ridley danridley at mac.com
Tue Mar 21 20:04:01 UTC 2006


On 21 Mar 2006, at 11:03, Charilaos Skiadas wrote:

> Actually, all you have to do is open "Text/Remove Trailing Spaces"  
> in the bundle editor, set its "save:" option to "current file", and  
> assign it the key equivalent F3 by clicking on the text field next  
> to "key equivalent" and pressing F3. Then "F3" should show up in  
> the text field. Close the bundle editor, and you should be good to  
> go. No need to create a new macro at all.

The save option in the command editor saves the file *before* running  
the command, not after.

However, as Domenico pointed out earlier in the thread, you can  
create an empty command, set to save the file, and queue it up in a  
macro.

So the best way to accomplish this based on the discussion so far:

* Duplicate the "Text/Remove Trailing Spaces" command, and set input  
and output to Entire Document, so it won't misbehave when text is  
selected.
* Create a new command, empty, with Save: set to Current File, input  
None, and output Discard
* Record a macro, which runs those two commands in succession
* Save the macro and assign it to F3 (or Cmd-S, if you prefer).





More information about the textmate mailing list