+5

Support file extensions other than .*

Mark Abramov 13 років тому оновлено drkwv 12 років тому 2
Example: RSpec files have filenames like somename_spec.rb, however, you need to save them as somename.spec.rb in order for 'spec.rb' file extension to be assigned to RSpec. On the other hand, even if I save file as somename.spec.rb, I still see a dialog window saying that I used .rb extension and if I wanted to use spec.rb instead.

Such a simple addition would also allow for more interesting stuff, for example, we could add 'extension' Gemfile to ruby syntax and all gemfiles would be recognized as such (right now, there is no way to recognize them other than manually).
+2
Furnther. Loads of textmate bundles have spec.rb as their file type. This would be a really useful feature.

In my web application user can select his own default font name and size. And I have user_settings.css.php file that have PHP code insertion inside it, loading these values, but the rest of file is not PHP by its essence, but CSS. The problem is that sublimetext does not recognize such complex file exensions and detect *.css.php as PHP. When I go to View-Syntax-Open all with... it detects all *.php files as CSS then. It's a problem I request to solve - add complex extension support.

How to parse it? I think, when we have file named something.custom.extension.php, sublime must check ".custom.extension.php" first, then ".extension.php", and then, if it will find no matches, ".php". Such behaviour will be correct in 99,99% of cases.

P.S. I do not using cookies in my case because I need to keep user settings across the different browsers and OS. Using cookies will make code just more confusing, without any advantages of using it.