在sublime文本3中的React.js文件语法 [英] React.js files syntax in sublime text 3

查看:96
本文介绍了在sublime文本3中的React.js文件语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用sublime text 3作为我的代码编辑器,我在React中编写了一个基本的hello world示例。但是代码上的颜色是不合适的,我尝试过安装Babel插件但是即使在那之后颜色也没有似乎工作,你可以看到下面的图像

i am using sublime text 3 as my code editor,i have written a basic hello world example in React.but the coloring is improper on the code ,i have tried installing Babel plugin but even after that also the coloring doesn't seem to work ,as you can see the image below

推荐答案

仅仅安装它是不够的,你还必须告诉SublimeText使用它。

Just installing it isn't enough, you have to also tell SublimeText to use it.

要么

a) Ctrl - Shift - P ,输入Babel并选择设置语法:Javascript(Babel)

a) Ctrl-Shift-P, type "Babel" and select Set Syntax: Javascript(Babel)

b)进入菜单并执行查看 - >语法 - >打开所有当前扩展名为...-> Babel-> Javascript(Babel)

b) Go to the menu and do View->Syntax->Open all with current extension as...->Babel->Javascript(Babel).

这篇关于在sublime文本3中的React.js文件语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆