Sublime Text Kit
Sublime Text Kit is a command line interface for managing Sublime Text metadata for multiple projects, sessions, snippets, etc. This allows you to avoiding manual maintenance of your workspace so you can stay focused on your own work.
To install, run:
gem install sublime_text_kit
Command Line Interface (CLI)
From the command line, type:
USAGE: -c, --config ACTION Manage gem configuration. Actions: edit or view. -h, --help Show this message. -m, --metadata ACTION Manage project metadata. Actions: create, delete, or recreate. -S, --session Rebuild session metadata. -s, --snippets [FORMAT] View snippets. Default: ascii_doc. Formats: markdown or ascii_doc. -u, --update Update project and session metadata based on current settings. -v, --version Show gem version.
This gem can be configured via a global configuration:
~/.config/sublime_text_kit/configuration.yml. It can also be configured via
XDG environment variables.
An example configuration could be:
:project_roots: - "~/Engineering/Organizations" - "~/Engineering/OSS" :metadata_dir: "~/Dropbox/Cache/Sublime" :snippets_format: :ascii_doc
Feel free to take this configuration, modify, and save as your own.
project_roots key defines the root level directories where your project folders are located.
When project metadata (i.e.
.sublime-workspace) is generated, the name of the
metadata file will be the same name as the project folder. All project metadata, regardless of root
location, is written to the same metadata directory as defined by the
metadata_dir key. If using
the example settings shown above and assuming the following directory structure exists…
…project metadata will be created in the
metadata_dir as follows:
~/Dropbox/Cache/Sublime/example.sublime-project ~/Dropbox/Cache/Sublime/example.sublime-workspace ~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-project ~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-workspace
snippets_format key allows you define what format to print your snippets as. The default
format is Markdown but you can switch to ASCII Doc too. You can always override your default
configuration by specifying the format from the command line:
sublime_text_kit -s ascii_doc. For
example, this is how snippets
documentation is genereted for the
Sublime Text Setup project.
The following demonstrates a default Sublime Text setup:
Start by defining your configuration:
sublime_text_kit --config edit.
Shutdown Sublime Text (i.e.
sublime_text_kit --updatewhich will create project metadata and rebuild session metadata so Sublime Text has a complete project history from which to switch between via the
Launch Sublime Text and use the
CONTROL+COMMAND+pkeyboard shortcut to toggle between projects. Notice that you can (fuzzy type) project names to jump between them.
Navigate through your project workload with ease. 🎉
When rebuilding your session, ensure Sublime Text is shut down or changes might not be applied properly.
When rebuilding project metadata, ensure the
metadata_dir— as defined via your configuration — points to an existing directory which can contain
To contribute, run:
git clone https://github.com/bkuhlmann/sublime_text_kit.git cd sublime_text_kit bin/setup
You can also use the IRB console for direct access to all objects:
To test, run:
bundle exec rake
Read Semantic Versioning for details. Briefly, it means:
Major (X.y.z) - Incremented for any backwards incompatible public API changes.
Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
Code of Conduct
Read Code of Conduct for details.
Read Contributions for details.
Read License for details.
Read Changes for details.
Engineered by Brooke Kuhlmann.