[英]VS Code Turn off wrapAttributes for auto formatter
我有以下 html 代碼:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css"
integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
每當我通過按shift+Alt+f", it just wraps the
使用 VS 代碼的自動格式化程序時shift+Alt+f", it just wraps the
完整性attribute to the next line. I would like to keep everything on one line. I did some research, and found out the setting that control it is
shift+Alt+f", it just wraps the
attribute to the next line. I would like to keep everything on one line. I did some research, and found out the setting that control it is
html.format.wrapAttributes`,但根據文檔,只有四個設置是:
auto: Wrap when the line length is exceeded
force: Wrap all attributes, except first
force-aligned: Wrap all attributes, except first, and align attributes
force-expand-multiline: Wrap all attributes
沒有設置可以關閉它。 我試圖將它設置為"html.format.wrapAttributes": false
和"html.format.wrapAttributes": ""
。 他們沒有幫助。
我想知道如何設置 VS 代碼,以便每次使用 VS 代碼 HTML 自動格式化程序時,它不再將integrity
屬性包裝到另一行?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.