Skip to content

Instantly share code, notes, and snippets.

@tayiorbeii
Created June 26, 2023 17:39
Show Gist options
  • Save tayiorbeii/a39737a6c4439e254c5b4ffe701912ad to your computer and use it in GitHub Desktop.
Save tayiorbeii/a39737a6c4439e254c5b4ffe701912ad to your computer and use it in GitHub Desktop.
import "@johnlindquist/kit"
// Name: Open VS Code Here
// Shortcut: option+v
// Author: Taylor Bell
let selectedFile = await getSelectedFile()
// remove the filename from the path
let path = selectedFile.replace(/\/[^\/]*$/, '')
await exec(`code "${path}"`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment