Sesame
Sesame is a Projects Command Palette. It provides commands to open, add, remove, and switch projects. For example, when you organise your projects like this:
❯ ~/projects
├── laravel
│ ├── fortify
│ ├── framework
│ ├── jetstream
│ ├── passport
│ └── vite-plugin
├── sublimelsp
│ └── LSP
└── wbond
├── package_control
└── packagecontrol.io
Sesame will prompt you with this:
laravel/fortify
laravel/framework
laravel/jetstream
laravel/passport
laravel/vite-plugin
sublimelsp/LSP
wbond/package_control
wbond/packagecontrol.io
If there is sublime project file in the root of the directory, it will be used by Sesame, otherwise the folder is the project.
🚀 Highly configurable.
TL;DR Setup
Set the path where you want Sesame to find projects.
Command Palette → Preferences: Settings
"sesame.path": "~/projects"
You can now run Sesame commands from the Command Palette.
INFO
One key binding is defined by default, Open, Ctrl+Alt+O
(Win/Linux), Super+Alt+O
(Mac). You can create your preferred key bindings for other commands, see below.
Installation
Prerequisites
- Sublime Text version 3 or higher.
- Package Control for Package Control installation.
- Git for Manual Git installation.
Package Control installation
- Open the Command Palette:
Ctrl+Shift+P
(Win/Linux) orCmd+Shift+P
(Mac). - Type "Package Control: Install Package" and press Enter.
- In the input field, type "Sesame" and select it from the list of available packages.
NOTE
You may need to restart Sublime Text.
Manual Git installation
- Navigate to the Sublime Text Packages directory:
~/.config/sublime-text/Packages
~/Library/Application Support/Sublime Text/Packages
%APPDATA%\Sublime Text\Packages
- Clone directly into the Packages directory:bash
git clone https://github.com/gerardroche/sublime-sesame.git Sesame
NOTE
You may need to restart Sublime Text.
Command Palette
- Sesame: Open
- Sesame: Add
- Sesame: Remove
- Sesame: Switch
Key Bindings
Only one key binding is defined by default, Open, Ctrl+Alt+O
(Win/Linux), Super+Alt+O
(Mac).
Create your preferred key bindings
Command Palette → Preferences: Key Bindings
{ "keys": ["ctrl+alt+o"], "command": "sesame_open" },
{ "keys": ["ctrl+alt+a"], "command": "sesame_add" },
{ "keys": ["ctrl+alt+r"], "command": "sesame_remove" },
{ "keys": ["ctrl+alt+s"], "command": "sesame_switch" },
{ "keys": ["super+alt+o"], "command": "sesame_open" },
{ "keys": ["super+alt+a"], "command": "sesame_add" },
{ "keys": ["super+alt+r"], "command": "sesame_remove" },
{ "keys": ["super+alt+s"], "command": "sesame_switch" },
Settings
sesame.path
- Type:
string|list
- Required
The location of projects.
Placeholders like ~
and environment variables are expanded.
"sesame.path": "~/projects"
Multiple paths
A simple list:
"sesame.path": ["~/projects", "~/vendor", "~/other"]
A list of paths with specific settings for each path.
"sesame.path": [
{
"path": "~/projects",
"depth": 1
},
{
"path": "~/vendor",
"vcs": true
}
]
sesame.depth
- Type:
integer (1 | 2)
- Default:
2
By default, Sesame looks two levels deep inside the path. This maps nicely to vendor/name
, which is typical on services like GitHub. For example, when you organise your projects like this:
❯ ~/projects
├── laravel
│ ├── fortify
│ ├── framework
│ ├── jetstream
│ ├── passport
│ └── vite-plugin
├── sublimelsp
│ └── LSP
└── wbond
├── package_control
└── packagecontrol.io
Sesame will prompt you with this:
laravel/fortify
laravel/framework
laravel/jetstream
laravel/passport
laravel/vite-plugin
sublimelsp/LSP
wbond/package_control
wbond/packagecontrol.io
When setting the depth to 1, Sesame will prompt you with this:
laravel
sublimelsp
wbond
sesame.keymaps
- Type:
boolean
- Default:
true
Enable default key bindings.
sesame.vcs
- Type:
null|boolean
- Default:
null
The sesame.vcs
setting allows you to control the inclusion of version control system projects. Here are the available options:
null
: This setting includes both version-controlled and non-version-controlled projects. Projects with and without vcs integration will be considered.true
: With this setting, only version-controlled projects will be included. Projects without vcs integration will be excluded.false
: This setting excludes version-controlled projects. Only projects without vcs integration will be considered.
Custom
Sesame commands accept path
, depth
, and vcs
arguments.
Example
To create custom Command Palette items, create or edit your commands file:
Packages/User/Default.sublime-commands
[
{
"caption": "Sesame: Add Vendor",
"command": "sesame_add",
"args": { "path": "~/vendor" }
},
{
"caption": "Sesame: Open Vendor",
"command": "sesame_open",
"args": { "path": "~/vendor" }
},
{
"caption": "Sesame: Switch Vendor",
"command": "sesame_switch",
"args": { "path": "~/vendor" }
},
]
You can find your Packages directory: Menu → Preferences → Browse Packages
NOTE
You don't create one for the Sesame: Remove command, because that command prompts you with currently opened folders to remove, so the path is not relevant for that command.