Sublime Forum

Browser sync doesn't work on MAC

#1

Hello All,
I am not sure this is legal to post three question at same time.

a) I am coding html using sublime tex4 on MacOS. But live preview “Browser Sync” doesn’t work. Safari or chrome (which is only available on my machine)

b) Right click, “open in browser”, alway open in safari. How can I change it to chrome or other browser.?

c) How to last opened project and terminus at bottom always.

I recently purchased sublime to do all in one programming like python, HTML, Java, C and latex. So far its very robust, comfortable and powerful to run everything on Sublime unless initial configuration.

Can anyone help me out to configure and setup.

Thank you.

0 Likes

#2

I’m not familiar with the BrowserSync package specifically, but this isn’t the first time I’ve heard mention of it not working. I suspect it needs to be changed/updated but the author hasn’t updated it in quite some time.

For Open in Browser, I beleive it should be picking whatever the default web browser is for your system, so if you’ve changed the default that should work. If you want Safari to be your default browser then you’d likely need to use something different to do this. Is that the case for you?

For your Terminus question, I’m not quite sure what it is that you’re asking there, but the key binding that you can set up for toggling a Terminus panel that is outlined in the package README should use the currently open folder in the window; is that what you’re trying to do?

0 Likes

#3

“For your Terminus question, I’m not quite sure what it is that you’re asking there, but the key binding that you can set up for toggling a Terminus panel that is outlined in the package README should use the currently open folder in the window; is that what you’re trying to do?”

Question number in 3 consists of two part question.

a. When I close and reopen the sublime Text4. Last open project will not appear but new window opens. I wanted to make this auto open last session. (Every time I don’t wanted to it manually).

b. I want to have the layout in such a way that terminus should be bottom panel (like under View -> Layout -> 2 column, but instead terminal window with top Edition). And this should be fix theme whenever I open new window or last session.

Hope I made this is clear.

0 Likes

#4

Terminus doesn’t support automatically re-opening terminals that were open at the time when Sublime closed because in the general case, that’s not possible (for example, imagine you’re in a terminal in the middle of running some program when you quit Sublime ; how would Terminus know how to get that arbitrary program back into the same state it was before).

However, the README includes two key binding examples:

    { 
        "keys": ["alt+`"], "command": "toggle_terminus_panel"
    }

and:

    { 
        "keys": ["ctrl+alt+t"], "command": "terminus_open", "args": {
            "cwd": "${file_path:${folder}}"
        }
    }

The first one toggles a panel at the bottom of the window open and closed with a terminal in it; the first time you do it in any session the terminal will be created, making it transparent to you that it’s happening. The second one opens the terminal in a regular tab instead, if you want it always visible.

There’s also a third binding that uses the Origami package:

    {
        "keys": ["ctrl+alt+t"],
        "command": "terminus_open",
        "args": {
            "post_window_hooks": [
                ["carry_file_to_pane", {"direction": "down"}]
            ]
        }
    }

Arguably the panel is the nicer option because it’s easy to hide, but the Origami option may also be useful to you if you want the terminal to be always visible. In that case you need to manually press the key to open the terminal though (and old terminal tabs will tend to hang around unless you close them).

0 Likes