peakchen90 / vue-beautify

vscode的一个vue格式化插件
https://marketplace.visualstudio.com/items?itemName=peakchen90.vue-beautify
25 stars 21 forks source link

VS code安装并使用后出现每行代码中间都空一行的情况 #1

Closed Hyphon closed 7 years ago

Hyphon commented 7 years ago

如题。 使用后出现如下的情况

<script>
function handle(){
    var a = 1;

    var b =2;

    console.log(a + b);

}

</script>
yunmel commented 7 years ago

我也遇到这个问题,每格式化一次就多一行空格。

Hyphon commented 7 years ago

大概和某个vue插件的格式化有冲突吧

peakchen90 commented 7 years ago

@Hyphon @yunmel 我测试并没有这个问题啊

Hyphon commented 7 years ago

@peakchen90
截图 就是这样的效果。每行之间都空了一行。你可以试试把现在vs code上所有vue插件都下下来然后再测试下。。

peakchen90 commented 7 years ago

@Hyphon 我猜应该是其他插件的效果,我本地测试不是这样的 qq 20170317100831

Hyphon commented 7 years ago

@peakchen90 看来我得卸载掉一些了,之前下了一堆格式化都不好使,现在还影响这个。 :P

peakchen90 commented 7 years ago

@Hyphon 可能不是,刚才我一个同事也遇到这样的问题,我在看下

fukang2113 commented 7 years ago

@Hyphon 之前的版本是没有这个问题的,现在插件的作者正在修复,你不用卸载别的插件,不是这个原因

Hyphon commented 7 years ago

好的 @fukang2113 @peakchen90

emo64 commented 7 years ago

相同问题..重装VSCODE三次..坐等修复

peakchen90 commented 7 years ago

@emo129 @Hyphon 与 veutr 插件冲突了,vetur 也有格式化代码功能,建议暂时不用 vue-beautify 这个插件

xunonxyz commented 7 years ago

我升级后也遇到这样的情况

emo64 commented 7 years ago

@peakchen90 没有安装vetur也不能格式化...

peakchen90 commented 7 years ago

@emo129 我的意思是保留 vetur ,把我这个插件卸载了,因为 vetur 有代码高亮 ,而去附带格式化 .vue 文件的功能

emo64 commented 7 years ago

@peakchen90 好的

xunonxyz commented 7 years ago

强行换回老版本一切正常,确定是作者改出问题了

peakchen90 commented 7 years ago

@xunonxyz 实在不行你可以根据自己的情况改下,直接 clone 这个项目,主要格式化代码在 /src/index.js 这个文件,用vscode打开,然后 F5 就可以调试了