<div>I have at least a fix for the cursor going to the end of the document:
                </div><div><br></div><div>If you change <b>Caret Placement</b> from whatever you have to <b>Heuristic</b>, your cursor should stay in place. That said, I would also love this option so I don't have to remember to check for this, save extra documents, etc. Next up, I'm going to look into git pre-commit hooks.</div>
                <div><div><br></div><div>Edward</div><div><br></div></div>
                 
                <p style="color: #A0A0A8;">On Sunday, July 8, 2012 at 5:12 PM, John Yeates wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>I've (once again) got fed up with saving things only to find that git is rejecting the commit due to trailing whitespace, and have had another look at automatically stripping it.</div><div><br></div><div>I've tried the bundle at <a href="https://github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle">https://github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle</a>, which hasn't been working for me for ages, and the solution at <a href="http://reinteractive.net/posts/4-stripping-whitespace-out-of-textmate-2">http://reinteractive.net/posts/4-stripping-whitespace-out-of-textmate-2</a>, which saves the file with the whitespace unstripped and *then* strips the whitespace (and unhelpfully moves the cursor to the end of the document, too). None of them results in me achieving my goal of a file on disk which doesn't have trailing whitespace, and a buffer in TextMate which shows as saved.</div><div><br></div><div>Is there some solution I'm missing?</div><div><br></div><div>(The ideal would be for whitespace stripping to be built in, not just as a manually-executed command in the Source bundle, but something in the app preferences that could also be turned on/off in .tm_properties — that would mean every TM2 user cloning a no-trailing-whitespace-allowed repo would get a .tm_properties file that causes it to do the Right Thing for that project, regardless of how the user has their preferences set up. Allan, is there any chance of this in a future build?)</div><div><br></div><div>Thanks</div><div><br></div><div>-- </div><div>John Yeates</div><div><br></div><div><br></div><div>_______________________________________________</div><div>textmate mailing list</div><div><a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a></div><div><a href="http://lists.macromates.com/listinfo/textmate">http://lists.macromates.com/listinfo/textmate</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>