Default File Type
ST2 Package which automatically sets the syntax for new files
Details
Installs
- Total 63K
- Win 50K
- Mac 10K
- Linux 3K
Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 4 | 6 | 3 | 0 | 4 | 5 | 2 | 3 | 5 | 6 | 4 | 4 | 8 | 2 | 5 | 7 | 2 | 2 | 6 | 0 | 3 | 0 | 5 | 3 | 9 | 6 | 3 | 2 | 4 | 8 | 3 | 8 | 3 | 11 | 4 | 6 | 6 | 4 | 3 | 3 | 2 | 3 | 3 | 5 | 10 |
Mac | 1 | 3 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 3 | 0 | 1 | 0 | 1 | 3 | 0 | 2 | 0 | 1 | 3 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 |
Linux | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 2 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
Readme
- Source
- raw.githubusercontent.com
This package sets the default file type of new files to be either the same as the current file, or a predefined default.
This only affects files which are created with the Ctrl+N
shortcut (Cmd+N
on OSX).
Installation
With Package Control
If you have the Package Control package installed, you can install DefaultFileType from inside Sublime Text itself. Open the Command Palette and select “Package Control: Install Package”, then search for DefaultFileType and you're done!
Without Package Control
Go to your Sublime Text Packages directory and clone the repository using the command below:
git clone https://github.com/spadgos/sublime-DefaultFileType.git DefaultFileType
Configuration
Create a file in your Packages/User
directory called default_file_type.sublime-settings
and you can set these options:
default_new_file_syntax
(String) This is the path, relative to the Sublime base directory to the language file you'd like to load as the default. Default value is"Packages/Java/Java.tmLanguage"
use_current_file_syntax
(Boolean) Set this totrue
to use the current file's syntax for the new file. Iffalse
, then the default (above) will always be used. Default value istrue
Let me know if you have any problems or feature requests by adding an issue here: https://github.com/spadgos/sublime-DefaultFileType