I met the developer who was responsible when I was employed by Amazon. He was trying to reply to an email, but I believe it was a "reply all" (if I recall the details of the story correctly) and the list was massive. Meanwhile, people on that same massive list were also doing a "reply all" to submit their feedback or reply that the email didn't apply to them. Massive email storm resulted. He didn't give all the details but he was ear-to-ear grinning as he told us the story.
- Select a filetype you'd want to change the default application for and open the File Info (Cmd+I)
- In the "Open with" section, select the app you want to be the default app for the filetype
- To persist the default app along the whole filetype, also click the "Change All" button right below it.
That's up to the application. You can crack open the app packages for Sublime Text and MacVim and see how their Info.plist files differ. It's also worth looking at the Info.plist for TextEdit, which has a catch-all for all non-executable files.