Skip to content

Utility library for frequently used functionality in Sublime Text and convenience functions or classes

License

Notifications You must be signed in to change notification settings

SublimeText/sublime_lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

378 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sublime_lib

A utility library for Sublime Text, providing a variety of convenience features.

Installation

To make use of sublime_lib in a package...

  1. declare it as a dependency:

    Create a file named dependencies.json with the following contents in package's root directory:

    {
        "*": {
            "*": [
                "sublime_lib"
            ]
        }
    }

    Open Command Palette and run Package Control: Satisfy Libraries to ensure sublime_lib is installed and available for use.

  2. Import sublime_lib in plugins which want to make use of it.

    import sublime_lib

Features

For complete documentation of all features, see the API documentation.

Highlights include:

  • ActivityIndicator context manager to indicate background activity via status bar.
  • ResourcePath, a pathlib.Path-inspired representation of ST's resource paths with methods to convert from and to filesystem paths.
  • SettingsDict provides a standard Python dict-like interface for sublime.Settings objects.
  • ViewStream, providing a standard Python IO stream wrapping a sublime.View object.
  • OutputPanel, extending ViewStream to provide additional functionality for output panel views.

Deprecated

The flags submodule is deprecated in favour of native API, available as of ST4135.

The Syntax Utilities are marked deprecated in favour of native API functions, available as of ST4.

Releasing a new version

  1. Create a tag in the format v<major>.<minor>.<patch>
  2. Push the tag to origin.

A GitHub action builds a WHEEL file, creates a release for this tag, and attaches the WHEEL file as an artifact.

About

Utility library for frequently used functionality in Sublime Text and convenience functions or classes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages