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

372 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 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 inspired interface for sublime.Settings objects.
  • OutputPanel, extending ViewStream to provide additional functionality for output panel views.
  • ViewStream, a standard Python IO stream wrapping a sublime.View object

Deprecated

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

The syntax submodule, is 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 should be created that builds a WHEEL file, creates a release for this tag and attaches the WHEEL file as an artefact.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages