一、安装Sublime Text3

网址:http://www.sublimetext.com/3

注册码:(sublime Text3汉化和激活注册码

----- BEGIN LICENSE -----
sgbteam
Single User License
EA7E-1153259
8891CBB9 F1513E4F 1A3405C1 A865D53F
115F202E 7B91AB2D 0D2A40ED 352B269B
76E84F0B CD69BFC7 59F2DFEF E267328F
215652A3 E88F9D8F 4C38E3BA 5B2DAAE4
969624E7 DC9CD4D5 717FB40C 1B9738CF
20B3C4F1 E917B5B3 87C38D9C ACCE7DD8
5F7EF854 86B9743C FADC04AA FB0DA5C0
F913BE58 42FEA319 F954EFDD AE881E0B
------ END LICENSE ------

二、安装 package control

说明网址:https://packagecontrol.io/installation

自动安装(代码安装)方法:

1、按住Ctrl+~键,调出控制台。

2、输入:

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)

3、重启Sublime Text 3。

4、如果在 Perferences --> package settings 中看到 package control 这一项,则安装成功。

手动安装方法:

1、选择 Preferences -> Browse Packages…

2、进入上一级目录后,再进入 Installed Packages/ 目录下

3、下载 Package Control.sublime-package 并将它复制到刚才的 Installed Packages/ 目录下

4、重启 Sublime Text

三、用package control安装插件

1、按下 Ctrl+Shift+P 调出命令面板。或者选择 Perferences(首选项)--> package control 调出命令面板。

2、输入 install 调出 Install Package 选项并回车,然后在列表中选中要安装的插件。

3、插件参考网址:https://packagecontrol.io/browse

四、常用插件

  • ChineseLocalization

汉化插件,各种语言都有。

  • Emmet

设置Tab补全代码:(默认快捷键为“Ctrl+E”)(Sublime插件Emmet的安装及Tab补全代码问题解决)

1. 打开Preferences-->Package Settings-->Emmet-->Key Bindings-User

2. 加入:

[{"keys": ["tab"], "args": {"action": "expand_abbreviation"}, "command": "run_emmet_action", "context": [{"key": "emmet_action_enabled.expand_abbreviation"}]}]

  • Sublime CodeIntel

代码自动提示。

  • Bracket Highlighter

高亮匹配各种括号。

使用方法:(参考:SublimeText 3插件Bracket Highlighter高亮设置

1.点击菜单栏的 Preferences --> Package Settings --> BracketHighlighter --> Bracket Settings

2.在弹出的窗口中, 全选左侧的文件并复制粘贴到右侧的user文件中,保存

3.在第664行,确认【"style": "underline"】("default"为默认设置)

4.将后面所有的【"style"】部分都注释掉

  • Doc​Blockr

简化了在Javascript,PHP,CoffeeScript,Actionscript,C&C ++中编写DocBlock注释的过程。

使用方法:Sublime2 DocBlocker插件在自动补全注释时输出自定义作者和当前时间等信息

  • SideBarEnhancements

侧栏右键功能增强,非常实用。

  • All Autocomplete

默认的 Autocomplete 功能只考虑当前的文件,而 AllAutocomplete 插件会搜索所有打开的文件来寻找匹配的提示词。

  • AutoFileName

快捷输入文件名

使用方法:输入”/”即可看到相对于本项目文件夹的其他文件。

  • Keymaps

快速查找所有插件的快捷键。

  • HTML-CSS-JS Prettify

全能序列化。

使用方法:(建议最后一个安装配置,先安装的话,可能会被其他插件影响配置。之前安装时缩进出现问题了)

1.配置NodeJS环境(Node.js 安装配置

2.配置HTML-CSS-JS Prettify插件

1)(Sublime Text3 HTML-CSS-JS Prettify插件技巧

(可以不配置直接用。若需要修改,则推荐在个人配置中修改。下面是我的修改备份)

 {
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones. // Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/beautify-web/js-beautify "all":
{
// These rules apply to any supported code that is going to be be prettified,
// and have the lowest level of precedence (meaning any of the settings in
// the 'html', 'css', 'js', 'json' and 'custom' categories override these). // You can add other .jsbeautifyrc rules in this section too. // End output with newline
"end_with_newline": false, // Character(s) to use as line terminators.
// end-of-line(EOF行结束),Line Feed(LF换行或者Line FeedNL),carriage return(CR回车符),林纳斯-->\n(光标下一行回到行首),微软-->\r\n,苹果-->\r(光标回到行首往下一行)
// Unix/Mac系统下的文件在Windows里打开的话,所有文字会变成一行(因为两个符号才表示换行);而Windows里的文件在Unix/Mac下打开的话,在每行的结尾可能会多出一个^M符号。
// 以下是对行结尾的处理方式;如果需要跨平台必须把window的crlf转为lf也就是
"eol": "\n", // Initial indentation level
// 初始缩进级别
"indent_level": 0, // Indentation character
// 标签缩进字符采用空格
"indent_char": " ", // Indentation size
// 缩进大小为4个
"indent_size": 4, // Indent with tabs, overrides `indent_size` and `indent_char`
// 缩进是否采用制表符
"indent_with_tabs": false, // Maximum number of line breaks to be preserved in one chunk (0 disables)
// 一个块中保留的最大换行数(0表示禁用);
"max_preserve_newlines": 0, // Whether existing line breaks before elements should be preserved (only works before elements, not inside tags or for text)
"preserve_newlines": true, // Lines should wrap at next opportunity after this number of characters (0 disables)
// 按字符数进行换行,0为禁用
"wrap_line_length": 0
}, "html":
{
// Rules added here apply only to HTML-like files, as determined by the
// rules specified for `global_file_rules` in the plugin settings. They
// take precedence over all of the settings in the 'all' category above. // You can add other .jsbeautifyrc rules in this section too. // html作用于以下文件
"allowed_file_extensions": ["htmlhintrc", "htm", "html", "xhtml", "shtml", "xml", "svg", "vue"], // js中花括号是否换行[collapse|expand|end-expand]
"brace_style": "collapse", // 是否输出eol里的内容,默认false
"end_with_newline": false, // 对内容中双重花括号进行缩进{{#foo}}, {{/foo}},默认为false;
"indent_handlebars": true, // 是否缩进<head>和<body>部分
"indent_inner_html": false, // 对html中scripts的代码缩进规则[keep(保持同辈)|separate(不缩进)|normal(正常缩进)]
"indent_scripts": "normal", // 是否应该保留元素之前的现有换行符(仅在元素之前工作,不在标签内或文本中)默认为true(保留换行符\n)
// 例如设置为false;
// <dl><li>\nabc\n</li></dl>
// <dl><li>abc</li></dl>
"preserve_newlines": true, // 都不需要换行缩进的元素,默认"a", "span", "img", "code", "pre", "sub", "sup", "em", "strong", "b", "i", "u", "strike", "big", "small", "pre", "h1", "h2", "h3", "h4", "h5", "h6"
"unformatted": ["pre"], // 使用换行符\n或空格分隔选择器
"selector_separator": "", // 选择器是否换行
"selector_separator_newline": false
}, "css":
{
// Rules added here apply only to CSS-like files, as determined by the
// rules specified for `global_file_rules` in the plugin settings. They
// take precedence over all of the settings in the 'all' category above. // You can add other .jsbeautifyrc rules in this section too. // css作用于以下文件
"allowed_file_extensions": ["css", "scss", "sass", "less"], // 是否输出eol里的内容,默认false
"end_with_newline": false, // Add a new line after every css rule
// 在每个css规则之后添加一行新的
"newline_between_rules": false, // Selector separator character
// 使用换行符\n或空格分隔选择器
"selector_separator": " ", // Separate selectors with newline or not (e.g. "a,\nbr" or "a, br")
// 选择器是否换行
"selector_separator_newline": false
}, "js":
{
// Rules added here apply only to JS-like files, as determined by the
// rules specified for `global_file_rules` in the plugin settings. They
// take precedence over all of the settings in the 'all' category above. // You can add other .jsbeautifyrc rules in this section too. // js作用于以下文件,变量,函数手动隔行的地方不会格式化
"allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"], // [collapse|collapse-preserve-inline|expand|end-expand|none] Put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or put end braces on own line, or attempt to keep them where they are
"brace_style": "collapse-preserve-inline", // Break chained method calls across subsequent lines
// 在后续行中断开链接方法调用
"break_chained_methods": false, // Put commas at the beginning of new line instead of end
// 在新行开始时加上逗号,而不是结尾
"comma_first": false, // Pass E4X xml literals through untouched
// 通过E4X xml文字通过不变的
"e4x": true, // 是否输出eol里的内容,默认false
"end_with_newline": false, // If true, then jslint-stricter mode is enforced
// 是否采用jslint-stricter模式,另外的规则
"jslint_happy": false, // Preserve array indentation
// 保留数组缩进
"keep_array_indentation": false, // Preserve function indentation
// 保留函数缩进
"keep_function_indentation": false, // 是否保留手动换行的换行符
"preserve_newlines": true, // [before-newline|after-newline|preserve-newline] Set operator position
"operator_position": "before-newline", // Should the space before an anonymous function's parens be added, "function()" vs "function ()"
// "function()" vs "function ()"
"space_after_anon_function": false, // Should the space before conditional statement be added, "if(true)" vs "if (true)"
// "if(true)" vs "if (true)"
"space_before_conditional": true, // Add padding spaces within empty paren, "f()" vs "f( )"
// "f()" vs "f( )"
"space_in_empty_paren": false, // Add padding spaces within paren, ie. f( a, b )
// 在括号内添加填充空格,例如f( a, b )
"space_in_paren": false, // Should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65"
// 对转义字符"\x65\x78\x61\x6d\x70\x6c\x65"不格式化
"unescape_strings": true
}, "json":
{
// Rules added here apply only to JSON-like files, as determined by the
// rules specified for `global_file_rules` in the plugin settings. They
// take precedence over all of the settings in the 'all' category above. // You can add other .jsbeautifyrc rules in this section too. // [collapse|collapse-preserve-inline|expand|end-expand|none] Put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or put end braces on own line, or attempt to keep them where they are
"brace_style": "expand", // Preserve array indentation
"keep_array_indentation": false, // Should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65"
"unescape_strings": false
}, "custom":
{
// Rules added here apply only to files matching specific glob strings,
// but respecting any whitelists or blacklists as determined by the
// rules specified for `global_file_rules` in the plugin settings. They
// take precedence over any of the settings in the categories above. // For the following entries, keys are globs and values are objects which
// can contain any kind of .jsbeautifyrc setting. "@(package?(-lock)|yarn-lock).json":
{
"indent_size": 2,
"brace_style": "collapse"
}, "*.sublime-@(settings|keymap|commands|menu)":
{
"indent_size": 4,
"brace_style": "expand"
}
}
}

2)设置保存时自动格式化

1. 点击菜单栏的 Preferences --> Package Settings --> HTML/CSS/JS Prettify --> Plugin Options - Default

2. 将 "format_on_save": false, 修改为true

  • CSS3

The most complete CSS support for Sublime Text 3

解决伪类选择器显示为白色或者无效的问题。

部分参考文档:

1、常用的sublime text 3插件(很爽哦)

2、史上最全的 Sublime Text 汉化、插件安装合集

3、前端开发必备的Sublime 3插件

Sublime Text3安装、配置及常用插件(陆续补全中~)的更多相关文章

  1. Sublime Text3安装、注册、插件安装教程

          在前端开发中,有很多软件供我们使用:大名鼎鼎的WebStorm,老而弥坚的Dreamweaver,后起之秀Hbuilder,还有小清新Sublime Text.......等等.作为新手, ...

  2. sublime text3 安装配置

    sublime text 3 语法检查插件(一直都是安装了但是却没有语法报错提示和苦恼) 第一种方法:有点卡 先去下载对应的开发环境,安装到本地,例如php. 从Pakage Control中安装su ...

  3. Sublime Text3安装配置

    Sublime Text3的所有package都可在如下网站检索 https://packagecontrol.io/browse 以下是我的插件列表 CoolFormat 一款C\C++\C#\CS ...

  4. sublime text3安装配置c++环境(windows+ubuntu)

    1.下载sublime text3 官网地址:http://www.sublimetext.com/3 ubuntu直接在Ubuntu Software中搜索sublime安装 2.配置环境变量(wi ...

  5. sublime text3安装js提示的插件

    今天安装Sublime Text3的js插件,在网上查了很多资料,为了方便以后看,写一个安装插件的总结和方法. 要安装js相关的插件,就要先安装一个Package Control(插件管理器)的插件, ...

  6. sublime text3 安装详解+前端插件

    1,下载sublime 3,地址:http://www.sublimetext.com/ 2,注册码:(在网上找的,感谢前辈)打开sublime3, help----add license---复制下 ...

  7. 开发工具:sublime text3安装Vue语法高亮插件

    一.将插件克隆到Sublime的packages目录 1.下载并解压插件(或直接git命令clone),得到vue-syntax-highlight-master文件夹 插件地址:https://gi ...

  8. mac下sublime text3 安装px转rem插件

    本人使用的是os-x系统,即mac系统,每次使用单位rem用其他网页转换很不方便.自己捣腾了一下插件,现在共享给大家 第一步: 先下载插件: https://github.com/narrow-gat ...

  9. Sublime Text3安装以及初次配置

    Sublime Text3安装以及初次配置 工具:官网下载:Sublime Text3 安装:直接运行安装.http://write.blog.csdn.net/postedit 激活:参考文/晚晴幽 ...

随机推荐

  1. jenkins学习 01 jenkins介绍

    jenkins 是一个可扩展的持续集成引擎. 使用Jenkins目的: 持续.自动地构建/测试软件项目. 监控一些定时执行的任务. jenkins拥有的特性: 易于安装,只要jenkins.war部署 ...

  2. #pragma pack 在BITMAP结构体定义中的使用

    BITMAP位图文件主要分为如下3个部分: 块名称 对应Windows结构体定义 大小(Byte) 文件信息头 BITMAPFILEHEADER 14 位图信息头 BITMAPINFOHEADER 4 ...

  3. “百度杯”CTF比赛 九月场

    Test: 题目提示查资料 打开地址,是一个海洋cms 海洋cms有个前台getshell的漏洞 在地址后加上/search.php?searchtype=5&tid=&area=ev ...

  4. rsync mac->windows openssh

    rsync -azvP --progress -e "ssh -p 6666" /Users/codar/360\344\272\221\347\233\230/ghld/ rsy ...

  5. 问题:oracle long 与 clob;结果:long类型比clob到底差在什么地方?

    long类型比clob到底差在什经常看到9i以上的文档,说以后 clob会逐步取代long,一直想不出, 而我在8.1.7上也测试2个字段好像 在存储上也看不出什么区别?么地方? 差别还是很大的, 比 ...

  6. c++ vector用法和迭代器

    1.在c++中,vector是一个十分有用的容器,下面对这个容器做一下总结. (1)头文件#include<vector>. (2)创建vector对象,vector<int> ...

  7. [Python Study Notes]气泡散点图绘制

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...

  8. <!doctype html>这个是干什么的???

    html5标准网页声明,原先的是一串很长的字符串,现在是这个简洁形式,支持html5标准的主流浏览器都认识这个声明.表示网页采用html5

  9. <c:set var="ctx" value="${pageContext.request.contextPath}" />的学习

    ${pageContext.request.contextPath},是获取当前根目录 set var="ctx",是给这个路径定义了一个变量,用的时候可以通过EL表达式获取:${ ...

  10. 支撑矢量机SVM

    1.线性SVM 首先,回顾一下SVM问题的定义,如下: 线性约束很烦,不方便优化,是否有一种方法可以将线性约束放到优化问题本身,这样就可以无拘无束的优化,而不用考虑线性约束了.其对应的拉格朗日对偶形式 ...