I've been evaluating Sublime Text 2 for the past week(ish) and am pretty happy with what I've encountered. I'm currently trying to get syntax coloring working how I'd like by using thishttps://gist.github.com/1497794
My current problem is when creating a new file. Once it is saved, the script gets executed and the message that the syntax was set gets printed in the console, but the syntax is then changed by something in Sublime after the on_post_save call. As an example, I create a new file that will be an RSpec spec file. When I save it, I see in the console the message "Switched syntax to: RSpec", but the syntax ultimately becomes Ruby. I added the on_activated call so I could get the syntax changed correctly by clicking off and then back onto the new file. Ideally, I wouldn't have to do that.
My questions are:
- What kinds of things happen in the save process *after* on_post_save is fired?
- Is there a better way to do what I'm I'm trying to do?