I am pleased to announce the initial public release of sublime_lib, a new Package Control dependency providing a variety of convenience features for other packages to use.
sublime_lib makes it easier for packages to work with a variety of built-in Sublime Text features. If you’re a package developer, take a look at the API reference to see if sublime_lib can make your life easier.
Current release
1.2, released December 17 2018.
Summary of features
-
SettingsDict
— Wrapper forsublime.Settings
with adict
-like interface. -
NamedSettingsDict
—SettingsDict
for a sublime-settings file. -
ViewStream
— Read/write stream encapsulating a View object. -
OutputPanel
—ViewStream
wrapping an output panel. -
ResourcePath
—pathlib
[-inspired representation of a Sublime Text resource path. -
new_view()
— Open a newView
with a variety of convenient options. -
close_view()
— Close aView
, discarding unsaved changes or raising an exception. -
new_window()
– Open a new window and return theWindow
object. -
close_window()
— Close aWindow
, discarding unsaved changes or raising an exception. -
show_selection_panel()
— Open a quick panel to select an item from a list. -
list_syntaxes()
— List all loaded syntax definitions. -
get_syntax_for_scope()
— Get the syntax definition for a given scope. -
sublime_lib.encodings
— Translate between Sublime and standard encoding names. -
sublime_lib.flags
— Enumerations for built-in flags.