Sublime Forum

Forgets syntax setting on files without extension

#1

Since few releases ago even a file called Gemfile (which uses Ruby syntax) was able to get its syntax remembered through Open all with current extension as…

Now when we do open such files they are always being treated as Plain Text, and we have to choose the syntax everytime.

0 Likes

#2
You could try the DetectSyntax plugin. By default, it assigns Gemfile and Gemfile.lock the Ruby on Rails syntax, but you could change it in the settings to just Ruby if you wanted. Install it through Package Control. There are plenty of comments in the default settings file to get you started.
0 Likes

#3

Thanks, however I see it being fixed in the last releases.

Cheers

0 Likes

#4

Actually I have to correct myself, it’s not really fixed, it’s just that a plugin probably recognized the Gemfile as ruby automatically.

Guardfile for example, even if I set to always open as ruby, does not store the preference because the file has no extension.

0 Likes