一、一些参考
http://sublimetexttips.com/ The Sublime Text Tips Newsletter,非常有帮助的一个纯干货的sublime的tips网站,可以直接邮箱订阅。
http://sublimetexttips.com/archives/ 文章集合
http://sublimetexttips.com/archives/ 文章集合
http://sublimetexttips.com/formatting-html-with-sublime-text/ 一篇很好的讨论如何给html文档排版(格式化)的文章
插件和使用技巧:
二、常用快捷键
插件和使用技巧:
http://www.ithome.com/html/soft/31560.htm Sublime Text 使用介绍/全套快捷键及插件推荐
- Ctrl+` : Console
- Ctrl+B : 运行python
-
-
点击“Preference”-----》“Browse Packages”----------》“python”,编辑Python.sublime-build文件,添加python应用程序的路径,我的是安装到了c:\Python27路径中:
{
"cmd":["python.exe", "-u", "$file"],
"path":"C:/Python27",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
注意:1、代码路径和环境变量的路径中不要带中文,对中文支持还不好。
2、写完程序后,需要先保存一下,才能够运行。运行时按ctrl+b。
-
- Ctrl+D : 选中单词,再按则可以选中下一个相同的单词
- Ctrl+G : 跳到输入的行号 再按一次可取消显示
- Ctrl+L : 选择行
- Ctrl+P : 在Tab上打开的文件中快速导航 (一个例子,输入@: 可以搜索html tag的ID或者method)
- Ctrl+R:前往 method, 相当于ctrl+p输入@
- Ctrl+X : 删除行
- Ctrl+Shift: 光标停留在一行或者选定一行,按住这两个键,再按上下键,便可以移动该行/数行的位置
- Ctrl+Shift+F: 可以跨文件搜索
- Ctrl+Shift+P : 命令panel
- Shift+Tab: 类似于大小写切换,缩进是Tab,反缩进的快捷键是Shift+Tab
更改系统快捷键:
Preferences-> Key Bindings
为当前语言更改tab所等于的空格数:
Preferences-> Key Bindings
为当前语言更改tab所等于的空格数:
在sublime text中将TAB缩进直接转化为4个空格,可以按照如下方式操作:
菜单栏: Preferences -> Settings – More -> Syntax Specific – User
然后添加设置代码就可以了,文件保存在$Packages/User下
1 | { |
2 | "tab_size" : 4 , |
3 | "translate_tabs_to_spaces" : true |
4 | } |
插件管理:
- 进入package control: Preferences-> Package Control
- 进入package control install: ctrl+shift+p,输入install,便可以找到package control:install
- 更改Package快捷键和设置:Preferences-> Package Settings-> 具体的package (settings & Key Bindings)
四、一些常用的插件/包
- HTMLTidy https://github.com/welovewordpress/SublimeHtmlTidy (使用:ctrl_shift_p打开命令panel,输入Tidy HTML即可(需要php在windows path中))
- JS Format
- PhpTidy (需要安装php,并配置之) http://lobert.iteye.com/blog/1960552
- YUI Compressor (压缩js和css) https://github.com/leon/YUI-Compressor
- PythonTidy
-
- https://pypi.python.org/pypi/PythonTidy/
- http://opensourcehacker.com/2012/11/29/clean-up-python-source-code-with-pythontidy-available-as-sublime-text-2-plugin-too/
- simply press CONTRL+CMD+ALT+T: your source is fixed。