Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SublimeText/sublime_lib
Utility library for frequently used functionality in Sublime Text and convenience functions or classes
https://github.com/SublimeText/sublime_lib
Last synced: 16 days ago
JSON representation
Utility library for frequently used functionality in Sublime Text and convenience functions or classes
- Host: GitHub
- URL: https://github.com/SublimeText/sublime_lib
- Owner: SublimeText
- License: mit
- Created: 2018-04-03T18:46:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-05T02:06:51.000Z (over 3 years ago)
- Last Synced: 2024-08-01T05:24:00.240Z (3 months ago)
- Language: Python
- Homepage: https://sublimetext.github.io/sublime_lib
- Size: 769 KB
- Stars: 52
- Watchers: 13
- Forks: 4
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sublime_lib
A utility library for Sublime Text providing a variety of convenience features for other packages to use.
## Installation
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:
```json
{
"*": {
"*": [
"sublime_lib"
]
}
}
```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.
Then, anywhere in your package, you can import sublime_lib by name:
```python
import sublime_lib
```## Features
For complete documentation of all features, see the [API documentation](https://sublimetext.github.io/sublime_lib/).
Highlights include:
- [`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`.
- [`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.
- 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.