分享我的Sublime Text
编辑器的设置。
version=2.0.2
Theme
Primer
使用package control
安装Theme-Primer
。Setting-User
配置:
{
"color_scheme": "Packages/Theme - Primer/primer.light.tmTheme",
"theme": "Primer.sublime-theme"
}
Font
Monaco
等宽字体,大小根据屏幕分辨率和习惯设置。
{
"font_face": "Monaco",
"font_size": 11
}
Format
我习惯于用空格缩进,所以用了下面的配置。
{
"draw_white_space": "all", // 显示空格
"translate_tabs_to_spaces": true //用空格替代Tab
}
Markdown
Markdown Preview & markdownEditting
Markdown Preview
的打开浏览器预览的快捷键默认是Ctrl+Shift+P
。已被占用,所以改用Alt+m
。
{
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }
}
MarkdownEditting
可以辅助编辑,如果已对语法料如执掌,可以不用。
Tab键更改为输出空格
key Bindings-User:
// 用tab键输出空格
{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{"keys": ["ctrl+shift+r"], "command": "reindent" , "args": {"single_line": false}},
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": " ", "exact": false},
"context":
[
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "reindent", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": " " },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
]
}