[TxMt] Question about Trim Trailing Spaces

George Fields george.b.fields at gmail.com
Sat Jan 31 16:36:15 UTC 2015


Hello,

I am super new to posting to lists in general, so please excuse any
breach of etiquette.

I love TextMate, and have been a faithful user since way back. It
lacks for nothing, as far as I'm concerned, but I do have one
question.

Currently, I am using the Text bundle to trim trailing spaces on save.
The settings are like this:

Semantic Class: callback.document.will-save
Save: Nothing
Input: Document
Format: Text
Output: Replace Document
Format: Text
Caret Placement: Heuristic

This works beautifully. The only issue I have is that no matter where
I am in the document, after save my cursor (caret) is placed at the
very end of the document, and the document is scrolled to that point.
In a longer file, with frequent saves, I have to scroll back and find
my place every time.

I tried different options for Caret Placement and for Output (in the
bundle), but the result remains the same.

My question is twofold: is there something else I could be doing, and
also I'm curious if there are any plans to change this behavior (or
make trimming a built-in option, so to speak), to where the view
doesn't scroll? Seems like this is a common option to want to have.

Thank you!

- g


More information about the textmate mailing list