I know that you can rig TextMate 2 to trim trailing space on save by editing the Text -> Converting / Stripping -> Trim... bundle by changing the semantic class (or creating a whole new bundle). It works well, but I was wondering if there are any plans to add this as an option in the preferences (with a checkbox, etc.) for convenience?
It's a rather common one to have that's found on most other editors I've seen, and it would be super cool to not have to mess with the bundles for such a basic thing.
Kind regards,
- g
That's nice, thanks for replying, and I certainly appreciate other people's work, but the fundamental question remains: is that something that can be put in as a preference setting? Or am I unreasonable / lazy for wanting it?
- g
On Sep 21, 2017 17:19, "Koen Punt" koen@koenpunt.nl wrote:
Oh I now see I misread; it's about whitespace, not newlines. But the bundle is a modified fork of the whitespace one:
https://github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle
Sent from Nylas Mail https://n1.nylas.com/link/bf0e333102317dc6a7c9eba80e15080db3e42923e8627ea4c407e9960acefb88/0?redirect=https%3A%2F%2Fnylas.com%3Fref%3Dn1, the best free email app for work
On Sep 21 2017, at 10:57 pm, Koen Punt koen@koenpunt.nl wrote:
I have bundle installed which injects that functionality for all languages:
https://github.com/hajder/Ensure-New-Line-at-the-EOF.tmbundle
So no need to change the semantic classes of other bundles or whatnot.
K.
Sent from Nylas Mail https://n1.nylas.com/link/bf0e333102317dc6a7c9eba80e15080db3e42923e8627ea4c407e9960acefb88/0?redirect=https%3A%2F%2Fnylas.com%3Fref%3Dn1, the best free email app for work
On Sep 21 2017, at 10:54 pm, George Fields george.b.fields@gmail.com wrote:
I know that you can rig TextMate 2 to trim trailing space on save by editing the Text -> Converting / Stripping -> Trim... bundle by changing the semantic class (or creating a whole new bundle). It works well, but I was wondering if there are any plans to add this as an option in the preferences (with a checkbox, etc.) for convenience?
It's a rather common one to have that's found on most other editors I've seen, and it would be super cool to not have to mess with the bundles for such a basic thing.
Kind regards,
- g
textmate mailing listtextmate@lists.macromates.comhttp://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 22 September 2017 at 00:53, George Fields george.b.fields@gmail.com wrote:
That's nice, thanks for replying, and I certainly appreciate other people's work, but the fundamental question remains: is that something that can be put in as a preference setting? Or am I unreasonable / lazy for wanting it?
It would at least be unnecessarily limiting. A preferences would be a single global checkbox. Having this in bundles means that we can configure it based on project and file type if we want.
I think adding the bundles to the index would be close to what you want: There would be a checkbox in the preferences, and without further configuration it acts as a global toggle.
HTH, Martin
On Sep 21, 2017 17:19, "Koen Punt" koen@koenpunt.nl wrote:
Oh I now see I misread; it's about whitespace, not newlines. But the bundle is a modified fork of the whitespace one:
https://github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle
Sent from Nylas Mail, the best free email app for work
On Sep 21 2017, at 10:57 pm, Koen Punt koen@koenpunt.nl wrote:
I have bundle installed which injects that functionality for all languages:
https://github.com/hajder/Ensure-New-Line-at-the-EOF.tmbundle
So no need to change the semantic classes of other bundles or whatnot.
K.
Sent from Nylas Mail, the best free email app for work
On Sep 21 2017, at 10:54 pm, George Fields george.b.fields@gmail.com wrote:
I know that you can rig TextMate 2 to trim trailing space on save by editing the Text -> Converting / Stripping -> Trim... bundle by changing the semantic class (or creating a whole new bundle). It works well, but I was wondering if there are any plans to add this as an option in the preferences (with a checkbox, etc.) for convenience?
It's a rather common one to have that's found on most other editors I've seen, and it would be super cool to not have to mess with the bundles for such a basic thing.
Kind regards,
- g
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Please, no. An option checkbox is just an admission that you can't get the default correct. And NOT stripping them by default is correct. Anything that silently modifies your file should not be allowed.
And what would you do, modify the bundle at run-time depending on the setting of the checkbox?
Now, if someone wants to adopt the Whitespace-on-Save bundle into the official set, that would be great. It adds a class so you can SEE the trailing space, for example.