PHPStorm 個性化基本的配置和常用的快捷鍵
-
去除摺疊線
command + shift + a 輸入code Folding
選中後把勾去掉 -
去掉右邊的線
command + shift + a 輸入right margin
選中後把勾去掉 -
常用快捷鍵
- command + e 文件的快速跳轉
- command + 1 全屏顯示
- command + o 文件的搜索
- command + F12 函數的查詢
- control + (command) + g 選擇相同的單詞 sublime的快捷鍵是command + d
-
自動補充命名空間,
- command + ,
- 選中
Directories
然後選中Sources
- 以後創建類就會自動創建命名空間
-
快速創建文件
- command + ↑
- command + n 創建文件
-
去掉創建phpClass最上面的註釋
- command + shift + a
- 輸入
file template
- 按照自己需求選擇
-
創建模板
- command + shift + a
- 輸入
live template
- 點擊
add Template group
abbreviation
是輸入時按tab會出現模板,
-
代碼格式化自定義
- 快捷鍵 command + option + L
- 選擇
Preference -> code style -> php
- 自定義定製
-
縮短代碼,重寫方法(重點推薦)
- 選擇一個
if
方法, - control + t 選擇
method
(如果是變量選擇變量) - 然後
phpStrom
就會自動創建一個方法用於if語句,大大增加可讀性
- 選擇一個
-
使用主題
- 首先可以選擇主題 GitHubTheme
- 然後到github找到這個主題 喜歡的主題
- 複製這個源文件的鏈接(代碼頁)
- 進入
/Users/biyongyao/Library/Preferences/PhpStorm2017.1/colors
wget
+ 鏈接- 重啓phpstrom,然後在主題上就看見新的主題可以選擇了
-
使用xdebug
-
使用
homebrew
安裝xdebug
-
php --ini
//查找出xdebug的配置文件 -
配置文件的信息
xdebug.remote_autostart=1 xdebug.default_enable=1 xdebug.remote_port=9000 xdebug.remote_host=127.0.0.1 xdebug.remote_connect_back=1 xdebug.remote_enable=1 xdebug.idekey=PHPSTORM
-