Sublime Forum

Sublime doesn't save the HTML build system

#1

Hallo, Good night.

I’m Fedora user, I use the Fedora 24. And I’ve installed Sublime text 3.

When I code HTML, I want preview the HTML page, and I create a new HTML build system, and save it. On the last part was everything OK, but when I try to select the HTML build created, doesn’t appear on the list, and I saw on some forums the code and I guess it’s ok my saving code:
{
“cmd”: “open, “-a”,/usr/lib64/opera”,"$file"
}

I hope, you can help me. Thank you, I answer inmediatly. Thanks for coming! (Sorry for my english fails)

0 Likes

#2

Possibly your problem is all of the unquoted double quotes that exist in your cmd line. If you open the Sublime console (Ctrl+` or View > Show Console if you’re using the menu) you will probably see some error messages regarding this, which is why it doesn’t appear in the list.

Try something like this:

{
    "shell_cmd": "open -a /usr/lib64/opera \"${file}\"",
    "working_dir": "${file_path}",
    "selector": "text.html"
}

Save it as the file HTML.sublime-build in your User package. You can figure out where that path is by selecting Preferences > Browse Packages... from the menu and double clicking on User.

This will add a build system named HTML to the build list (because the filename starts with HTML), but due to the selector line it should just automatically be picked up if the current file is an HTML file, so you don’t have to select it explicitly; just setting the build system to Automatic should be enough.

4 Likes

#3

Thanks for you answer OdatNurd. I’followed your instructions and it works!!, but when I try to run the browser view… sends me this text on console:

open: Unable to open /dev/tty3: Permission denied

I’ve changed the user permission, to normal user, but any options (chgrp & chown) works.

Whatever, I am closer to the solution! :slight_smile:

0 Likes

#4

Unfortunately I use neither Fedora nor Opera so I’m not sure how to trouble shoot what might be going on there. I would assume that one of open or opera are trying to send something to the console and failing, but that’s just a guess.

0 Likes

#5

Are you a member of the dialout group? As a normal user, I don’t think you can access /dev/tty3 without membership.

0 Likes

#6

28/JUN/2016 - 10:30
sudo gpasswd --add ${USER} dialout
I used the preview command to add myself, and says that I’m on the group dialout, but the /dev/tty3 stays :sa:

28/JUN/2016 - 10:32
I fixed the issue with the next command:
sudo chmod 666 /dev/tty3

but now, doesn’t open the HTML Preview, I’ll be find solution, and when I have find solution , I’ll be posting here. Whatever if you have some clue about it, I appreciate your contribution.

Thanks fellas!

0 Likes

#7

I found the solution:

For someone that got the same problem as me (ONLY FEDORA 23 & 24)

  • On 1st place I needed create the new build system; (like wrote Odanurd)

depends browser directory you have.

2nd place I had to make myself (my user account) dialout group with the next command:

then

and that is it.

Thanks.

0 Likes

#8

You needed two operas in the path, which is what I was going to suggest. The second opera is the actual browser name. Happy that you got it working.

0 Likes