DirectorySettings
A Sublime Text package that enables per-directory configuration of Sublime Text preferences.
Details
Installs
- Total 4K
- Win 2K
- Mac 818
- Linux 682
Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
Readme
- Source
- codeberg.org
SublimeDirectorySettings
A Sublime Text package that enables per-directory configuration of Sublime Text preferences.
Table of Contents
Why?
Sublime Text can be configured easily without having to go through a dozen different menus and windows: Just adjust a single JSON file and be done with it. However, out of the box, configuration is limited to one global settings file and a single settings file per project. On top of that, syntax-specific settings for a project cannot be adjusted. SublimeDirectorySettings takes care of all these limitations by enabling flexible per-directory configuration.
Features
- Sublime Text settings are automatically adjusted using per-directory settings files.
- In addition to the general per-directory configuration functionality, settings can further be split by syntax.
- The complete directory tree is searched to discover and merge settings files.
Requirements
SublimeDirectorySettings | Sublime Text |
---|---|
>=2.0.0 | 4 |
1.0.0 | 3 |
Note: The correct version is automatically picked if SublimeDirectorySettings is installed with Package Control.
Installation
Package Control
To install SublimeDirectorySettings with Package Control, select the package DirectorySettings
. Check out the Package Control installation instructions if you need help.
Manual
Following steps can be used if you prefer to manually manage your Sublime Text packages:
- Download SublimeDirectorySettings.
- Extract the downloaded archive.
- Rename the extracted directory to
DirectorySettings
. - Move the directory to your Sublime Text packages directory. You can access the Sublime Text packages directory by opening the command palette and entering
Browse Packages
.
Usage
Note: SublimeDirectorySettings operates in the scope of individual windows/tabs. As a result, application-global settings cannot be controlled. Check the Sublime Text documentation for more details.
General Settings Files
Simply place a file called Preferences.sublime-settings
inside a directory. Any Sublime Text window/tab for a file inside that directory (and subdirectories) will be configured accordingly. Settings files that are lower in the directory tree have higher priority and override settings that are defined in files higher up.
Syntax-Specific Settings Files
You can also split per-directory settings by syntax. For example, to apply settings to JavaScript files inside a directory, use following steps:
- Open a JavaScript file with Sublime Text.
- Access the command palette and enter
Settings Syntax Specific
. This will open a syntax-specific settings file for JavaScript. - Note the name of the open settings file. It will be
JavaScript.sublime-settings
in this example. - Create an equally named file inside the desired directory.
The syntax-specific settings files follow the same discovery and merge logic as the general settings files.
Settings File Format
The settings files for SublimeDirectorySettings have the same format as the Sublime Text settings files. For example:
{
"tab_size": 4,
"rulers": [80],
"translate_tabs_to_spaces": true
}
Example
example/
js/
Preferences.sublime-settings
form.js
Preferences.sublime-settings
HTML.sublime-settings
JavaScript.sublime-settings
index.html
- The window/tab for file
example/index.html
is configured using settings fromexample/Preferences.sublime-settings
andexample/HTML.sublime-settings
. - The window/tab for file
example/js/form.js
is configured using settings fromexample/js/Preferences.sublime-settings
,example/Preferences.sublime-settings
andexample/JavaScript.sublime-settings
.