PhpStorm Useful Hot Keys (for me)

Below is my tiny cheat sheet for PhpStorm. Knowing and using hot keys improves productivity significantly. I used to use them before started using IdeaVim, as many of these hot keys conflict with Vim bindings.

This post was in drafts here for at least three years, and it bubbled up during my last revision. I decided to publish it in case it is useful for someone.

Recently, I was forced to move out from PhpStorm and other JetBrains products, because Russian citizens aren’t eligible to pay for various products and services. I was a loyal customer of JetBrains products for years, and now, when my last two-years license was about to end, I had to consider moving to something else. I used IdeaVim plugin for the last few years, and moving to NeoVim was natural for me.

Hot keys

F1 – quick documentation;
Opt + F7 — find usages;
Cmd + P — show parameters;
Cmd + D — duplicate string;
Double Shift — search everywhere & Cmd + O — search class;
Cmd + Opt + T — surround with dialog;
Cmd + Opt + L  — reformat code;
Cmd + Shift + Enter — complete construction;
Cmd + E — recent files;
Double Opt + Arrow — add multiple carets;
Tab (inside parenthesis or braces) — jump outside closed parenthesis/brace.

Refactorings

Ctrl + T — refactoring popup;
Shift + F6 — rename class, variable, field, constant …;
Cmd + F6 — change signature;
Cmd + Opt + M — extract method;
Cmd + Opt + F — extract field;
Cmd + Opt + C — extract constant;
Cmd + Opt + V — extract variable;
Cmd + Opt + N — inline variable.

Compare files

Select files in the Project window and press Cmd + D.

Terminal

Open terminal, switch terminal tabs: https://stackoverflow.com/a/31631338/206729


Posted

in

by

Tags:

Comments

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.