Macos 如何在Sublime Text 3上使用软件包控件安装Babel?

Macos 如何在Sublime Text 3上使用软件包控件安装Babel?,macos,sublimetext3,babeljs,Macos,Sublimetext3,Babeljs,我想安装。我使用的是Mac电脑,我已经安装了Sublime Text 3和新安装的。因此,我尝试了cmd+shift+p打开包控制,然后键入“安装”,但没有显示任何内容。我跟着。我需要巴别塔来做语法突出显示 您可能需要检查Sublime 3所在位置的文件路径。你安装了sudo吗?也许这个链接会有所帮助 您可能需要检查Sublime 3所在位置的文件路径。你安装了sudo吗?也许这个链接会有所帮助 同样的问题,在我的例子中,我必须首先安装package control,我使用“简单安装”方法将

我想安装。我使用的是Mac电脑,我已经安装了Sublime Text 3和新安装的。因此,我尝试了cmd+shift+p打开包控制,然后键入“安装”,但没有显示任何内容。我跟着。我需要巴别塔来做语法突出显示

您可能需要检查Sublime 3所在位置的文件路径。你安装了sudo吗?也许这个链接会有所帮助


您可能需要检查Sublime 3所在位置的文件路径。你安装了sudo吗?也许这个链接会有所帮助


同样的问题,在我的例子中,我必须首先安装package control,我使用“简单安装”方法将代码从粘贴到控制台(视图>显示控制台)

对于Sublime 3:

导入urllib.request、os、hashlib;h= “2915d1851351e5ee549c20394736b442”+ ‘8bc59f460fa1548d1514676163dafc88’;pf='包 控制。升华包';ipp=sublime.installed_packages_path(); urllib.request.install\u opener(urllib.request.build\u opener( urllib.request.ProxyHandler());by=urllib.request.urlopen( ''+pf.replace('',%20')).read();dh= hashlib.sha256(by.hexdigest();打印('验证下载时出错(已获取 %,而不是%s),如果dh!=H else打开(os.path.join(ipp,pf),'wb')。写入(by)

对于Sublime 2:

导入urllib2、os、hashlib;h='2915d1851351e5ee549c20394736b442'+ ‘8bc59f460fa1548d1514676163dafc88’;pf='包 控制。升华包';ipp=sublime.installed_packages_path(); os.makedirs(ipp)如果不存在os.path.exists(ipp),则为os.makedirs(ipp),否则为None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()) ); by=urllib2.urlopen(“”+pf.replace(“”, “%20”)。读取();dh=hashlib.sha256(by).hexdigest();打开( join(ipp,pf),'wb')。如果dh==h,则写入(by),否则无; 打印('验证下载时出错(得到%s而不是%s),请重试 手动安装“%(dh,h)如果dh!=h else”,请重新启动升华文本 完成安装')


同样的问题,在我的例子中,我必须首先安装package control,我使用“简单安装”方法将代码从粘贴到控制台(视图>显示控制台)

对于Sublime 3:

导入urllib.request、os、hashlib;h= “2915d1851351e5ee549c20394736b442”+ ‘8bc59f460fa1548d1514676163dafc88’;pf='包 控制。升华包';ipp=sublime.installed_packages_path(); urllib.request.install\u opener(urllib.request.build\u opener( urllib.request.ProxyHandler());by=urllib.request.urlopen( ''+pf.replace('',%20')).read();dh= hashlib.sha256(by.hexdigest();打印('验证下载时出错(已获取 %,而不是%s),如果dh!=H else打开(os.path.join(ipp,pf),'wb')。写入(by)

对于Sublime 2:

导入urllib2、os、hashlib;h='2915d1851351e5ee549c20394736b442'+ ‘8bc59f460fa1548d1514676163dafc88’;pf='包 控制。升华包';ipp=sublime.installed_packages_path(); os.makedirs(ipp)如果不存在os.path.exists(ipp),则为os.makedirs(ipp),否则为None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()) ); by=urllib2.urlopen(“”+pf.replace(“”, “%20”)。读取();dh=hashlib.sha256(by).hexdigest();打开( join(ipp,pf),'wb')。如果dh==h,则写入(by),否则无; 打印('验证下载时出错(得到%s而不是%s),请重试 手动安装“%(dh,h)如果dh!=h else”,请重新启动升华文本 完成安装')


您可以按照以下步骤安装Babel软件包

 1.open the url 
   -> https://packagecontrol.io/installation
 then copy the code in that page like this
导入urllib.request、os、hashlib;h='6f4c264a24d933ce70df5dedcf1dcaee'+'ebe013ee18cced0ef93d5f746d80ef60';pf='包控制.升华包';ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler());by=urllib.request.urlopen(“”+pf.replace(“”,“%20”)).read();dh=hashlib.sha256(by).hexdigest();打印('验证下载时出错(得到%s而不是%s),如果dh!=h else open(os.path.join(ipp,pf),“wb”).write(by)

注:上述代码将经常更新

 2.Open Sublime text editor and "Goto View option and select Show Console"
 3.Paste the above code the console and press enter
 4.press command+shift+p to bring up the Command Palette
 5.In that search box type the text as "Package Control" and select the "Package Control:Install Package" option
 -> A new search box with options will come.
 6.Type the text “Babel” and select the Babel in the list. It will install the babel package.
 7.To Activate the Babel Syntax for the js file 
-> View -> Syntax -> Babel

Note: To open all of the folder files with the babel syntax

-> Goto View -> Syntax -> Open all with current extention as JavaScript -> Babel

您可以按照以下步骤安装Babel软件包

 1.open the url 
   -> https://packagecontrol.io/installation
 then copy the code in that page like this
导入urllib.request、os、hashlib;h='6f4c264a24d933ce70df5dedcf1dcaee'+'ebe013ee18cced0ef93d5f746d80ef60';pf='包控制.升华包';ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler());by=urllib.request.urlopen(“”+pf.replace(“”,“%20”)).read();dh=hashlib.sha256(by).hexdigest();打印('验证下载时出错(得到%s而不是%s),如果dh!=h else open(os.path.join(ipp,pf),“wb”).write(by)

注:上述代码将经常更新

 2.Open Sublime text editor and "Goto View option and select Show Console"
 3.Paste the above code the console and press enter
 4.press command+shift+p to bring up the Command Palette
 5.In that search box type the text as "Package Control" and select the "Package Control:Install Package" option
 -> A new search box with options will come.
 6.Type the text “Babel” and select the Babel in the list. It will install the babel package.
 7.To Activate the Babel Syntax for the js file 
-> View -> Syntax -> Babel

Note: To open all of the folder files with the babel syntax

-> Goto View -> Syntax -> Open all with current extention as JavaScript -> Babel

手动:用于巴别塔升华

如果由于某些原因,console安装说明不适用于您(例如网络上有代理),请执行以下步骤手动安装Package Control:

1) 首选项>浏览软件包

浏览一个文件夹,然后进入该文件夹 下载Package Control.sublime-Package并将其复制到已安装的Packages/目录中

对于Supreme 2

import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
对于Supreme 3

import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
然后重新启动升华文本


需要更多信息吗?手动操作:巴别塔升华

如果由于某些原因,console安装说明不适用于您(例如网络上有代理),请执行以下步骤手动安装Package Control:

1) 首选项>浏览软件包

浏览一个文件夹,然后进入该文件夹 下载Package Control.sublime-Package并将其复制到已安装的Packages/目录中

对于Supreme 2

import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
对于Supreme 3

import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
然后重新启动升华文本