Top productive keyboard shortcuts for PHPStorm

I've been a fan of PHPStorm for several years. Before PHPStorm, I tried many IDEs and editors, including some very popular names like NetBeans, Eclipse or Sublime Text 3 but I chose with PHPStorm for the number of features and support for WordPress. It gets better and better over time. If you're a Sublime Text user, you might argue that Sublime Text is more lightweight and more productive because of its keyboard shortcuts. I can agree with the "lightweight" term, but not the other. PHPStorm has a very nice list of productive keyboard shortcuts as you can see below.

PHPStorm keyboard shortcuts

Here are some keyboard shortcuts of PHPStorm I use most (and I feel very productive):

Hotkey Description
Ctrl-Shift-A Quick search for an action or settings. It's similar to Ctrl-Shift-P in Sublime Text. I use this a lot to Split screen.
Ctrl-Shift-N Quick open a file. Just type a part of the file name and Enter. Similar to Ctrl-P in Sublime Text.
Ctrl-N Quick search for a class. Just type a part of the class name and Enter.
Shift-Shift Search everywhere: file name, function, class, text, settings, etc. This is very useful if you just don't know exactly the text or file name.
Ctrl-E Open the list of recent files. Very helpful when you want to switch between files.
Ctrl-G Go to a line.
Ctrl-F4 Close the current file.
Ctrl-Tab Open the most recent file. Again, very helpful when switching between 2 files.
Alt-1 Open the project file list.
Alt-2 Open the favorite file list.
Alt-7 Open the current file structure. Very useful when you work with class. It shows you all methods and parameters.
Ctrl-Y Delete whole line. No need to select line and delete any more.
Ctrl-Q Show parameters and description for a function. Extremely helpful when you forget the parameters.
Ctrl-Alt-L Reformat code. This is the best feature of PHPStorm that you can't find in Sublime Text. You can set up the coding style to match WordPress coding standards and boom, your code is formatted beautifully.
Alt-Select Press Alt and use your mouse to select text. This allows you to select text in vertical mode, which is very useful when you want to edit a list (array elements, for example).
Alt-F7 Find usage of a function or method. It's very helpful when you want to know where the function is used (in order to fix bugs or remove the function).
Shift-F6 Rename a file or a function. When you change a function name, you must change its name in all places it's called. Using this hotkey, PHPStorm cares that for you.
Ctrl-K Commit to Git or any VCS. I use this a lot as it reduces the time working with Git. Remember to integrate Git with PHPStorm to use it.
Ctrl-Shift-K Push commits to the repositories.
pubf-Tab When you want to generate a public method for a class, type pubf and then press Tab, PHPStorm will generate a template of the function for you. Keep pressing Tab to enter function name, parameters, etc.
Alt-Up Jump to the previous method in a class.
Alt-Down Jump to the next method in a class.
Ctrl-D Duplicate a line
Ctrl-/ Comment out a line

Hope these keyboard shortcuts can help you work faster and easier with PHPStorm. You can also read some tips using PHPStorm by Rarst or watch awesome videos from Laracast. If you have good tips using PHPStorm, let me know in the comments.

🔥 HOT: Interested in boosting your WordPress SEO? My Slim SEO plugin is a super lighweight and automated plugin that handles most the hard work for you: meta tags, sitemap, redirection, schema & link building.

👉 Have a look and you will love it: wpslimseo.com

Leave a Reply

Your email address will not be published. Required fields are marked *


Copyright © 2024 Deluxe Blog Tips. All rights reserved.

My products: Meta Box | Slim SEO