SublimeText3配置

安装Package Control

使用Ctrl + ` 打开Sublime Text控制台。

1
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)

插件

  • BracketHighlighter 括号高亮
  • Color Highlighter 颜色高亮
  • Colorcoder 代码多颜色
  • ConvertToUFT8 字符编码转换
  • CSS Format CSS代码整理
  • Emmet 快速写HTML标签
  • HTML-CSS-JS Prettify 代码整理
  • HTMLBeautify 代码整理
  • jsFormat 代码整理
  • LaTeXTools Latex工具
  • Markdown Preview Markdown文件预览
  • Python PEP8 Autoformat Python代码自动格式化
  • SideBarEnhancements 侧边栏增强工具
  • TrailingSpaces 删除空白 Command+Shift+D

配置文件

Preferences/Settings:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"color_scheme": "Packages/Colorcoder/Monokai (Colorcoded).tmTheme",
"font_size": 14,
"highlight_line": true,
"ignored_packages":
[
"Markdown",
"Vintage"
],
"open_files_in_new_window": false,
"original_color_scheme": "Packages/User/Color Highlighter/themes/Monokai (Colorcoded).tmTheme",
"tab_size": 4,
"word_wrap": 100
}

Python PEP8 Autoformat 配置

1
2
3
4
5
6
{
"autoformat_on_save": true,
"indent-size": 4,
"tab_size": 4,
"translate_tabs_to_spaces": true,
}

键盘绑定

Key Bindings - User

1
2
3
4
5
6
7
8
9
10
11
12
13
[
{ "keys": ["ctrl+shift+c"], "command": "copy_path" },
{ "keys": ["f1"], "command": "dash_doc"},
{ "keys": ["shift+command+d"], "command": "delete_trailing_spaces" },
{ "keys": ["shift+command+f"], "command": "reindent", "args":{"single_line":false} },//格式化html代码
{ "keys": ["f2"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "/Applications/Google Chrome.app",
"extensions":".*"
}
}
]