Sublime Text 3 配置
     发布在:Others      浏览:53      评论:0 条评论

安装包管理器

打开 view -> show console 粘贴下面代码

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

包官网

主题

  • One Dark
  • One Dark Material
  • brogrammer 扁平风格
  • Spacegray
  • Soda
  • Boxy 很炫扁平化
  • ayu 扁平化
  • amCoder 扁平没有文件图标
  • Material Theme (我的最爱)

Material Theme主题配置

  • User 设置(首选项 -> 设置)
{
    "color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
    "folder_exclude_patterns":
    [
        "node_modules",
        ".svn",
        ".git",
        ".hg",
        "CVS"
    ],
    "font_face": "consolas",
    "font_size": 8,
    "ignored_packages":
    [
        "Vintage"
    ],
    "material_theme_accent_graphite": true,
    "material_theme_arrow_folders": true,
    "material_theme_bright_scrollbars": true,
    "material_theme_compact_sidebar": true,
    "material_theme_contrast_mode": true,
    "material_theme_small_statusbar": true,
    "material_theme_small_tab": true,
    "tab_size": 4,
    "theme": "Material-Theme-Darker.sublime-theme",
    "translate_tabs_to_spaces": true,
    "ui_big_tabs": false,
    "ui_fix_tab_labels": true,
    "ui_font_size_small": true,
    "ui_font_source_code_pro": true,
    "ui_separator": true,
    "ui_sidebar_highlight_row": true,
    "ui_wide_scrollbars": false
}

Sublime Text 3 配置

主题推荐: https://www.zhihu.com/question/46266742

插件

  • ChineseLocalizations
  • A File Icon
  • Markdown Preview
  • Terminal
  • SublimeGDB
  • DocBlockr
  • IMESupport

自定义插件安装目录

安装好sublime text后不要运行,在安装目录内新建Data目录即可。

如果已经运行过,删除 %appdata% 目录的Sublime text3 文件夹,在Sublime text3安装目录新建Data目录即可。

配置

// tab键转为空格代替
"translate_tabs_to_spaces": true,
// 排除文件夹或文件
"folder_exclude_patterns": ["node_modules",".svn", ".git", ".hg", "CVS"],

//
"ui_big_tabs"       : false,
"ui_fix_tab_labels" : true,
"ui_separator"      : true,
"ui_sidebar_highlight_row": true,
"ui_wide_scrollbars": false

ubuntu 的一些问题

"font_face": "consolas", // 等宽字体

G++.sublime-build

{
    // "shell_cmd": "make",
    "encoding": "gbk",
    "working_dir": "$file_path",
    "shell_cmd": "g++ -Werror -std=c++0x \"$file_name\" -o \"$file_base_name\"",
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "selector": "source.c,source.c++",

    "variants": 
    [
        {   
        "name": "Run",
            "shell_cmd": "g++ -Werror -std=c++0x  \"$file\" -o \"$file_base_name\" && \"${file_path}/${file_base_name}\""
        },
        {
        "name": "RunInCmd",
            "shell_cmd": "g++ -Werror -std=c++0x  \"$file\" -o \"$file_base_name\" && start cmd /c \"\"${file_path}/${file_base_name}\" & pause \""
        }
    ]
}

Responses