vscode中的tab键如何在html文件或vue文件中也是4个空格(任何文件都生效的办法)

 3.面板左边为系统提供配置简介,右边为自己配置,我们需要在右边用户配置中加入两个配置内容

"editor.tabSize": 4:指定一个tab等于多少个空格,例如此处指定4就像等于4个空格,2就等于两个空格

 "editor.detectIndentation":false :必须指定!!否则指定的tab大小将不起效果
如果是vue编译器,在加上  "vetur.format.options.tabSize": 4 即可!

  //vue文件的tabsize设置
  "vetur.format.options.tabSize": 4,
  "editor.detectIndentation": false,
  "editor.tabSize": 4,

猜你喜欢

转载自blog.csdn.net/weixin_43343144/article/details/86345518