#sublime必備插件php
####BracketHighlighter Alignment(與QQ快捷鍵衝突,需重設)html
####DocBlockr : PHP註釋生成ajax
####emmet : 快速編寫htmljson
####默認設置 Preference-defalut:cookie
【將Tab鍵自動替換爲4個空格】 // The number of spaces a tab is considered equal to 「tab_size」: 4, // Set to true to insert spaces when tab is pressed 「translate_tabs_to_spaces」: true, trim_trailing_white_space_on 刪除行尾空格
####CodeIgniter Snippetssession
Class _cookie _get _get_post _post _server set_cookie get_request_header request_headers ip_address valid_ip user_agent is_ajax is_cli fetch_method fetch_class fetch_module output_json set_json th Helper anchor form_checkbox form_dropdown form_hidden form_input form_open form_password form_submit form_textarea form_upload form_validation form_label uri_segment Library calendar cart_add cart_update display_cart email flashdata set_flashdata generate_table pagination upload Active Record db_delete db_get db_insert db_select db_update db_where db_last db_order db_result db_result_array db_row db_row_array db_free_result db_num_fields db_num_rows Session session_userdata session_set_userdata session_all_userdata session_unset_userdata session_sess_destroy Misc ci_start construct controller model crud load_helper load_library load_model load_view log ciline eof
####Sublime 保存時自動轉換tab成空格ide
每次保存前手動轉換實在太煩人。 1.打開sublime的Preference -> Browser Packages ... 2.新建一個目錄ExpandTabsOnSave 3.新建文件ExpandTabsOnSave.py 4.把下面內容複製進去,保存 import sublime, sublime_plugin, os class ExpandTabsOnSave(sublime_plugin.EventListener): def on_pre_save(self, view): if view.settings().get('expand_tabs_on_save') == 1: view.window().run_command('expand_tabs') 5.若是你想只是應用於當前項目,在 .sublime-project文件下添加: "settings": { "expand_tabs_on_save": true } 6.全局改變,打開Preferences -> Settings - User添加: "settings": { "expand_tabs_on_save": true }
####phpfmt : 格式化PHP代碼,對齊代碼。 一些配置項: Sublime Text > Preferences > Package Settings > phpfmt > Setting - Userpost
{mar "enable_auto_align": true, // 垂直方向代碼對其 "format_on_save": true, // 保存時自動格式化 "indent_with_space": true, // 使用空格代替tab "php_bin": "/usr/bin/php", // PHP 所在目錄 "psr2": true // 使用psr2規範格式化代碼 }