逛奔的蜗牛

我不聪明,但我会很努力

   ::  :: 新随笔 ::  ::  :: 管理 ::
@import url(/css/cuteeditor.css); @import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); @import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); @import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); Key Bindings User: 快捷键
[
    { "keys": ["super+;"], "command": "auto_complete" },
    { "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
    { "keys": ["super+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
    { "keys": ["alt+super+r"], "command": "find_all_under" },
    { "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },
    { "keys": ["super+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line Before.sublime-macro"} },
    { // Emmet: Zencoding
        "keys": [
            "ctrl+enter"
        ],
        "command": "expand_as_you_type",
        "context": [
            {
                "operand": false,
                "operator": "equal",
                "match_all": true,
                "key": "setting.is_widget"
            },
            {
                "match_all": true,
                "key": "emmet_action_enabled.expand_as_you_type"
            }
        ]
    }
]


// super在Mac里指的是Cmd键
// 删除当前行: Cmd + d
// 自动补全: Cmd + ;
// 跳到行: Cmd + l
// 修改当前文件中所有的同一个单词: Cmd + Alt + r
// 列出所有的函数 Cmd + r 
// 在下一行插入行: Shift + Enter
// 在上一行插入行: Shift + super + Enter

Settings - User: {
    "ignored_packages":
    [
        "Vintage"
    ],

    "line_numbers": false,
    "open_files_in_new_window": false,
    "show_tab_close_buttons": true,
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
    "word_wrap": true,
    "wrap_width": 80,

    "theme": "Soda Dark.sublime-theme",
    "color_scheme": "Packages/Color Scheme - Default/Black Pearl.tmTheme",
    "caret_style": "solid",
    "draw_white_space": "selection",
    "ensure_newline_at_eof_on_save": true,
    "fade_fold_buttons": false,
    "font_size": 14.0,
    "gutter": true,
    "highlight_line": false,
    "highlight_modified_tabs": true
}

安装插件: 
1. 安装Package Control: 按下cmd + `打开Console,输入下面的命令,安装好后重启Sublime Text 2
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
2. Cmd + Shift + P,输入install,然后再输入下面几个插件的名字安装
    2.1 Format SQL // 格式化SQL
    2.2 Indent XML // 格式化XML
    2.3 Theme - Soda // 安装Soda 主题
    2.4 ZenCoding  // ZenCoding网页前端开发者的利器,使用Emmet代替,zenCoding过期了: 快捷键:ctr+alt+enter
    2.5 SublimeRope // Python自动补全,打开文档,...
    2.6 Shell-Turtlestein: 运行 shell 命令,快捷键cmd + shift + c https://github.com/misfo/Shell-Turtlestein
    2.7 Bracket Highlighter

3. 安装皮肤:Theme - Soda: 修改过的 /Files/biao/Theme-Soda.zip
修改自动补全窗口中被选中项的背景: code-completion-row-selected.png
效果:


不喜欢显示关闭按钮,但未保存的文档需要显示一个圆点表示未保存:
    {
        // Tab button size
        "class": "tab_close_button",
        "settings": ["show_tab_close_buttons"],
        "content_margin": [0, 0] // Note: 隐藏关闭按钮
    },
    // Tab dirty button
    {
        "class": "tab_close_button",
        "parents": [{"class": "tab_control", "attributes": ["dirty"]}],
        "layer0.texture": "Theme - Soda/Soda Dark/tab-dirty.png",
        "layer0.opacity": 1.0,
        "layer1.opacity": 0.0,
        "content_margin": [8, 8] // Note: 当文档被修改时,显示未保存按钮
    },

    {
        "class": "auto_complete",
        "row_padding": [2, 0], // 被选中行的上下边距为0
        "layer0.tint": [30, 30, 30],
        "layer0.opacity": 1.0,
        "dark_content": true
    },

代码着色主题:微微修改过的Espresso Soda
http://www.cppblog.com/biao/archive/2012/01/17/164313.html

代码着色主题:微微修改过的Black Perl: 
http://www.cppblog.com/biao/archive/2012/01/20/164414.html

posted on 2012-01-16 20:36 逛奔的蜗牛 阅读(8600) 评论(1)  编辑 收藏 引用 所属分类: 其他编程

评论

# re: Html:Sublime Text 2 的设置 2012-08-03 07:36 biao
在Mac上使用可以使用另一个皮肤:Aqua  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理