![](/img/trans.png)
[英]Keybinding for Format Code -> Shift+Alt+F in VS Code does not seem to work
[英]How to format code only when Shift+Alt+F is pressed in VS Code? (extension)
我已經在 VS Code 中安裝了“JS-CSS-HTML Formatter”擴展( https://marketplace.visualstudio.com/items?itemName=lonefy.vscode-JS-CSS-HTML-formatter )。 當我按 Shift+Alt+F 時,它會格式化代碼。 但是,在我第一次按 Shift+Alt+F 后,它會在我每次進行更改時自動格式化代碼。
我希望它僅在我按 Shift+Alt+F 時格式化我的代碼,而不是在我第一次按 Shift+Alt+F 后自動格式化它。 我該怎么做呢?
按 F1 並鍵入格式化程序配置。
然后將"onSave": true
更改為"onSave": false
並重新啟動 vs 代碼
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.