sublime控制台以及jshint插件安装

来源:互联网 发布:自考培训机构 知乎 编辑:程序博客网 时间:2024/06/02 02:06

网上下载的绿色版sublime text3控制台无法正常使用,需要重新安装控制台,才可以使用它来安装插件。

安装控制台:
菜单项View > Show Console

import urllib.request,os,hashlib; h = ‘df21e130d211cfc94d9b0905775a7c0f’ + ‘1e3d39e33b79698005270310898eea76’; 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)

按下回车键,重启Sublime Text,即完成对Package Control的安装,在首选项下出现 package contrl项。

安装SublimeLinter
要安装jshint需要先安装SublimeLinter
首选项–>Package Control,输入install进入 Package Control: Install Package
输入SublimeLinter。进行安装.
在Package Control输出

> SublimeLinter

____        _     _ _                _     _       _

/ | | | | ()_ _ | | ()_ _ | | _ _
___ | | | | ‘_ | | | ‘_ ` _ \ / _ \ | | | ‘_ | / _ \ ‘|
) | || | |) | | | | | | | | / || | | | | || / |
|_/ _,|./|||| || ||__|||| ||_____|_|

Welcome to SublimeLinter, a linter framework for Sublime Text 3.

               * * * IMPORTANT! * * *      SublimeLinter 3 is NOT a drop-in replacement for      earlier versions.      Linters *NOT* included with SublimeLinter 3,       they must be installed separately.      The settings are different.              * * * READ THE DOCS! * * *

Otherwise you will never know how to install linters, nor will
you know about all of the great new features in SublimeLinter 3.

For complete documentation on how to install and use SublimeLinter,
please see:

http://www.sublimelinter.com

               _   _      _       _              | | | | ___| |_ __ | |              | |_| |/ _ \ | '_ | |              |  _  |  __/ | |_) |_|              |_| |_|\___|_| .__/(_)                           |_|

Hundreds of hours have been spent writing and documenting SublimeLinter
to make it the best it can be — easy to use, easy to configure,
easy to update, easy to extend. If you use SublimeLinter and feel
it is making your coding life better and easier, please consider
making a donation to help fund development and support.

To donate: https://github.com/SublimeLinter/SublimeLinter3#share-the-love

Thank you!

SublimeLinter安装完成

jshint安装
通过node.js 安装:npm install -g jshint
首选项–>Package Control,输入install进入 Package Control: Install Package
输入SublimeLinter-jshint。进行安装.
在Package Control输出

> SublimeLinter-jshint

SublimeLinter-jshint


This linter plugin for SublimeLinter provides an interface to jshint.

* IMPORTANT! *

Before this plugin will activate, you must
follow the installation instructions here:

https://github.com/SublimeLinter/SublimeLinter-jshint

jshint安装完成

0 0