View Full Version : Emmet “expand abbreviation” by tab button

Hello, I'm new to Komodo, and I am trying to figure out how to correctly use the preview function.
As of right now, when I press the globe icon to preview my file, one of two things happens:

If I select preview in a Komodo Tab, the webview opens up on the bottom of the window, and I am presented with a panel that asks me if I want to save or open the file. If I click open, it gives me a list of other applications, which isn't what I want, and if I click save, the panel goes away, but the webview remains empty, without loading the file. If I then refresh the webview it loads an empty "about:blank" page.

If I select preview in chrome, the file opens in chrome, but it opens as "file://localhost/Users/myUserName/Sites/..." which just displays the text of the php file. I need it to open as "http://localhost/~myUserName/..." to actually run the code.

Is there any way to fix this? (I'd like to be able to get it running both in Komodo and Chrome, just to save myself the hassle of opening up chrome and typing in the URL of the file every time.) I tried the "Map URI" feature to map "file://localhost/Users/myUserName/Sites/" to "http://localhost/~myUserName/" and vice-versa, but nothing changed.

There are 2 things you can do.

When working in Projects, go into your project properties and navigate to the "Mapped URIs" pane. Once there, set up the mapping between your local files and they're URI equivalent. You can learn more about Projects in this screencast: http://komodoide.com/screencasts/watch/87287634-projects-and-what-theyre-for/
114 (http://komodoide.com/screencasts/watch/87287634-projects-and-what-theyre-for/)
You can also manually set the URI for a single file by right clicking in the editor and going to "Properties and Preferences", then go to the "Browser Preview" pane and fill out your preferences.

Hope that answers your question.

Still no luck. I tried creating a project and mapping "file://localhost/Users/myUserName/Sites/" to "http://localhost/~myUserName/" in both the project and general settings and the preview is still opening up as "file://localhost/Users/myUserName/Sites/Test.php" instead of "http://localhost/~myUserName/Test.php" as I would like.
I got it to work by going into the file preferences and mapping the entire URL, but I don't want to have to do that for every single file I create. Is there any way to just have it map the local file directory (just the "file://localhost/Users/myUserName/Sites/" part) to the directory that works to run the actual code (just the "http://localhost/~myUserName/" part) so that I can have any files I create in the Sites directory automatically run correctly when I preview them?