Default File Type
ST2 Package which automatically sets the syntax for new files
Details
Installs
- Total 63K
- Win 50K
- Mac 10K
- Linux 3K
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 4 | 0 | 1 | 1 | 2 | 2 | 9 | 0 | 0 | 4 | 5 | 1 | 5 | 2 | 6 | 2 | 2 | 2 | 1 | 1 | 3 | 3 | 0 | 5 | 6 | 4 | 5 | 4 | 5 | 6 | 5 | 8 | 4 | 5 | 4 | 5 | 3 | 5 | 2 | 3 | 2 | 4 | 6 | 5 | 3 | 2 |
Mac | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 0 | 1 | 0 | 0 | 4 | 2 | 0 | 0 | 0 | 2 | 0 | 4 | 1 | 3 |
Linux | 0 | 0 | 0 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
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