Fork me on GitHub
#vscode
<
2022-05-01
>
pez19:05:16

A discussion in #calva reminded me of a thing I often do, that might not be obvious to everyone. It is to use the integrated terminal to pipe output from a command to VS Code. Like so:

$ <some command> | code -
This opens a new tab in VS Code with the output from <some command>. Say it is a curl command pulling down some big chunk of JSON. jq is fine, but if I want to do it more interactively I: 1. $ curl ... | code - . This opens the output in a VS Code editor tab and focuses it. 2. VS Code is excellent at guessing the language, if it fails: cmd/ctrl+k m and select JSON. 3. Format Document: shift+alt+f

🤯 3
❤️ 7