Skip to content

Commit adb681f

Browse files
Thomas SmithFichteFoll
authored andcommitted
Improve readme (#46)
1 parent dc1678e commit adb681f

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
11
# sublime_lib
22

3-
Utility library for frequently used functionality in Sublime Text library and convenience functions or classes
3+
A utility library for Sublime Text providing a variety of convenience features for other packages to use.
4+
5+
## Installation
6+
7+
To make use of sublime_lib in your own package, first declare it as a [dependency](https://packagecontrol.io/docs/dependencies) of your package. Create a file named `dependencies.json` in the root of your package with the following contents:
8+
9+
```json
10+
{
11+
"*": {
12+
"*": [
13+
"sublime_lib"
14+
]
15+
}
16+
}
17+
```
18+
19+
Once you have declared the dependency, open the command palette and run `Package Control: Satisfy Dependencies` to ensure that sublime_lib is installed and available for use.
20+
21+
Then, anywhere in your package, you can import sublime_lib by name:
22+
23+
```python
24+
import sublime_lib
25+
```
26+
27+
## Features
28+
29+
For complete documentation of all features, see the [API documentation](https://sublimetext.github.io/sublime_lib/).
30+
31+
Highlights include:
32+
33+
- [`SettingsDict`](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.settings_dict.html), which wraps a `sublime.Settings` object with an interface modeled after a standard Python `dict`.
34+
- [`ViewStream`](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.view_stream.html), a standard [Python IO stream](https://docs.python.org/3/library/io.html#io.TextIOBase) wrapping a `sublime.View` object; and [OutputPanel](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.output_panel.html), which extends `ViewStream` to provide additional functionality for output panel views.
35+
- The [`syntax` submodule](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.syntax.html), providing methods to list all loaded syntax definitions and to find a syntax matching a given scope.

0 commit comments

Comments
 (0)