1、安装package control
INSTALLATION
Simple
SECURITY NOTICE: The Python code used by this method does not use SSL because Sublime Text on Linux does not have the ssl module. Additionally, for Windows and OS X it is not possible for a simple snippet of code like this to validate the SSL certificate for sublime.wbond.net. For a more secure installation method, follow the manual instructions.
The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
This code creates the Installed Packages folder for you (if necessary), and then downloads thePackage Control.sublime-package into it.
手动安装
Manual
If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:
- Click the menu
- Browse up a folder and then into the Installed Packages/ folder
- Download Package Control.sublime-package and copy it into the Installed Packages/directory
- Restart Sublime Text
安装 zen coding
How to install
Warning: this plugin may not work at all in some OSes since it written in JavaScript and uses PyV8 and Google V8 binaries to run. If you experience problems or editor crashes please fill an issue.
With Package Control:
- Run “Package Control: Install Package” command, find and install
Emmet
plugin. - Restart ST editor (if required)
Manually:
- Clone or download git repo into your packages folder (in ST, find Browse Packages... menu item to open this folder)
- Restart ST editor (if required)
下面推荐几款需要手动安装的前端开发常用插件!
1、Alignment代码对齐插件
对于有代码洁癖或者喜欢整齐的同学来说,相信你会喜欢上这款插件。安装好插件后,选中文本同时按住“Ctrl + Alt + A”,就可以对齐操作了
2、JS Format
一个JavaScript代码格式化插件,快捷键“ Ctrl+Alt+F”
3、Js Minifier
一款基于Google Closure compiler压缩Js文件插件,快捷键“ Ctrl+Alt+M”压缩Js代码、“ Ctrl+Alt+Shift+M”压缩Js并生成压缩文件 *.min.js
4、Hex to HSL
把颜色值从16进制转换成HSL格式,快捷键“ Ctrl+Shift+U”
5、LESS
LESS语法高亮插件,安装成功重启Sublime Text 2即生效
6、Pretty JSON
格式化JSON插件,让你完全摆脱那些所谓的在线格式化JSON工具