[TextMate] Open current file through http://localhost/ (was: TextMate v1.0 Feedback)
Allan Odgaard
allan at macromates.com
Sat Oct 16 18:36:23 UTC 2004
On 16. Oct 2004, at 20:15, Max wrote:
> I'm developing a web application in PHP. Is there any chance to work
> on a php page, and then see if it works through
> http://localhost/mypage with a command? Just like F12 from
> Dreamweaver... Or do I have to switch to Safari and click on the
> bookmark I made?
I don't know what Dreamweaver does on F12, but you can do a command
like this:
open `echo $TM_FILEPATH | sed
"s|.*/$USER/Sites/\(.*\)|http://localhost/~$USER/\1|"`
Before running command: probably save ;)
Input/output: none/discard
If you are editing a page named:
/Users/max/Sites/project/page.php
It will open Safari (if default browser) and point it to:
http://localhost/~max/project/page.php
And you can of course assign F12 to this command.
Kind regards Allan
P.S. Generally send these type of questions to the mailing list:
http://lists.macromates.com/mailman/listinfo/textmate
More information about the textmate
mailing list