PHPStorm 個性化基本的配置和常用的快捷鍵

PHPStorm 個性化基本的配置和常用的快捷鍵

  • 去除摺疊線
    command + shift + a 輸入code Folding選中後把勾去掉

  • 去掉右邊的線
    command + shift + a 輸入 right margin 選中後把勾去掉

  • 常用快捷鍵

    1. command + e 文件的快速跳轉
    2. command + 1 全屏顯示
    3. command + o 文件的搜索
    4. command + F12 函數的查詢
    5. control + (command) + g 選擇相同的單詞 sublime的快捷鍵是command + d
  • 自動補充命名空間,

    1. command + ,
    2. 選中Directories 然後選中Sources
    3. 以後創建類就會自動創建命名空間
  • 快速創建文件

    1. command +
    2. command + n 創建文件
  • 去掉創建phpClass最上面的註釋

    1. command + shift + a
    2. 輸入 file template
    3. 按照自己需求選擇
  • 創建模板

    1. command + shift + a
    2. 輸入live template
    3. 點擊add Template group
    4. abbreviation 是輸入時按tab會出現模板,
  • 代碼格式化自定義

    1. 快捷鍵 command + option + L
    2. 選擇 Preference -> code style -> php
    3. 自定義定製
  • 縮短代碼,重寫方法(重點推薦)

    1. 選擇一個if方法,
    2. control + t 選擇 method(如果是變量選擇變量)
    3. 然後phpStrom就會自動創建一個方法用於if語句,大大增加可讀性
  • 使用主題

    1. 首先可以選擇主題 GitHubTheme
    2. 然後到github找到這個主題 喜歡的主題
    3. 複製這個源文件的鏈接(代碼頁)
    4. 進入/Users/biyongyao/Library/Preferences/PhpStorm2017.1/colors
    5. wget + 鏈接
    6. 重啓phpstrom,然後在主題上就看見新的主題可以選擇了
  • 使用xdebug

    1. 使用homebrew安裝xdebug

    2. php --ini //查找出xdebug的配置文件

    3. 配置文件的信息

        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
      

原文地址:http://biyongyao.com/archives/187

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章