0

Currently Textmate uses Safari's Webkit to render the hmlt outputs for both commands and the live webpreview window.

Unfortunately for one specific project I am working with specific javascript API supported only be Firefox's gecko or Chrome's Webkit, it seems Safari still not supporting it.

Perhaps there's a way to globally change Safari for Chromium or Webkit Nightly?

tshepang
  • 12,111
  • 21
  • 91
  • 136
zanona
  • 12,345
  • 25
  • 86
  • 141

2 Answers2

3

A support member of TextMate kindly answered my email asking for it by mentioning this url which definitely points to the right solution. I really didn't think it could be done so seamlessly and now I am very happy that it is possible.

Basically there are few steps to follow:

$ cd /Applications/TextMate.app/Contents/MacOS/
$ mv TextMate _TextMate
$ vim TextMate

new TextMate file contains (note that you might want to change the path for the new webkit framework to fit the one you like)

#!/bin/bash
env DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.6/WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES /Applications/TextMate.app/Contents/MacOS/_TextMate

after saving the newly created file:

$ chmod a+x TextMate

Close/Run TextMate :)

Or obvious if you just want to do this for each session you can simply use the bash command right away from terminal like this:

$ env DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.6/ WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES /Applications/TextMate.app/Contents/MacOS/TextMate

This is really cool...one thing I've noticed after that is that my themes are no longer being displayed, have no clue about it but I will try to check the cause.

zanona
  • 12,345
  • 25
  • 86
  • 141
1

try this - http://wiki.macromates.com/Main/Howtos#SafariPreview

Larry
  • 38
  • 3
  • thanks a lot Larry, this does part of what I wanted is really usefull...I just needed to change it to reload the tab with applescript instead. One another issue thought is that it seems the embedded TM webpreview window allows you to perform cross-site ajax calls without any warning, this is great for development. But unfortunately if opening on an external browser as it is a local file, it mostly will prevent the ajax call for succeed. – zanona May 31 '11 at 20:15
  • Just found [this](http://stackoverflow.com/questions/330427/can-i-disable-sop-same-origin-policy-on-any-browser-for-development/2771363#2771363) which might resolve the xhr issue – zanona May 31 '11 at 22:40