├── browse.sublime-build ├── .gitignore ├── Default.sublime-theme ├── Package Control.sublime-settings ├── jekyll-hhh.sublime-snippet ├── all.sublime-completions ├── jekyll.sublime-build ├── Preferences.sublime-settings ├── README.md └── Default (OSX).sublime-keymap /browse.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "$file"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Package\ Control.cache 3 | Package\ Control.last-run 4 | Package\ Control.merged-ca-bundle 5 | Package\ Control.user-ca-bundle 6 | Package\ Control.system-ca-bundle 7 | -------------------------------------------------------------------------------- /Default.sublime-theme: -------------------------------------------------------------------------------- 1 | [ 2 | /* 侧边栏和文件标签的字体都太小了,调整一下。*/ 3 | { 4 | "class": "sidebar_label", 5 | "font.size": 15 6 | }, 7 | 8 | { 9 | "class": "tab_label", 10 | "font.size" : 13, 11 | }, 12 | ] 13 | -------------------------------------------------------------------------------- /Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "in_process_packages": 3 | [ 4 | ], 5 | "installed_packages": 6 | [ 7 | "AdvancedNewFile", 8 | "Emmet", 9 | "Git", 10 | "Package Control", 11 | "RailsCasts Colour Scheme", 12 | "Sass", 13 | "SublimeERB", 14 | "SyncedSideBar" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /jekyll-hhh.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | hhh 9 | 10 | text.html.markdown 11 | 12 | -------------------------------------------------------------------------------- /all.sublime-completions: -------------------------------------------------------------------------------- 1 | { 2 | 3 | // completions 的设置有时候会失灵 ( Mac Yosemite + sublime3 )不行就改成 snippet 吧,那个还是一直都很好用 4 | "scope": "text.html.markdown", 5 | "completions": 6 | [ 7 | { "trigger": "l", "contents": "[${1}](${2})${3}" }, 8 | { "trigger": "media", "contents": "![](http://media.happycasts.net/pic/${1}.png)" } 9 | ], 10 | 11 | // "scope": "source.css", 12 | // "completions": 13 | // [ 14 | // { "trigger": "xxx", "contents": "xxx" }, 15 | // ] 16 | } 17 | -------------------------------------------------------------------------------- /jekyll.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": ["/Users/peter/bin/jekyll.sh", "$file"], 3 | "working_dir": "$file_path", 4 | "selector": "text.html.markdown" 5 | } 6 | 7 | ////////// 8 | // jekyll.sh 如下 9 | ///////// 10 | 11 | // #!/usr/bin/env bash 12 | 13 | // git add -A 14 | // git commit -a -m'wip'&&git push 15 | 16 | // VAR=$1+ 17 | // FILE=`basename $VAR`+ 18 | // PAGE=${FILE%.*}".html"+ 19 | // DIR=`dirname $VAR` 20 | // PROJECT=`basename $DIR` 21 | // URL="http://happypeter.gitcafe.io/"$PROJECT"/"$PAGE 22 | // sleep 20 # wait for jekyll to take effect 23 | // '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' $URL 24 | -------------------------------------------------------------------------------- /Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "auto_complete_commit_on_tab": true, 3 | "ensure_newline_at_eof_on_save": true, 4 | "file_exclude_patterns": 5 | [ 6 | ".DS_Store", 7 | "*.sublime-workspace", 8 | "*.scssc" 9 | ], 10 | "folder_exclude_patterns": 11 | [ 12 | ".git", 13 | "log", 14 | "node_modules", 15 | "tmp/cache", 16 | ".vagrant" 17 | ], 18 | "font_size": 16, 19 | "hot_exit": false, 20 | "ignored_packages": 21 | [ 22 | "PHP", 23 | "Vintage" 24 | ], 25 | "line_padding_bottom": 7, 26 | "line_padding_top": 7, 27 | "scroll_past_end": true, 28 | "tab_size": 2, 29 | "translate_tabs_to_spaces": true, 30 | "trim_trailing_white_space_on_save": true 31 | } 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Hello Sublime 3或2 Users 2 | 3 | 我使用的操作系统是 Mac (目前是 Yosemite),不同的操作系统,在 sublime 4 | 配置上会有微小的差别。 5 | 6 | 我使用 [Package 7 | Control](https://packagecontrol.io/installation),所有我安装的包在 [Package 8 | Control.sublime-settings 文件](https://github.com/happypeter/sublime-config/blob/master/Package%20Control.sublime-settings) 9 | 中都列出了。 10 | 11 | 12 | 13 | ### 安装步骤 14 | 15 | - 在新系统上 sublime 3/2 安装好之后 16 | 17 | ```console 18 | cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/ 19 | git clone git@github.com:happypeter/sublime-config.git 20 | mv sublime-config/* . 21 | rm -rf sublime-config 22 | ``` 23 | 24 | - 到 https://packagecontrol.io/installation 安装 packagecontrol 。这样所有的包会自动安装上。( ctrl 跟 导引号 来呼叫出 command console ) 25 | -------------------------------------------------------------------------------- /Default (OSX).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { "keys": ["shift+tab"], "command": "reindent" , "args": { "single_line": false } }, 3 | 4 | 5 | // 系统默认是 { "keys": ["ctrl+space"], "command": "auto_complete" }, 6 | // 但是我系统上 "ctrl+space" 是用来切换输入法的 7 | { "keys": ["alt+space"], "command": "auto_complete" }, 8 | 9 | 10 | // 用来在 .erb 文件中输入 <%= %>,再敲一次可以变成 <% %> 11 | // 需要安装包: https://github.com/eddorre/SublimeERB 12 | { "keys": ["ctrl+shift+."], "command": "erb" } 13 | 14 | // 下面这些是我从 'Key binding Default' 中直接拷贝过来的,为的是帮助记忆 15 | // { "keys": ["super+n"], "command": "new_file" }, 16 | // { "keys": ["super+s"], "command": "save" }, 17 | // { "keys": ["super+w"], "command": "close" }, 18 | // { "keys": ["super+k", "super+b"], "command": "toggle_side_bar" }, 19 | // { "keys": ["super+z"], "command": "undo" }, 20 | // { "keys": ["super+y"], "command": "redo_or_repeat" }, 21 | // { "keys": ["ctrl+tab"], "command": "next_view_in_stack" }, 22 | // { "keys": ["super+]"], "command": "indent" }, 23 | // { "keys": ["super+["], "command": "unindent" }, 24 | // { "keys": ["ctrl+minus"], "command": "jump_back" }, // after search jump 25 | // { "keys": ["super+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} }, 26 | // { "keys": ["f4"], "command": "next_result" }, 27 | // { "keys": ["shift+f4"], "command": "prev_result" }, 28 | // { "keys": ["ctrl+super+up"], "command": "swap_line_up" }, 29 | // { "keys": ["ctrl+super+down"], "command": "swap_line_down" }, 30 | // { "keys": ["super+b"], "command": "build" }, 31 | ] 32 | --------------------------------------------------------------------------------