import "@johnlindquist/kit"
let text = await getSelectedText()
let vimTextPath = tmpPath("vim.txt")
await writeFile(vimTextPath, text)
await term(`vim ${vimTextPath}`)
let contents = await readFile(vimTextPath, "utf-8")
await setSelectedText(contents)