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