Phpstorm使用Tips 快捷键大全

最近发现PhpStorm作为PHP开发工具不错,但不是天天用。一些快键总是记不住,索性把Tips一个一个地翻,码在这里好了,也强化一下记忆。

1. You can quickly find all places where a particular class, method or variable is used in the whole project by positioning the caret at the symbol's name or at its usage in code and pressing Alt+F7 (Find Usages in the popup menu). 

2. To quickly see the documentation for the class or method used at the editor's caret, press Ctrl+Q (View | Quick Documentation). 查看参数的注解

3.To navigate to the declaration of a class, method or variable used somewhere in the code, position the caret at the usage and press Ctrl+B. You can also click the mouse on usages with the Ctrl key pressed to jump to declarations. 这个用的挺多的

4.

You can quickly navigate in the currently edited file with Ctrl+F12 (Navigate | File Structure).

It shows the list of members of the current class. Select an element you want to navigate to and press the Enter key or the F4 key.

To easily locate an item in the list, just start typing its name. 不光是在一个类里面,在functions这样的文件里也是管用的。


5.You can easily rename your classes, methods and variables with automatic correction of all places where they are used.

To try it, place the caret at the symbol you want to rename, and press Shift+F6 (Refactor | Rename). Type the new name in the popup window that appears, or select one of the suggested names, and press Enter.这个在菜单里是有的


6.When using Code Completion, you can accept the currently highlighted selection in the popup list with Tab key.

Unlike accepting with the Enter key, the selected name will overwrite the rest of the name to the right of the caret. This can be especially useful for replacing one method or variable name with another.这个好像用得比较少


7.To quickly select the currently edited element (class, file, method or field) in any view (Project view, Structure view or other), press Alt+F1.可以快速切换视图。


8.The speed search is available in all the tree views: just start typing and you'll quickly locate the necessary item. 这个也用过,而且支持模糊检索的功能。

9.Ctrl+W (extend selection) in the editor selects the word at the caret and then selects expanding areas of the source code. For example, it may select a method name, then the expression that calls this method, then the whole statement, then the containing block, etc. You can also select the word at the caret and the expanding areas of the source code by double-clicking the target areas in the editor. 逐步扩大选择范围,对于判断括号及if的成对关系等比较方便。


10.If the cursor is between the parentheses of a method call, pressing Ctrl+P brings up a list of valid parameters. 有时不用按,自己就出来了。

11.Ctrl+Shift+Backspace (Navigate | Last Edit Location) brings you back to the last place where you made changes in the code.

Pressing Ctrl+Shift+Backspace a few times moves you deeper into your changes history.这个其实挺重要的

12.To see your local history of changes in a file, invoke Local History | Show History from the context menu. You can navigate through different file versions, see the differences and roll back to any previous version.

Use the same context menu item to see the history of changes on a directory. You will never lose any code with this feature!

相当于本地的版本管理

13.Ctrl+E (View | Recent Files) brings a popup list of the recently visited files. Choose the desired file and press Enter to open it. 对于刚刚只是看过,但没有修改的文件这个还是需要的。

14.Use Alt+向上箭头 and Alt+向下箭头 keys to quickly move between methods in the editor. 这个还真没用过。

15.Use the Ctrl+Shift+V shortcut to choose and insert recent clipboard contents into the text. 这个应该用到得比较少。

16.To open any particular method or field in the editor quickly, press Ctrl+Alt+Shift+N (Navigate | Symbol) and start typing its name.

Choose the symbol from a drop-down list that appears.这个也比较实用的。

17.Use Alt+Shift+C to quickly review your recent changes to the project.

18.You can quickly view the image referenced at caret by using the Quick Definition (Ctrl+Shift+I). The underlying image will be opened in a popup instead of a separate editor tab. 可以在编辑器里直接看文件。

19.Navigation bar is a quick alternative to the Project view.

Use Alt+Home keyboard shortcut to show the navigation bar, and arrow keys to locate the necessary files or folders.查看文件的层次比较方便。

20.You can bring forward the list of all usages of a class, method or variable across the whole project, and quickly jump to the selected usage. To do that, place the caret at the symbol's name or at its usage in code and press Ctrl+Alt+F7 (Edit | Find | Show Usages in the main menu), scroll the list and click the desire 看使用。

21.You can jump directly to any deeply buried file, if you press Ctrl+Shift+N, and type just a couple of characters of the enclosing directories and file names: 与前面的区别在于,这个是通过路径的。

22.You can easily make column selection by dragging your mouse pointer while keeping the Alt key pressed. 这个功能相当强大,和siblimetext的很像啊,可以竖着选,可以多行一起编辑。













  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值