Sublime Text 3安装及运行python文件及标亮jade文件

一、安装及运行Python文件

1.Sublime Text 3下载网址 http://www.sublimetext.com/3 (Package Control官方网址https://packagecontrol.io/installation)

2.Sublime Text 3(以下简称sub) 安装Package Control ,打开sub--View--Console (或者直接快捷键ctrl+`)调出控制台,然后输入以下命令后回车:

(text 3)

import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; 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)

(text 2)

import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; 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')

3.查看Preferences中能看到Package Control和Package Settings说明安装成功

4.ctrl+shift+p 输入package 找到List Packages点击安装

5.ctrl+shift+p 输入python点击Build With:Python 然后F12或者ctrl+b运行python文件

 二、标亮jade文件

1.ctrl+shift+p 输入jade找到第一个jade点击安装就可以了

posted @ 2016-08-29 09:24  晨曦的小尾巴  阅读(194)  评论(0)    收藏  举报