Better slash commands in the Pack Studio (and VSCode too!)

We’ve had slash commands in the Pack Studio since it launched, and they are a quick way to insert short snippets of sample code for popular tasks. For example, the /addNetworkDomain slash command would insert the following code:

pack.addNetworkDomain("<Domain name>");

However there’s always a need for more speed, and during a recent event a Pack maker asked the following in the Zoom chat:

Eric, I really want “<Domain name>” to have keyboard selection focus when using auto-complete. :pray:

Auto-selecting the placeholder value would shave off a few more seconds, but it could it be done? It turns out the answer is yes, and with the Monaco code editor that powers the Pack Studio it was fairly easy.

Now that slash command, and all the others, have been upgraded so that you can easily tab through the placeholder values and replace them.


But what if you use the Pack CLI to developer your Packs locally? Previously you’d be stuck typing things out the slow way, but with the latest version of the SDK we now have the ability for you to use slash commands locally as well!

Update to version 1.4.0 of the SDK or later to get access to the new extensions command. We currently only support one option, vscode, which installs the slash commands in your project so that Visual Studio Code can access them.

npx coda extensions vscode

You’ll need to run that once per-project, and then you can use the slash commands just like you would in the Pack Studio.

We hope these changes improve your Pack productivity, and let us know if you have any feedback.


Niiiiiiice, gonna use! :raised_hands:

1 Like