text 有用的快捷方式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 有用的快捷方式相关的知识,希望对你有一定的参考价值。

// Format on Save
1. Open Settings (Ctrl + ,)
2. Search for 'Format on Save' and tick the checkbox

// ORGANIZE IMPORTS  (Instead of pressing Alt + Shift + o  we can set it auto on save)
1. Ctrl + Shift + p 
  open preferences panel and click Open Settings and Search for 'code action'
2. Editor - Code Actions on Save 
   click on Edit in settings.json
3. Search for "editor.codeActionsOnSave" on left side and click edit 
4. Add the following
   "editor.codeActionsOnSave": { "source.organizeImports": true }

以上是关于text 有用的快捷方式的主要内容,如果未能解决你的问题,请参考以下文章