sublime Text使用技巧及常用插件
语法:
http://docs.emmet.io/cheat-sheet/
http://www.iteye.com/news/27580
http://www.w3cplus.com/tools/emmet-cheat-sheet.html
//安装Packgae Control:
//Ctrl+` :
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())
//快捷键映射
[
{"keys": ["enter"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]\\>\\'\\\"\\ %>\\}\\;\\,]", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^.*\\{$", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
},
//以下为Trailing Space插件 一键删除多余空格
{ "keys":["ctrl+alt+d"], "command":"delete_trailing_spaces"},
{ "keys":["ctrl+alt+o"], "command":"toggle_trailing_spaces"}
]
//Setting-user
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"default_line_ending": "unix",
"font_size": 11,
"ignored_packages":
[
"Vintage"
],
"save_on_focus_lost": true,
"tab_size": 4,
"theme": "SoDaReloaded Dark.sublime-theme",
"translate_tabs_to_spaces": true,
"word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?",
"jsdocs_extend_double_slash": false
}
Wrap with Abbreviation文本编辑技巧
//常用插件 Emmet Theme - SoDaReloaded//代码风格 { "theme": "SoDaReloaded Dark.sublime-theme" } SideBarEnhancements//侧栏右键功能增强 SublimeTmpl //快速创建文件类型 autoFileName// 自动提示url Html-css-javascript-prettify //格式化代码 AlignTab //对齐 AutoFileName //自动补全url Trailing Space //高亮显示多余空格 Goto-CSS-Declaration //定位到css定义
SublimeLinter
SublimeLinter-jshint //需要npm install jshint -g //jshint@2.5.0以上
//括号高亮显示插件 Bracket HighLighter //在Bracket setting - user中设置 { "bracket_styles": { "default": { "icon": "dot", // "color": "entity.name.class", "color": "brackethighlighter.default", "style": "highlight" }, "unmatched": { "icon": "question", "color": "brackethighlighter.unmatched", "style": "highlight" }, "curly": { "icon": "curly_bracket", "color": "brackethighlighter.curly", "style": "highlight" }, "round": { "icon": "round_bracket", "color": "brackethighlighter.round", "style": "highlight" }, "square": { "icon": "square_bracket", "color": "brackethighlighter.square", "style": "highlight" }, "angle": { "icon": "angle_bracket", "color": "brackethighlighter.angle", "style": "highlight" }, "tag": { "icon": "tag", "color": "brackethighlighter.tag", "style": "highlight" }, "single_quote": { "icon": "single_quote", "color": "brackethighlighter.quote", "style": "highlight" }, "double_quote": { "icon": "double_quote", "color": "brackethighlighter.quote", "style": "highlight" }, "regex": { "icon": "regex", "color": "brackethighlighter.quote", "style": "outline" } } }

浙公网安备 33010602011771号