I have a JSON document opened in Visual Studio Community 2017 on Windows 10. I am trying to format the document using the "Format Document" command (Ctrl+K,Ctrl+D). When I do that I get the following message:
The key combination (Ctrl+K, Ctrl+D) is bound to command (Format Document) which is not currently... (Cant find the rest of the sentence)
How to solve this?
1 Answer
This is a known problem listed at
JSON formatting is broken when using all TAB indents, nested objects and arrays all inside a file.
A known workaround is to replace tabs by spaces. Enter the menu Tools > Options > Text Editor > JSON > Tabs, and enable "Insert spaces".
2