安装Sublime包管理器pci - Package Control
SUBLIME TEXT 3
import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Ctrl + Shift + P 方式唤醒命令行
配置插件相关配置
KevindeMac-mini:~ Kevin$ which php
/usr/bin/php
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"annotations": {
"@disable": false,
"args": [],
"errors": [
"FIXME"
],
"excludes": [],
"warnings": [
"NOTE",
"README",
"TODO",
"XXX",
"@todo"
]
},
"php": {
"@disable": false,
"args": [],
"excludes": []
},
"summitlinter": {
"@disable": false,
"args": [],
"excludes": [],
"globals": "",
"ignore": "channel",
"limit": null,
"only": ""
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": ["/usr/bin/php"],
"windows": [
]
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"sublimelinter": "save-only",
"sublimelinter_executable_map": {
"php": "/usr/bin/php"
},
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "php",
"python django": "python",
"pythonimproved": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
创建PHP编译系统
Tools->Build System-> New Build System
{"cmd": ["php", "$file"], "file_regex": "php$", "selector": "source.php" }
参考文献:
http://blog.csdn.net/heiyeshuwu/article/details/51859571
http://jingyan.baidu.com/article/09ea3ede04ebe9c0aede390d.html?qq-pf-to=pcqq.group