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