Skip to content

Instantly share code, notes, and snippets.

@PizzaLiu
Last active December 17, 2015 15:39
Show Gist options
  • Save PizzaLiu/5633259 to your computer and use it in GitHub Desktop.
Save PizzaLiu/5633259 to your computer and use it in GitHub Desktop.
sublime-settings
全屏模式: shift + F11 或 直接 F11
注释/反注释:ctrl + /
打开控制面板: ctrl+shift+p
打开操作命令行: ctrl + `
移动到指定行:ctrl + p 输入 :xxx
定位到选中的文字的下一处: ctrl + 依次按下 k 、d
在光标行后插入空行: ctrl + enter
定位匹配字符(如左括号匹配右括号): ctrl + m
选中匹配字符间的字符:ctrl + shift + m
函数跳转:ctrl + r 输入函数名
快速打开文件: ctrl + p 输入文件路径或文件名
文件夹全文搜索: ctrl + shift + f
带缩进粘贴: ctrl + shift + v
光标一个单词一个单词的移动: ctrl+left / ctrl+shift+left / alt+left / alt+shift+right
选中字符行排序(字段名按字母顺序排序): F9 如json字符段
代码高亮:使用 Ctrl + shift + P,输入”ss“+语言名称
[
/**
* 交换两行: ctrl + up/down
* 转换选中字符大/小写:ctrl+shift+x / ctrl+shift+y
* Enter 键跳出括号
*/
{ "keys": ["ctrl+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+shift+x"], "command": "upper_case" },
{ "keys": ["ctrl+shift+y"], "command": "lower_case" },
{ "keys": ["ctrl+up"], "command": "swap_line_up" },
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" },
{"keys": ["enter"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]\\>\\'\\\"\\ %>\\}\\;\\,]", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^.*\\{$", "match_all": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
}
]
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
docBlockr: https://github.com/spadgos/sublime-jsdocs
csscomb : css检验&排序 (选中,ctrl + shift + C)
格式化JavaScript代码: JsFormat ctrl+shift+f
AutoFileName: https://github.com/BoundInCode/AutoFileName
左边栏右键增强: SideBarEnhancements
zen coding: https://github.com/sergeche/emmet-sublime
Markdown Preview
Theme: 'theme soda' ttps://github.com/buymeasoda/soda-theme
Monokai-soda
LESS代码高亮:package 搜索“less”
LESS自动编译 + 提错:
1.安装less到系统:https://github.com/duncansmart/less.js-windows (添加路径到PATH)
2.packages 安装less2css http://less2css.org/
js 压缩:https://github.com/cgutierrez/JsMinifier compiler:'uglify_js' Ctrl + Alt + Shift + m
sublime text zen coding : emmet http://emmet.io/
配色设置:把配色文件(.tmTheme)放到 Packages/User 下,Preferences -> Color Scheme -> Use 下启用配色
gist: https://github.com/condemil/Gist/ open gist 错误修正,gist.py:435 'ascii' -> 'utf-8'
sidebargit
TODO LIST : PlainTasks https://github.com/aziz/PlainTasks
{
"font_face": "Microsoft YaHei",
"font_size": 11.5,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"soda_folder_icons": true,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"theme": "Soda Dark.sublime-theme"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment