Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 3 Default File Type on new file

I was looking around and the questions and answers did not seem to match what I am looking for (Sublime Text 3). Anytime I open a new file it defaults to a plain text file. I mostly work with PHP files so I was wondering if there is a setting that would be changed so that when I open a new file it will default to PHP.

I tried to find this directory path "Packages/Text/Plain_text.tmLanguage" here:

  • C:\Program Files\Sublime Text 3\Packages
  • C:\Users\user\AppData\Roaming\Sublime Text 3\Packages

But I did not find the "tmLanguage" files.

Reference: Sublime Text 2 - Default Document Type

like image 844
Julian Moreno Avatar asked Oct 30 '22 23:10

Julian Moreno


1 Answers

The .tmLanguage files are within the .sublime-package files which are secretly simple archives holding all files necessary for a package to work.

Add a .zip extension to the .sublime-package file that contains the PHP settings and you can extract the .tmLanguage file you want as your new default.

Once you have that file, follow the instructions from the question you linked to and you should be good to go.

Set default file type in Sublime Text

like image 136
schoenburg Avatar answered Dec 14 '22 11:12

schoenburg