我发现网上的答案都是千篇一律,都是复制过来的
"vetur.format.defaultFormatterOptions": {"js-beautify-html": {"wrap_line_length": 120,"wrap_attributes": "auto","end_with_newline": false},
}
或者是这样的配置:
"prettier.printWidth": 120, // 最大换行长度
然后:
"diffEditor.wordWrap": "off",
"[markdown]": {"editor.wordWrap": "off"
},
即使我把printWidth和wrap_line_length设置成5000,保存之后还是会自动换行
其实把printWidth和wrap_line_length都改成0就好了,这是自己摸索出来的:
配置如下:
"vetur.format.defaultFormatterOptions": {"js-beautify-html": {"wrap_line_length": 0,"wrap_attributes": "auto","end_with_newline": false},
}
"prettier.printWidth": 0, // 最大换行长度
"diffEditor.wordWrap": "off",
"[markdown]": {"editor.wordWrap": "off"
},