How can I enable syntax highlighting for .vue file

2020-06-01 05:22发布

I'm starting up with Vue.js. The first problem I've run into is that my IDE (Atom) doesn't beautify my .vue files. It's all just white text.

How can I make Atom highlight .vue files properly?

3条回答
Rolldiameter
2楼-- · 2020-06-01 05:58

Use in your command prompt:

apm install language-vue

for syntax highlighting.

There is another Atom package which seems to only beautify it but doesn't do syntax highlighting:

apm install vue-format

You may need to exit Atom and then restart it.

查看更多
疯言疯语
3楼-- · 2020-06-01 05:59

The Vue.js project maintains Awesome Vue.js, "a curated list of awesome things related to Vue.js".

This includes a list of useful Atom packages for Vue.js:

Note that currently the language-vue and language-vue-component do not play nicely together, as discussed here. For now, for syntax highlighting in Atom your best bet is language-vue only.

查看更多
该账号已被封号
4楼-- · 2020-06-01 06:14

language-vue package adds syntax highlighting to Vue components.

There is also another package to beautify your code. Install atom-beautify package. It has Vue beautifier preinstalled.

查看更多
登录 后发表回答