Sublime text3 常用插件 安装

时间:2023-12-28 19:35:02

1 安装插件前的准备工作

首先确保你的Sublime Text3编辑器为官方版(非破解版),建议下载官网的便携版本(好处多多)。

然后安装插件管理工具(Package Control)

1.1 打开Sublime的控制台

Ctrl + `  打开控制台

1.2 输入以下命令

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)

等待完成安装。

1.3 使用Package Control安装插件

Ctrl + Shift + P,打开命令面板

如下图输入install,回车

Sublime text3 常用插件 安装

Sublime text3 常用插件 安装

2 常用插件安装、配置、使用

2.1 BracketHighlighter (匹配括号,高亮显示)

Sublime text3 常用插件 安装

2.2 Emment (css选择器生成html)

直接安装即可。

2.3 Chinese​Localization(汉化插件)

直接安装即可。

2.4 DocBlockr(自动生成注释块)

直接安装即可,无需配置。

PHP使用:如下图

Sublime text3 常用插件 安装

结果:

Sublime text3 常用插件 安装

2.5 SublimeLinter(代码校验)

直接安装即可。配置(在Settings-User中添加如下代码):

{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"annotations": {
"@disable": false,
"args": [],
"errors": [
"FIXME"
],
"excludes": [],
"warnings": [
"NOTE",
"README",
"TODO",
"XXX",
"@todo"
]
},
"php": {
"@disable": false,
"args": [],
"excludes": []
},
"summitlinter": {
"@disable": false,
"args": [],
"excludes": [],
"globals": "",
"ignore": "channel",
"limit": null,
"only": ""
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": [
"D:\\amp\\php-5.6.26" //修改1、将此处改为你所安装的php.exe的根目录
]
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"sublimelinter": "save-only",
"sublimelinter_executable_map": {
"php": "D:\\amp\\php-5.6.26\\php.exe" //修改2、将此处改为你所安装的php.exe程序的全路径
},
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "php",
"python django": "python",
"pythonimproved": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}

使用:检测代码是否合法。

2.6 AutoFileName(补全src、href文件路径)