Skip to content

Instantly share code, notes, and snippets.

@barretlee
Created July 26, 2015 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barretlee/dedd44596755cfeaabee to your computer and use it in GitHub Desktop.
Save barretlee/dedd44596755cfeaabee to your computer and use it in GitHub Desktop.
sublime-settings
{
// 主题,可以安装 themr 来管理主题
"theme": "Flatland Dark.sublime-theme",
// 设置为false时,选择提示的代码按回车或点击可以输出出来,但选择true时不会输出而是直接换行
"auto_complete_commit_on_tab": false,
// 设置为true时在当前可视文本视图相应的minimap区域的周围画边框
"draw_minimap_border": true,
// 光标淡入淡出
"caret_style": "phase",
// 设置为all时所有空格可视,便于区分页面中的空格和TAB。
"draw_white_space": "all",
// 保存时尾部只留下一个回车空行
"ensure_newline_at_eof_on_save": true,
// 保存时自动转换tab成空格
/*import sublime, sublime_plugin, os
class ExpandTabsOnSave(sublime_plugin.EventListener):
def on_pre_save(self, view):
# 如果配置中存在 expand_tabs_on_save
if view.settings().get('expand_tabs_on_save') == 1:
# 执行 expand_tabs,即 替换所有的 tabs 为 spaces
view.window().run_command('expand_tabs')
*/
"expand_tabs_on_save": true,
// 左侧代码行数字与代码之间的间隔,false 为删除间隔
"fold_buttons": false,
// 设置左侧代码行数字与代码之间的间隔距离
"margin": 2,
// 比较喜欢 Monaco 的字体
"font_face": "Monaco",
// 设置为true时高亮当前修改标签。这个会根据主题的不同会一样
"highlight_modified_tabs": true,
// 设置为true时只要切换标签导致当前编辑页面失去焦点,当前页面默认将自动保存
"save_on_focus_lost": true,
// 设置为true自动换行
"word_wrap": true,
// 反锯齿
"font_options": [ "subpixel_antialias" ],
// 字体大小14px
"font_size": 14,
// 设置为true时高亮当前修改标签。这个会根据主题的不同会一样
"highlight_modified_tabs": true,
// 设置标尺线,控制代码长度,过长需要转行
"rulers": [ 80, 100 ],
// 在一行的任意位置,shift+tab可以让改行往前缩进
"shift_tab_unindent": true,
// tab 宽度为 2px
"tab_size": 2,
// 按tab键时是用tab_size数目的空格替换
"translate_tabs_to_spaces": true,
// 设置为true时保存当前页可以批量删除行尾的空格
"trim_trailing_white_space_on_save": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment