-
Notifications
You must be signed in to change notification settings - Fork 3
/
File organization.txt
69 lines (65 loc) · 10.7 KB
/
File organization.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
All files format:
| File format | Purpose | Merge [[#File location]] | File name |
|---------------------|----------------------------------------------------------|--------------------------|-------------|
| *.sublime-menu | Define Menubar and right click menu [[sublime-menu.txt]] | Added up | Significant |
| *.py | Plugin written in Python [[Plugin.txt]] | Mutually-exclusive | N |
| *.tmLanguage | Syntax definition [[tmLanguage.txt]] | Mutually-exclusive | Significant |
| *.hidden-tmLanguage | marged with .tmlanguage | Mutually-exclusive | Significant |
| *.tmPreferences | Control miscellaneous behaviours [[tmPreferences.txt]] | Mutually-exclusive | N |
| *.sublime-settings | [[sublime-settings.txt]] | Mutually-exclusive | Significant |
| *.sublime-keymap | Keybinding [[Key Binding.txt]] | Mutually-exclusive | Significant |
| *.sublime-mousemap | Mouse shortcut | Mutually-exclusive | N |
| *.sublime-theme | [[Theme.txt]] | Mutually-exclusive | Significant |
| *.tmTheme | [[Theme.txt]] | One-at-a-time | Significant |
| *.sublime-macro | [[Macro.txt]] | ?? | Significant |
| *.sublime-snippet | [[Snippet.txt]] | ?? | Significant |
| *.sublime-commands | [[Command.txt]] | Added up | Significant |
| *.sublime-project | Project definition [[Project.txt]] | One-at-a-time | Significant |
| *.sublime-workspace | Workspace (part of Project) [[Project.txt]] | One-at-a-time | Significant |
| *.sublime-build | Build system [[Build.txt]] | | N |
| *.sublime-package | Collection of all above files (rename to .zip → extract) | | N |
| \Data\Local\*.* | Sessions to restore everytime ST startup | | |
| \Data\Index | Cache Index symbol if Preferences > "index_files": true, | | |
Package:
is a collection of *.sublime-*, *.tmLanguage, *.py,... files stored in either:
a single folder in Data\Packages (User-created package - ST load these on start-up)
single *.sublime-package file in Sublime Text\Data\Installed Packages\ (User-created package - ST load these on start-up)
single *.sublime-package file in Sublime Text\Packages\ (Default-shipped packages used to restore settings incase disaster)
Note: .sublime-package is a simple zip file (can rename to .zip then extract)
Install by either:
Copy the extracted package to \Data\Packages\
Copy the .sublime-package to \Data\Installed Packages\ then restart ST
File location
Files can be stored in a few places and ST read all these files on start-up:
Data\Packages
Data\Installed Packages (files packed inside the .sublime-package)
If there's conflict, depend on extension, ST solve by either:
Mutually-exclusive
i.e: multiple files contain same setting (i.e: font_size), only one wins base on file location first then on file name
File location priority (Lowest-to-Highest):
Data\Packages\
Data\Packages\User\
Data\Packages\<syntax>\
Data\Packages\User\<syntax>.*
<Buffer Specific Settings>
File name priority (Lowest-to-Highest):
Preferences.sublime-settings
Preferences (<platform>).sublime-settings
Added up
Entries in each files are added up together
Duplicates may appear, i.e: Context.sublime-menu (menu items appear when Right click on main buffer)
One-at-a-time
ST only read 1 file at a time (base on user preference) => no conflict
To edit these files
Step 1: Open these files manually via Windows Explorer or via Menu → Preference Example:
Preference → Settings (Default) = open \Data\Packages\Default\Preferences.sublime-settings
Preference → Keybindings - User = open \Data\Packages\User\Default (<platform>).sublime-keymap
Step 2: Open default settings to lookup for syntax & possible options
Menu → Preference → Settings - Default
Menu → Preference → Key bindings - Default
etc...
Note:
Should not change format of those files (i.e: some only work with ANSI and JSON structure, change line-ending is dangerous too)
Only use default settings files as reference, Should never change these files because:
Will be reset on newer version of ST
Have lowest file location priority => will be overrided easily