Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bkuhlmann/sublime_text_kit
A command line interface for managing Sublime Text metadata.
https://github.com/bkuhlmann/sublime_text_kit
cli project-management sublime-text
Last synced: about 2 months ago
JSON representation
A command line interface for managing Sublime Text metadata.
- Host: GitHub
- URL: https://github.com/bkuhlmann/sublime_text_kit
- Owner: bkuhlmann
- License: other
- Created: 2014-01-28T04:10:10.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T01:15:44.000Z (about 2 months ago)
- Last Synced: 2024-11-05T01:21:51.631Z (about 2 months ago)
- Topics: cli, project-management, sublime-text
- Language: Ruby
- Homepage: https://alchemists.io/projects/sublime_text_kit
- Size: 977 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE.adoc
- Citation: CITATION.cff
Awesome Lists containing this project
README
:toc: macro
:toclevels: 5
:figure-caption!:= 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.toc::[]
== Features
* Manages project metadata (`.sublime-project` and `.sublime-workspace` files).
* Manages session metadata so you can quickly toggle between projects via the `CONTROL+COMMAND+p`
shortcut.
* Prints all of your custom snippets in either link:https://asciidoctor.org[ASCII Doc] or
link:https://daringfireball.net/projects/markdown[Markdown] format.== Requirements
. link:https://www.ruby-lang.org[Ruby]
. link:https://www.sublimetext.com[Sublime Text]== Setup
To install _with_ security, run:
[source,bash]
----
# π‘ Skip this line if you already have the public certificate installed.
gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)
gem install sublime_text_kit --trust-policy HighSecurity
----To install _without_ security, run:
[source,bash]
----
gem install sublime_text_kit
----== Usage
=== Command Line Interface (CLI)
From the command line, type: `sublime_text_kit`
image:https://alchemists.io/images/projects/sublime_text_kit/screenshots/usage.png[Usage,width=773,height=413,role=focal_point]
=== Customization
This gem can be configured via a global configuration:
`~/.config/sublime_text_kit/configuration.yml`. It can also be configured via
link:https://alchemists.io/projects/xdg[XDG] environment variables.An example configuration could be:
[source,yaml]
----
project_roots:
- "~/Engineering/Organizations"
- "~/Engineering/OSS"
metadata_dir: "~/Dropbox/Cache/Sublime"
snippets_format: :markdown
----The `project_roots` key defines the root level directories where your project folders are located.
When project metadata (i.e. `.sublime-project`, `.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β¦....
~/Engineering/OSS/example
~/Engineering/OSS/sublime_text_kit
.......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
....The `snippets_format` key allows you define what format to print your snippets as. 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
link:https://alchemists.io/projects/sublime_text_setup/#_snippets[snippets documentation] is
generated for the link:https://alchemists.io/projects/sublime_text_setup[Sublime Text Setup]
project.=== Workflow
The following demonstrates a default Sublime Text setup:
1. Start by defining your configuration: `sublime_text_kit --config edit`.
2. Shutdown Sublime Text (i.e.Β `COMMAND+q`).
3. Run `sublime_text_kit --update` which will create project metadata and rebuild session metadata
so Sublime Text has a complete project history from which to switch between via the
`CONTROL+COMMAND+p` shortcut.
4. Launch Sublime Text and use the `CONTROL+COMMAND+p` keyboard shortcut to toggle between projects.
Notice that you can (fuzzy type) project names to jump between them.
5. Navigate through your project workload with ease. π=== Troubleshooting
* 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 `.sublime-project` and `.sublime-workspace`
files.== Development
To contribute, run:
[source,bash]
----
git clone https://github.com/bkuhlmann/sublime_text_kit
cd sublime_text_kit
bin/setup
----You can also use the IRB console for direct access to all objects:
[source,bash]
----
bin/console
----== Tests
To test, run:
[source,bash]
----
bin/rake
----== link:https://alchemists.io/policies/license[License]
== link:https://alchemists.io/policies/security[Security]
== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
== link:https://alchemists.io/policies/contributions[Contributions]
== link:https://alchemists.io/policies/developer_certificate_of_origin[Developer Certificate of Origin]
== link:https://alchemists.io/projects/sublime_text_kit/versions[Versions]
== link:https://alchemists.io/community[Community]
== Credits
* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].