在当前版本的Sublime Text 2(Build: 2139)中,您可以使用菜单栏中的选项为某个文件扩展名的所有文件设置语法。打开要为其设置默认扩展名的文件,然后浏览以下菜单:View -> Syntax -> Open all with current extension as... ->[your syntax choice]。
2012-06-28更新: Sublime Text 2的最新版本(至少从Build 2181开始)允许通过单击窗口右下角的当前语法类型来设置语法。这将打开语法选择菜单,菜单顶部有Open all with current extension as...选项。
Note, that is really a zip file. Copy it, rename with .zip at the end, and extract the Makefile.tmLanguage file from it.
Edit the new Makefile.tmLanguage by adding the "firstLineMatch" key and string after the "fileTypes" section. In the example below, the last two lines are new (should be added by you). The <string> section holds the regular expression, that will enable syntax highlighting for the files that match the first line. This expression recognizes two patterns: "-*-Makefile-*-" and "vim:syntax=make".