VS code Format Code command and shortcut Shift+Alt+F doesn't work

一笑奈何 提交于 2019-12-10 17:39:16

问题


Any clues on why my VS Code "Format Code" command doesn't work? I used Shift+Ctrl+P and entered Format Code or used the shortcut Shift + Alt + F. None seem to be working. Any clue?


回答1:


i'm having the same issue - it's looks like a bug.

See:

  • https://github.com/Microsoft/vscode/issues/12359
  • https://github.com/Microsoft/vscode/issues/12705
  • https://github.com/Microsoft/TypeScript/issues/11101



回答2:


Make sure you changed your language to the type of file. (Ctrl+K,M or Ctrl+Shift+P -> Change Language Mode)




回答3:


If you have an error in your code, the formatting will not allow you to change the layout. Fix any bugs you have (if you have any of course) then try shift + alt + f.



来源:https://stackoverflow.com/questions/39776691/vs-code-format-code-command-and-shortcut-shiftaltf-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!