VSCode single to double quote automatic replace

前端 未结 22 999
死守一世寂寞
死守一世寂寞 2021-01-30 12:03

When I execute a Format Document command on a Vue Component.vue file VSCode replace all single quoted string with double quoted string.

In my specific case

22条回答
  •  醉酒成梦
    2021-01-30 12:48

    As noted by @attdona the Vetur extension includes prettier.

    While you can change the prettier settings, as per the accepted answer, you can also change the formatter for specific regions of a vue component.

    Here, for example, I've set Vetur to use the vscode-typescript formatter as it uses single quotes by default:

提交回复
热议问题