Modern PHP, soft skills, productivity and time management.

Handy PhpStorm shortcuts that make your life easier

you like keyboard, don’t you?

tl;dr

Use Ctrl + v and Cmd + Shift + a shortcuts in PhpStorm. Period.


I changed my job recently, so I changed my coworkers as well. It’s always a good opportunity to learn something new. And a good excuse to write about it 😉
So I want to present to you my favorite shortcuts in PhpStorm. I’m working on a Mac so presented shortcuts are for its keyboard. And I’m using “Default” keymap.

Quick version control operations

If you’re using Git then you can use it in PhpStorm in two ways: console and in version control (VCS) menu. There are also some handy shortcuts, like Cmd + t for git pull or Cmd + k for git commit. But if you want to create a branch, or checkout to one, you go to VCS menu, find your option and click it.
Waste of time!
There is one very handy and universal shortcut: Ctrl + v. It opens VCS menu immediately and let you start typing to find your operation. So if you want to create a new branch you should use Ctrl + v -> bran -> new -> type branch name and push enter (yes, it has filters options when you type, no need to type whole commands :)).
Do you want to resolve conflicts? Ctrl + v -> resol -> enter. Create a stash? Ctrl + v -> stas -> type name -> enter. It’s that easy. And fast, very fast 🙂
Try it and impress your collegues!

see? no mouse!

Quick, global operation search

I learned recently that you can create a Pull Request on Github strait from the PhpStorm, and I find it very useful, but searching for it is a little bit annoying (VCS -> Git -> Create pull request). You can use operation search in the menu bar (Help -> search) but you have to click etc. So lame 😉

Fortunately, there is a… yes, shortcut. Cmd + Shift + a opens application vide operation search. If you want to create pull request just use Cmd + Shift + a -> creapull -> fill dialog form -> enter. Or if you want to annotate the code (to blame your coworker for crappy code ;)) use Cmd + Shift + a -> anno -> enter. Or if you want to quickly switch soft wrap for files then use Cmd + Shift + a -> wrap -> enter, and so on,

I use this shortcut mainly for those operations but I’m sure you’ll find more use cases (don’t forget to share them in the comments!)

Summary

Those two shortcuts save me a lot of time, not mentioning pro impression they gave to me 😀 They are very simple (hey, there is only two of them!) yet very powerful, so use it wisely, use it often or even better – use it all the time. Remember: Ctrl + v and Cmd + Shift + a.

Enjoy

2 Comments

  1. Jerzy Wickowski

    Why don’t you continue your blogging adventure?

    • krzych

      I am, but on the other blog, in this case in polish 🙂
      But, to be honest, I have some ideas and even drafts for this one, so you, sir, could just motivate me to write something 😉
      Are you interested in any particular topic?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Krzych Jończyk

Theme by Anders NorenUp ↑