@import url(/css/cuteeditor.css);
@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
@import url(http://www.shnenglu.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
// 列出所有的函數(shù) 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網(wǎng)頁前端開發(fā)者的利器,使用Emmet代替,zenCoding過期了: 快捷鍵:ctr+alt+enter
2.5 SublimeRope // Python自動補全,打開文檔,...
2.7 Bracket Highlighter
修改自動補全窗口中被選中項的背景: code-completion-row-selected.png
效果:
不喜歡顯示關(guān)閉按鈕,但未保存的文檔需要顯示一個圓點表示未保存:
{
// Tab button size
"class": "tab_close_button",
"settings": ["show_tab_close_buttons"],
"content_margin": [0, 0] // Note: 隱藏關(guān)閉按鈕
},
// 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
},
代碼著色主題:微微修改過的Black Perl: