Hi,
I've done my best to search the archives and follow tutorials (http://blog.macromates.com/2011/git-style-configuration/), but haven't been able to squash this bug.
In a git commit message, I can't turn soft wrap off. When I enable/disable the setting from the menu item, it enables/disables the soft wrap *indicator* but not soft wrapping itself.
In a Markdown document, enabling/disabling soft wrap works as expected.
I have also tried tons of different combinations in my ~/.tm_properties, to no avail (and sometimes TM2 stops even assigning the right filetype to .git/COMMIT_EDITMSG). This is my current configuration:
TM_GIT = "/usr/local/bin/git" softTabs = true tabSize = 2
[ .git/COMMIT_EDITMSG ] fileType = text.git-commit softWrap = false
[ "git-rebase-todo" ] fileType = text.git-rebase
Any ideas?
Thanks,
Adam
On 11.01.12 06:08, Adam Sharp wrote:
[ .git/COMMIT_EDITMSG ] fileType = text.git-commit softWrap = false
Have you tried
[ text.git-commit ] softWrap = false
(Allan said settings for styles take precedence over those for file names.) Also, in the Bundle Editor, you'll find that under Git/Settings/Style: Diff, softWrap is explicitly disabled for the diffs. I'd guess you can do the same thing for text.git-commit as well, but the above setting in tm_properties should do that, too.
Christopher
On 11/01/2012, at 7:13 PM, Christopher Creutzig wrote:
Have you tried
[ text.git-commit ] softWrap = false
Ok, so here's what's happening at the moment. I replaced the [ .git/COMMIT_EDITMSG ] section with your suggestion, then when I tried to commit, the file type was being set as Markdown. I tried commenting out everything else in my .tm_properties, still interpreted as Markdown. I then started a commit, manually changed the file type at the bottom of the window, cancelled the commit, and then next time I tried to commit it remembered the file type.
So that's good, but now when I set softWrap = true, the soft wrap indicator turns off, and softWrap = false turns the indicator on. And regardless of the setting, the text still soft wraps. Kinda weird.
Also, in the Bundle Editor, you'll find that under Git/Settings/Style: Diff, softWrap is explicitly disabled for the diffs. I'd guess you can do the same thing for text.git-commit as well, but the above setting in tm_properties should do that, too.
Topping it off, I tried this and it also turns the soft wrap indicator *on*.
:P
Thanks for the suggestions so far.
Adam
I don't know if things are related, but I had a similar issue with php files. It's seems that when you put softWrap to false wrapColumn takes place. A work around I've found is to put softWrap = false wrapColumn = 1000 (or a very high number difficult to reach as line length)
Probably a bad solution, but was the only way to stop the text to wrap.
Patrick
On 11 Jan 2012, at 23:55, Adam Sharp wrote:
On 11/01/2012, at 7:13 PM, Christopher Creutzig wrote:
Have you tried
[ text.git-commit ] softWrap = false
Ok, so here's what's happening at the moment. I replaced the [ .git/COMMIT_EDITMSG ] section with your suggestion, then when I tried to commit, the file type was being set as Markdown. I tried commenting out everything else in my .tm_properties, still interpreted as Markdown. I then started a commit, manually changed the file type at the bottom of the window, cancelled the commit, and then next time I tried to commit it remembered the file type.
So that's good, but now when I set softWrap = true, the soft wrap indicator turns off, and softWrap = false turns the indicator on. And regardless of the setting, the text still soft wraps. Kinda weird.
Also, in the Bundle Editor, you'll find that under Git/Settings/Style: Diff, softWrap is explicitly disabled for the diffs. I'd guess you can do the same thing for text.git-commit as well, but the above setting in tm_properties should do that, too.
Topping it off, I tried this and it also turns the soft wrap indicator *on*.
:P
Thanks for the suggestions so far.
Adam
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 12/01/2012, at 06.55, Adam Sharp wrote:
[…] when I set softWrap = true, the soft wrap indicator turns off, and softWrap = false turns the indicator on. And regardless of the setting, the text still soft wraps. Kinda weird.
Too many variables involved here for me to really follow it, but the default .tm_properties both have:
[ text ] softWrap = true
And
[ .git/COMMIT_EDITMSG ] softWrap = true
The latter is redundant since it is covered by the first, and first even has higher priority.
I’d suggest you remove these defaults from TextMate.app/…/Default.tmProperties and then try see if that helps.
When there are issues with settings, it’s generally better to _remove_ settings than add new (at least as part of the troubleshooting), as it quickly becomes rather complex with the scoped settings, the local .tm_properties, the memorized file type settings (in user defaults), a.s.o.
On 16/01/2012, at 2:06 PM, Allan Odgaard wrote:
[...]
I’d suggest you remove these defaults from TextMate.app/…/Default.tmProperties and then try see if that helps.
When there are issues with settings, it’s generally better to _remove_ settings than add new (at least as part of the troubleshooting), as it quickly becomes rather complex with the scoped settings, the local .tm_properties, the memorized file type settings (in user defaults), a.s.o.
Thanks for this advice. I've simplified my preferences and wrapping is working as expected now.
Also, I've managed to consistently reproduce the wrapping error:
1. Start editing a git commit (softWrap = true, wrapColumn = 72) 2. Type a commit message that's long enough to wrap 3. Set soft wrap to use window frame from the view menu 4. Turn of soft wrap
At this point, my commit message is not wrapping, as expected. However the commented out lines supplied by git still wrap to the window frame. There are now two different wrapping modes in the same document, and no soft wrap indicator displayed. If I abort the commit and begin again, my preferences are restored.
Attached is my current ~/.tm_properties file, for good measure. (My Default.tmProperties is unmodified.)
Adam