Created
September 23, 2022 13:11
-
-
Save JoepKockelkorn/8b7329485950b5ccb2671b9159a0fb18 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
// Menu: Surround text with | |
// Description: Surround the selected text with some input | |
/** @type {import("@johnlindquist/kit")} */ | |
const text = await getSelectedText(); | |
const getNewText = (surrounding) => | |
md(`Output: \`${surrounding}${text}${surrounding}\``); | |
const surrounding = await arg("Surround with?", getNewText); | |
await setSelectedText(getActiveAppBounds(surrounding)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment