I'm trying to change the hotkey in the PHP bundle's validation function to CMD-S from the default but when I try and save the bundle I get an error saying there was an error:
[image: Inline images 1]
I've done the exact change on another machine without any problems. How do I get around this?
Ken
On 15 Aug 2013, at 22:43, Ken Snyder wrote:
I'm trying to change the hotkey in the PHP bundle's validation function to CMD-S from the default but when I try and save the bundle I get an error saying there was an error: […]
You can try enable logging: https://github.com/textmate/textmate/wiki/Enable-Logging
Though it likely will just tell you the path of the file it failed to save. But perhaps this can clue you in on what goes wrong, e.g. if for some reason you have some bad permissions or symbolic links under ~/Library/Application Support.
You can also try https://github.com/textmate/textmate/wiki/Reverting-To-Defaults and then see if save fails after that, or try the change on a new user account.
Basically saving bundle items should only fail if there is a problem writing data to your file system.
Ok, turning on the debugger I can see why the file was unable to be saved (I had a stale symbolic link in the path). By fixing that I can now save the hotkey for PHP validator to ⌘S. However, now the problem is that when I use this hotkey it appears to validate my PHP but no longer SAVES it. :^/
Any idea how I can get ⌘S to do both not either-or?
Ken
On 18 August 2013 19:07, Allan Odgaard mailinglist@textmate.org wrote:
On 15 Aug 2013, at 22:43, Ken Snyder wrote:
I'm trying to change the hotkey in the PHP bundle's validation function to
CMD-S from the default but when I try and save the bundle I get an error saying there was an error: […]
You can try enable logging: https://github.com/textmate/** textmate/wiki/Enable-Logginghttps://github.com/textmate/textmate/wiki/Enable-Logging
Though it likely will just tell you the path of the file it failed to save. But perhaps this can clue you in on what goes wrong, e.g. if for some reason you have some bad permissions or symbolic links under ~/Library/Application Support.
You can also try https://github.com/textmate/**textmate/wiki/Reverting-To- **Defaultshttps://github.com/textmate/textmate/wiki/Reverting-To-Defaultsand then see if save fails after that, or try the change on a new user account.
Basically saving bundle items should only fail if there is a problem writing data to your file system.
______________________________**_________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/**listinfo/textmatehttp://lists.macromates.com/listinfo/textmate
On 22 Aug 2013, at 9:04, Ken Snyder wrote:
[…] Any idea how I can get ⌘S to do both not either-or?
What you probably want is to leave the key equivalent bland and instead give it a semantic class of callback.document.did-save or maybe callback.document.will-save (if you want it to run before saving).
Be sure to also have the command’s ‘Save’ pop-up set to ‘Nothing’ (to avoid an infinite loop).
Depends of course of your goal, but with the above, you can set the command’s output to be a tool tip, where you can then optionally show errors from validation.
Ok well I've switched to the callback.document.did-save semantic class and that seems to work. Still a bit odd that it works fine on my home computer the other way but not on my laptop. Ahhh well, it doesn't really matter as long as it works. Thanks for getting me to the finish line.
Ken
On 22 August 2013 09:58, Allan Odgaard mailinglist@textmate.org wrote:
On 22 Aug 2013, at 9:04, Ken Snyder wrote:
[…] Any idea how I can get ⌘S to do both not either-or?
What you probably want is to leave the key equivalent bland and instead give it a semantic class of callback.document.did-save or maybe callback.document.will-save (if you want it to run before saving).
Be sure to also have the command’s ‘Save’ pop-up set to ‘Nothing’ (to avoid an infinite loop).
Depends of course of your goal, but with the above, you can set the command’s output to be a tool tip, where you can then optionally show errors from validation.
______________________________**_________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/**listinfo/textmatehttp://lists.macromates.com/listinfo/textmate