PHPStrom中实用的功能和快捷键大全
jetbrains出的PHPStrom很大程度上方便了PHP程序的编写,下面小编给大家总结些PHPStrom中实用的功能和快捷键大全,在编写的过程中变得又舒服又快捷,感兴趣的朋友
有哪些快捷键或者PHPStrom出的特有的功能,让你觉得编写过程变得很舒服和快捷?
CTRL + j 能够快捷的输入常用的代码片段,类似vim的 snipMate,可以加入自定义代码片段
find every thing phpstorm 支持类名、文件名等的单独搜索,我常用的是直接全部搜索。find every thing 需要自定义快捷键
很精确的函数、类名、变量等的定位,支持命名空间。不得不承认做的的确很好,比vim + ctag好太多了
alt + F7 find usages 功能,可以很方便的找到函数在哪里调用了
shift + F6 重命名 可以很方便的重命名方法和变量名等等。甚至文件的重命名,也会自动修正 include filepath(貌似仅限于简单路径,路径中包含了变量的无法识别。常量没问题)
可以安装 vim插件,同样享受 vim 的快捷操作
ctrl+alt+l 代码格式化
如果你的测试代码要通过 ftp 上传到测试机 Tools->deployment 功能必须配置下,自动上传修改的文件到测试机
不仅仅是 svn还有 git都有很好的支持
可以配置断点调试,参考 +Web+Application+Debugging+with+Xdebug+and+PhpStorm 本身不常用
支持的php版本很新。当前的 phpstorm7 支持php5.5。接下来的phpstorm8支持Php5.6。
函数中未使用的变量是灰色的。使用未定义的变量会有红色下划线提示。提示变量很好的减少了手误
以上是我常用的,还有很多功能比如对composer phpunit的支持也没用过。这些习惯命令行操作了
1. 项目名右键选择"Local History | Show History"可查看本地修改记录
2. Ctrl + E 可查看最近打开文件或项目
3. 打开File | Setting | Editor,选择Appearance下面的Show Method Separators。它会将你的代码按方法,用灰色线框进行智能分割。你还可以使用:alt+↑或↓,在方法之间进行跳转
4. Ctrl + Shift + V,可选择要粘贴的最近内容
5. Ctrl + D,复制粘贴选中的文本
6. Ctrl + Y,删除当前行或选中行
7. Ctrl + Alt + 左右方向键,定位到上一次编辑的位置
8. Alt + 上下方向键,跳转到上/下函数
9. Alt + 左右方向键,导航标签切换
10. Ctrl + N,根据类名称查找
11. Ctrl + Shift + N,根据文件名查找
12. Ctrl + Shift + Alt + N,根据函数名查找
13. Ctrl + Shift + F,Find in Path
14. Ctrl + Shift + I,查看变量初始化的值
15. Ctrl + F12,快速查看当前文件的所有方法
16. Ctrl + /,单行注释
17. Ctrl + Shift + /,,多行注释
18. 修改默认打开的文件模版:"file" ---> "setting" --->"file and code template"
19. /** + Enter,自动生成注释
20. Ctrl + Alt + L,格式化代码
phpstorm常用快捷键大全
mac电脑phpstorm快捷键
command + a 全选
command + c 复制
command + v 粘贴
command + z 撤消
command + k 代码搜索
command + l 输入行号跳到某一行
command + o 查看一个类的结构
command + / 单行注释
command + e 列出最后打开的文件
ctrl + shift + / 块注释
shift + command + x
shift + command + r 按文件名搜索对应文件所在路径
shift + command + t 按类名搜索对应文件所在路径
shift + command + c 复制当前文件所在路径
选中左侧的文件名 shift + f6(mac需要同时按住键) 进行文件重命名
windows下phpstorm的快捷键
ctrl+shift+n查找文件
ctrl+shift+f 在一个目录里查找一段代码(ctrl+f的升级版)
ctr+shift+r 在一个目录里查找一段代码并替换(ctrl+r的升级版)
CTRL+ALT ←/→ 返回上次编辑的位置
ALT+ ←/→ 切换代码视图,标签切换
ALT+ ↑/↓ 在方法间快速移动定位
ctrl+j插入活动代码提示
ctrl+alt+t当前位置插入环绕代码
alt+insert生成代码菜单
ctrl+q查看代码注释
ctrl+d复制当前行
ctrl+y删除当前行
shift+F6重命名
ctrl+shift+u字母大小写转换
ctrl+f查找
ctrl+r替换
F4查看源码
ctrl+shift+i查看变量或方法定义源
ctrl+g跳转行
ctrl+alt+F12跳转至当前文件在磁盘上的位置
alt+down查看下一个方法
alt+up查看上一个方法
ctrl+alt+l重新格式化代码
ctrl+shift+downstatement向下移动
ctrl+shift+upstatement向上移动
alt+shift+downline向下移动
alt+shift+upline向上移动
ctrl+/行注释
ctrl+shift+/块注释
ctrl+shift+n打开工程中的文件
ctrl+b跳到变量申明处
ctrl+[]匹配 {}[]
ctrl+shift+]/[选中块代码
ctrl+x剪切行
ctrl+shift+v复制多个文本
alt+left/right标签切换
ctrl+p显示默认参数
ctrl+F12在当前类文件里快速查找方法
--------------------------------------------------------------
phpstorm快捷键:
// ctrl+shift+n 查找文件
// ctrl+j 插入活动代码提示
// ctrl+alt+t 当前位置插入环绕代码
// alt+insert 生成代码菜单
// ctrl+q 查看代码注释
// ctrl+d 复制当前行
// ctrl+y 删除当前行
// shift+F6 重命名
// ctrl+shift+u 字母大小写转换
// ctrl+f 查找
// ctrl+r 替换
// F4 查看源码
// ctrl+shift+i 查看变量或方法定义源
// ctrl+g 跳转行
// ctrl+alt+F12 跳转至当前文件在磁盘上的位置
// alt+down 查看下一个方法
// alt+up 查看上一个方法
// ctrl+alt+l 重新格式化代码
// ctrl+shift+down statement向下移动
// ctrl+shift+up statement向上移动
// alt+shift+down line向下移动
// alt+shift+up line向上移动
// ctrl+/ 行注释
// ctrl+shift+/ 块注释
// ctrl+shift+n 打开工程中的文件
// ctrl+b 跳到变量申明处
// ctrl+[] 匹配 {}[]
// ctrl+shift+]/[ 选中块代码
....
// ctrl+x 剪切行
// ctrl+shift+v 复制多个文本
// alt+left/right 标签切换
// ctrl+p 显示默认参数
// ctrl+F12 在当前类文件里快速查找方法

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











By installing the XdebugPHP extension and enabling it, you can debug PHP functions using an Xdebug client such as PhpStorm or VSCode. Set breakpoints, run scripts using the IDE, enter debug mode to inspect variables, perform step-by-step debugging and view call stacks. In a practical case, you can set breakpoints on the sum function and use the debugger to view variables and execution flow to debug errors or optimize the code.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Code debugging methods for PHP functions include: Built-in debugger: Use var_dump() or print_r() to output the contents of a variable or array. Logging: Use the error_log() function to record debugging messages to the specified file or system log. Breakpoint: Pause the program at a specific point in the code to examine variable values and execution flow. Exception handling: Use try-catch blocks to handle exceptions thrown in functions and print exception messages and stack traces. Xdebug Debugger: Provides advanced debugging features such as tracking variable values, setting breakpoints and analyzing code coverage.

Revealing the Secrets of PHP Integrated Development Tools: List of 3 Common Tools, Need Specific Code Examples With the continuous development of the Internet, PHP, as a scripting language for developing Web applications, is widely used in various fields. In order to improve development efficiency and code quality, many programmers choose to use integrated development tools (Integrated Development Environment, referred to as IDE) for PHP development. This article will reveal the three common PHP integrated development tools and provide specific

Install PHPStorm on the Debian system to easily solve your PHP development environment! The following steps will guide you through the entire installation process. Installation steps: Download PHPStorm: Visit the official website of JetBrains and download the latest version of PHPStorm. Unzip the installation package: After downloading using wget or curl, unzip it to the specified directory (for example /opt). Command example: wgethttps://download.jetbrains.com/phpstorm/phpstorm-2024.3.5.tar.gztar-xzfphpstorm-2024.3.5.tar.gz

PHP is a programming language widely used in web development. For PHP development tools, choosing a suitable tool can make the developer's work more efficient and convenient. In this article, we will discuss several common PHP development tools, including integrated development environments (IDEs), text editors, and debugging tools. 1. Integrated development environment (IDE) PhpStorm PhpStorm is a powerful PHP development environment developed by JetBrains. It not only supports PH

Inventory of essential tools for PHP development: Mastering these three integrated development tools requires specific code examples. With the rapid development of the Internet, PHP, as a programming language widely used to develop websites and web applications, has attracted more and more developers. love. In order to improve development efficiency and quality, it is essential to use appropriate integrated development tools. In this article, we will take stock of the three necessary tools for PHP development and provide specific code examples for each tool to help developers better master and apply them. The first tool: PHPSt

Answer: PHP code refactoring follows the principles of improving decoupling, readability, maintainability, and reducing complexity. Practice: Use namespaces to organize code. Decouple components with dependency injection containers. Refactor redundant code. Decompose large classes. Use modern coding style.
