I found a strange behavior that I believe is a bug. I am using 2.0-alpha.9503 on OS 10.9.1.
First I redefined the keyboard shortcut for "Comment Line" in the system Preferences. This command is from the "Source" bundle and appears as alternative shortcut to the default ⌘/ in the bundle menu (I used ⌘- in order to avoid the rather clumsy command for german keyboard layout).
Right after that both shortcuts work fine. After closing and reopening TextMate, only the default shortcut ⌘/ works, the new shortcut is now ignored.
When I select Bundles -> Source -> Comments I can see that the commands are still set correctly. After that, both shortcuts work again, until I close TextMate and open it again: the new shortcut is ignored until the menu selecting Bundles -> Source -> Comments is opened up, after that it works till closing TextMate again.
I was struggling some time with this issue, without solution. Now after testing for writing this bug report, at least there is a simple workaround. But maybe it can be resolved. I also tried changing the Bundle "Source" itself, but that didn't do the trick either.
Martin
I can confirm that, but for another shortcut : "Indent Line". (2.0-alpha.9503/10.9.1 too, but the bug is there since a *lot* longer).
I've overridden the default shortcut of "Text->Indent Line" & "Text->Indent Selection" to ⌃I using System Preferences (both since the menu item name changes depending on context), and the default one (⌥⌘[) can't be done on a French keyboard ("[" is ⌥⇧(, which end up being the same than "Shift Left" (⌘[) just above.
The first time I open TM I have to click the Text menu so the shortcut registers, afterward it works fine, until I have to restart TM (for one reason or another, but thankfully that's not often).
Regards, Etienne Samson -- samson.etienne@gmail.com
Le 25 janv. 2014 à 22:20, Martin Pollow martin.pollow@web.de a écrit :
I found a strange behavior that I believe is a bug. I am using 2.0-alpha.9503 on OS 10.9.1.
First I redefined the keyboard shortcut for "Comment Line" in the system Preferences. This command is from the "Source" bundle and appears as alternative shortcut to the default ⌘/ in the bundle menu (I used ⌘- in order to avoid the rather clumsy command for german keyboard layout).
Right after that both shortcuts work fine. After closing and reopening TextMate, only the default shortcut ⌘/ works, the new shortcut is now ignored.
When I select Bundles -> Source -> Comments I can see that the commands are still set correctly. After that, both shortcuts work again, until I close TextMate and open it again: the new shortcut is ignored until the menu selecting Bundles -> Source -> Comments is opened up, after that it works till closing TextMate again.
I was struggling some time with this issue, without solution. Now after testing for writing this bug report, at least there is a simple workaround. But maybe it can be resolved. I also tried changing the Bundle "Source" itself, but that didn't do the trick either.
Martin
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 26 Jan 2014, at 8:10, Etienne Samson wrote:
I've overridden the default shortcut of "Text->Indent Line" & "Text->Indent Selection" to ⌃I using System Preferences (both since the menu item name changes depending on context), and the default one (⌥⌘[) can't be done on a French keyboard ("[" is ⌥⇧(, which end up being the same than "Shift Left" (⌘[) just above.
The first time I open TM I have to click the Text menu so the shortcut registers, afterward it works fine, until I have to restart TM (for one reason or another, but thankfully that's not often).
This is because the initial title of that item is “Indent Line / Selection” and is dynamically updated when either the menu is opened or the item is being invoked.
If you also add a binding for this title, then it should work at launch.
I was under the impression that the key bindings set in System Preferences were checked at program launch, and the menu items had their key equivalent updated accordingly, thus one should always use the “initial title” and could ignore any dynamic titles.
In my testing it would however seem that the dynamic titles must also be listed. This might be new, either OS update or when I switched to 64 bit (which did change several aspects of menu item behavior).
Given that one (now) must list all the titles, it sounds like I should change the initial title to one of the states, to avoid this gotcha.
Le 26 janv. 2014 à 15:31, Allan Odgaard mailinglist@textmate.org a écrit :
On 26 Jan 2014, at 8:10, Etienne Samson wrote:
I've overridden the default shortcut of "Text->Indent Line" & "Text->Indent Selection" to ⌃I using System Preferences (both since the menu item name changes depending on context), and the default one (⌥⌘[) can't be done on a French keyboard ("[" is ⌥⇧(, which end up being the same than "Shift Left" (⌘[) just above.
The first time I open TM I have to click the Text menu so the shortcut registers, afterward it works fine, until I have to restart TM (for one reason or another, but thankfully that's not often).
This is because the initial title of that item is “Indent Line / Selection” and is dynamically updated when either the menu is opened or the item is being invoked.
If you also add a binding for this title, then it should work at launch.
This works, thanks for the suggestion ! It's just crowding a little more my keyboard shortcuts overrides, but it doesn't really matter ;-).
I was under the impression that the key bindings set in System Preferences were checked at program launch, and the menu items had their key equivalent updated accordingly, thus one should always use the “initial title” and could ignore any dynamic titles.
In my testing it would however seem that the dynamic titles must also be listed. This might be new, either OS update or when I switched to 64 bit (which did change several aspects of menu item behavior).
Given that one (now) must list all the titles, it sounds like I should change the initial title to one of the states, to avoid this gotcha.
For the record, I've been running TM2 since about when it became public, and I think I overridden the shortcut mid-2013. I'm pretty sure it was before the 64 bit change, and that my 10.9 update was only 3 weeks ago (most of 2013 was under the 10.8 era, right ?). And I seem to remember that it was working at first but stopped somewhere in between. Dunno if that helps pinpointing anything...
Regards, Etienne Samson -- samson.etienne@gmail.com
On 26 Jan 2014, at 15:31, Allan Odgaard wrote:
On 26 Jan 2014, at 8:10, Etienne Samson wrote:
I've overridden the default shortcut of "Text->Indent Line" & "Text->Indent Selection" to ⌃I using System Preferences […] The first time I open TM I have to click the Text menu so the shortcut registers, afterward it works fine
This is because the initial title of that item is “Indent Line / Selection” and is dynamically updated when either the menu is opened or the item is being invoked.
For the records, in latest nightly build the initial title of dynamic menu items is no longer special.
On 26 Jan 2014, at 4:20, Martin Pollow wrote:
First I redefined the keyboard shortcut for "Comment Line" in the system Preferences. This command is from the "Source" bundle and appears as alternative shortcut to the default ⌘/ in the bundle menu (I used ⌘- in order to avoid the rather clumsy command for german keyboard layout).
TextMate disables the system’s key equivalent handling for bundle items because the system is making wrong assertions, for example that a key equivalent will never be bound to more than one menu item, so it cannot be made to work with TextMate.
So for bundle items you should change key equivalents via the bundle editor.
A quick way to find an item and edit it is using Bundles → Select Bundle Item… (⌃⌘T). Locate the item (e.g. enter “comment”) then press option-return to edit that item.
So for bundle items you should change key equivalents via the bundle editor.
A quick way to find an item and edit it is using Bundles → Select Bundle Item… (⌃⌘T). Locate the item (e.g. enter “comment”) then press option-return to edit that item.
Doesn't work on my system. I can edit and save the "Source" bundle and then the shortcut is shown correctly in the "Select Bundle Item" window. But, it does not work: the shortcut is ignored and I can only comment lines going via the menu bar. Also the default keyboard shortcut does not work anymore (as expected).
After restarting TextMate, the default shortcut appears again in the Source bundle and works as if nothing was edited at all.
On Jan 26, 2014, at 8:33 AM, Martin Pollow martin.pollow@web.de wrote:
Doesn't work on my system. I can edit and save the "Source" bundle and then the shortcut is shown correctly in the "Select Bundle Item" window. But, it does not work: the shortcut is ignored and I can only comment lines going via the menu bar. Also the default keyboard shortcut does not work anymore (as expected).
After restarting TextMate, the default shortcut appears again in the Source bundle and works as if nothing was edited at all.
I haven't tried this particular scenario. But there is an odd thing in the bundle drawer. Usually, one expects one's changes in a text field to be live, but in the bundle drawer, they are not. One of the tricky features of editing in a bundle's drawer is that you have to save explicitly. Is it possible that this fact is involved here? I have certainly been caught by this in various situations. m.
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
Am 26.01.2014 um 18:10 schrieb Matt Neuburg matt@tidbits.com:
After restarting TextMate, the default shortcut appears again in the Source bundle and works as if nothing was edited at all.
I haven't tried this particular scenario. But there is an odd thing in the bundle drawer. Usually, one expects one's changes in a text field to be live, but in the bundle drawer, they are not. One of the tricky features of editing in a bundle's drawer is that you have to save explicitly. Is it possible that this fact is involved here? I have certainly been caught by this in various situations. m.
Well, after editing the shortcut I am closing the window and TM asks me if I want to save my changes. I confirm and for that session the hot key is displayed but does not work. After closing TM I have again the old shortcut written in the menu and doing his job. So it looks like the old data is loaded on restart.
On 27 Jan 2014, at 0:18, Martin Pollow wrote:
Well, after editing the shortcut I am closing the window and TM asks me if I want to save my changes. I confirm and for that session the hot key is displayed but does not work. After closing TM I have again the old shortcut written in the menu and doing his job. So it looks like the old data is loaded on restart.
Did you remove the key equivalent settings you did via System Preferences? If not, perhaps these are causing the issues.
If these have been removed, try look in ~/Library/Application Support/Avian/Bundles/Source.tmbundle/Commands. There should be a “Comment Line / Selection.tmDelta” file which is a property list holding your key equivalent change.