Sublime Forum

Sublime ignores default syntax

#1

Hey something has changed with my sublime text settings.

The syntax will be set to HTML every time I open a *.html.erb file.
I’m aware of the menu in the bottom right corner. I’ve set it to rails several times now.

Any idea how to fix that?

0 Likes

#2

mis-leading.

0 Likes

#3

@jfcherng, that’s exactly what the status bar menu provides as well.

@gambo, do you have any custom themes installed? If so, which?

0 Likes

#4

@FichteFoll I challenge. I don’t think so.

0 Likes

#5

https://i.lithi.io/lAVxB.webm

0 Likes

#6

@FichteFoll

Oh god. I thought he choose from corner -> HTML -> Rails -> HTML (Rails) in the thumbnail.

Sorry, my fault.

0 Likes

#7

The file extension for HTML (Rails) in ST is .html.erb.


After selecting from the menu, ST creates the following file.

Manually modify it into the following may work.

{
    "extensions":
    [
        ".erb.html"
    ]
{
0 Likes

#8

@FichteFoll

yeah I have this:

"theme": "Cyanide.sublime-theme",
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",

Do you think it has anything to do with that?
I’ve changed it recently. So it’s not unlikely that is has something to do with that.

0 Likes

#9

It does.

I suppose the easiest user-side fix is to override this HTML setting by creating a Packages/User/HTML.sublime-settings file and filling it with this:

{
    "extensions":
    [
        "html"
    ]
}

This has been a problem with other popular themes too, notably Material: https://github.com/equinusocio/material-theme/issues/682

1 Like