This question already has an answer here:
I have a series of files with arbitrary names and extensions. Like:
I want these files to open with an editor, like TextMate or Sublime Text, on double-clicking, without having to right-click and choosing the editor from applications.
Basically the Finder should open any unknown extension file with the text editor.