Created
June 26, 2023 17:39
-
-
Save tayiorbeii/a39737a6c4439e254c5b4ffe701912ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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