Skip to content

Instantly share code, notes, and snippets.

@JoepKockelkorn
Created September 23, 2022 13:11
Show Gist options
  • Save JoepKockelkorn/8b7329485950b5ccb2671b9159a0fb18 to your computer and use it in GitHub Desktop.
Save JoepKockelkorn/8b7329485950b5ccb2671b9159a0fb18 to your computer and use it in GitHub Desktop.
// 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