PHPStorm基本的配置配置

来源:互联网 发布:内网软件 编辑:程序博客网 时间:2024/05/01 20:58

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=1xdebug.default_enable=1xdebug.remote_port=9000xdebug.remote_host=127.0.0.1xdebug.remote_connect_back=1xdebug.remote_enable=1xdebug.idekey=PHPSTORM

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

原创粉丝点击