Skip to content

Commit 5361121

Browse files
committed
Merge branch 'master' into pr/ci-spelling
2 parents 8a9d136 + c2e6bf8 commit 5361121

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,38 @@ Alternatively, download the portable version and clone this repository directly
4141
### ⚠️ Things to keep in mind
4242

4343
After you've finished, keep in mind that you're now overriding a default package.
44-
- If other people make upstream changes to an overridden package, yours will be out-of-date when Sublime Text updates to a new version. To get the latest version, pull the changes from this repository.
45-
- If you delete/rename files, but they still exist in the package version which was shipped with the build of Sublime Text you are using, those original files will still be picked up by Sublime unless you replace the entire shipped package with an installed package by the same name. For example, if your build of Sublime has a `syntax_test_sql.sql` file inside the root of `<ST Installation Dir>/Packages/SQL.sublime-package`, then you symlink the SQL folder from this repository to `<ST User Data Dir>/Packages/SQL`, and move that file to a `tests` subfolder, then run all syntax tests, the old syntax test file will still get used in addition to the new one. To fix this, you can create an empty zip file in your `<ST User Data Dir>/Installed Packages` directory like `SQL.sublime-package` and that will cause ST to load this one in place of the shipped one. Then you are just overriding an empty package, instead of merging new files into an existing package.
44+
45+
- If other people make upstream changes to an overridden package,
46+
yours will be out-of-date when Sublime Text updates to a new version.
47+
To get the latest version, pull the changes from this repository.
48+
- If you delete/rename files,
49+
but they still exist in the package version which was shipped with the build of Sublime Text you are using,
50+
those original files will still be picked up by Sublime,
51+
unless you replace the entire shipped package with an installed package by the same name.
52+
53+
For example, if your build of Sublime has a `syntax_test_sql.sql` file
54+
inside the root of `<ST Installation Dir>/Packages/SQL.sublime-package`,
55+
then you symlink the SQL folder from this repository to `<ST User Data Dir>/Packages/SQL`,
56+
and move that file to a `tests` subfolder,
57+
then run all syntax tests,
58+
the old syntax test file will still get used in addition to the new one.
59+
60+
To prevent this,
61+
you can create an empty zip file
62+
in your `<ST User Data Dir>/Installed Packages` directory like `SQL.sublime-package`
63+
and that will cause ST to load this one in place of the shipped one.
64+
Then you are just overriding an empty package,
65+
instead of merging new files into an existing package.
66+
67+
A quick way to create such an empty zip file is via:
68+
```bash
69+
$ printf "PK\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" > empty.zip
70+
# or
71+
$ touch dummy && zip empty.zip dummy && zip -d empty.zip dummy && rm dummy
72+
```
73+
Optionally, to make your empty packages stand out in directory listings,
74+
you can create them using symlinks to this empty zip file instead of copying it,
75+
e.g. `ln -s empty.zip SQL.sublime-package`.
4676

4777
## Reference
4878

0 commit comments

Comments
 (0)