打開控制台,install package
搜 sublimelinter
先安裝sublimelinter本體
安裝完以后再搜索一下,安裝sublimelinter-php
接下來,打開preferences-package settings-sublimeLinter-settings--user
如下配置:
1 { 2 "user": { 3 4 "linters": { 5 6 }, 7 8 "paths": { 9 "linux": [], 10 "osx": [], 11 "windows": [ 12 "D:\\xampp\\php" 13 ] 14 }, 15 16 } 17 }
就是添加一下 paths的參數值,指定一下你本地php目錄。
然后關閉sublime,再次打開一個php腳本,試試吧。
有錯誤的地方在行號上會有紅點提示在代碼上會有紅色方框,鼠標放紅色方框上,錯誤信息在編輯器底部狀態欄顯示。
配置文件:
1 { 2 "user": { 3 "debug": false, 4 "delay": 0.25, 5 "error_color": "D02000", 6 "gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme", 7 "gutter_theme_excludes": [], 8 "lint_mode": "background", 9 "linters": { 10 "php": { 11 "@disable": false, 12 "args": [], 13 "excludes": [] 14 } 15 }, 16 "mark_style": "outline", 17 "no_column_highlights_line": false, 18 "passive_warnings": false, 19 "paths": { 20 "linux": [], 21 "osx": [], 22 "windows": [ 23 "D:\\wamp\\bin\\php\\php5.4.16\\php.exe" 24 ] 25 }, 26 "python_paths": { 27 "linux": [], 28 "osx": [], 29 "windows": [] 30 }, 31 "rc_search_limit": 3, 32 "shell_timeout": 10, 33 "show_errors_on_save": false, 34 "show_marks_in_minimap": true, 35 "syntax_map": { 36 "html (dj
轉載 http://my.oschina.net/cxz001/blog/204592