1

It's a really common use case for me to copy-and-paste some JSON string in a new VSCode buffer, and wanting to see it pretty-printed.

So it's a really common thing for me to change the new buffer's Language Mode to JSON (CMD+Shift+O, type "Language" for Change Language Mode command, type JSON + Enter), then Format Document (CMD+Shift+O, format, Enter).

I'd like to set a new function/shortcut that makes all of that at once. Is there an easy way to do that without writing a whole extension?

1

1 Answer 1

1

Not as of VS Code 1.29. You need to use one of the extensions.

This issue tracks built-in support for chaining commands

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.