Sublime Forum

Problems with fileType "detection" (ST2/ST3)

#1

Hi,

There are two related issues I’ve been experiencing for some time. I finally joined the forums to find out what can be done about it.

  1. Whenever I open a *.sass file in ST3 (or ST2) it thinks it is “Ruby Haml”. I’m not sure why this is. The Sass bundle (installed via package control) does specify Sass in the block. I don’t know what is in the Ruby Haml bundle. I’ve tried adding Ruby Haml to the ignored packages list or even looking for a way to delete it. It’s so annoying to need to “Set syntax Sass” every time I open a Sass file.

  2. I don’t know where the bundled Ruby package comes from, how I can improve it, or how I can update Sublime Text to use those improvements? It’s not listed at github.com/textmate/ruby.tmbundle four months ago, but the current Sublime Text 3 beta doesn’t ship with those updates.

These are frustrating issues that should be really trivial to resolve.

Nathan.

0 Likes

#2

View > Syntax > Open all with current extension as… > Sass

0 Likes

#3

Thanks drifter! That does the trick.

It still seems over-engineered/counter-intuitive vs. just treating *.sass as Sass out of the box, but at least it’s a workable solution.

My other question remains open though. How does one contribute and update the built-in bundles (eg. Ruby)?

Nathan.

0 Likes

#4

ST doesn’t have Sass support out of the box. Small issues between conflicting third party packages or third party vs default packages should be expected sometimes.

Assuming you’re using this github.com/nathos/sass-textmate-bundle the readme there have instructions how to fix that Rails HAML issue for ST2, if you really want to bother with that.
For ST3 there’s an extra step since all the default packages come zipped into .sublime-package files (located in /Packages in ST3 install folder). So unzip that file from .sublime-package archive, fix it and then open your custom packages folder (Preferences > Browse Packages…,) create Rails folder there and put the file into it. That’s generally how you can override stuff.

0 Likes

#5

@drifter thanks again for the info.

Might I assume that the default packages are not in version control somewhere where the community can patch things? Instead everyone has to patch locally? Kinda sad.

0 Likes

#6

Yeah… :frowning:

Something happens with these: svn.textmate.org/trunk/Bundles/ but I don’t know how contribution works etc.

0 Likes

#7

I contributed some changes to github.com/textmate/ruby.tmbundle. I’ll have to check if the latest beta of Sublime Text includes those changes.

0 Likes