PhpStorm cheatsheet

Useful tips and tricks for your favorite IDE

Shortcuts

IN CASE OF USING GNU/LINUX IT IS SOMETIMES REQUIRED TO ADD “WIN” KEY TO EVERY SHORTCUT CONTAINING “ALT” KEY

Inline Shortcuts

Shortcut description WIN MAC Comment
Extend Selection CTRL + W +  
Shrink Selection CTRL + SHIFT + W +  
Comment with // CTRL + / (NUMBLOCK ÷) + / (NUMBLOCK ÷)  
Comment with /**/ CTRL + Shift + / (NUMBLOCK ÷) NEVER TOUCH THIS Opens help prompt in MAC :(
Auto-Format File / Selection CTRL + ALT + L    
Delete whole line / Selected Lines CTRL + Y    
Duplicate Line / Selection CTRL + D ⌘ + D  
Move Line/Selection Up/Down CTRL + SHIFT +    
Copy Line without selection CTRL + C    
Delete whole words CTRL + BACKSPACE CTRL + DEL    
Select whole words CTRL + SHIFT +    
Unwrap CTRL + SHIFT + DEL + + <div><p>inside</p></div>
Extract Variable CTRL + ALT + V + ALT + V  
Open File-Search Dialog SHIFT SHIFT SHIFT SHIFT  
Refactor Rename Variable SHIFT + F6 SHIFT + F6  
Create additional cursor ALT + (click) ALT + (click)  
Select and create cursor at selection match ALT + J CTRL + G  
New line below SHIFT + ENTER    
New line above CTRL + ALT + ENTER    
Reduce to one line CTRL + SHIFT + J    
Show help (php doc) for function CTRL + q    
Jump to function source CTRL + (click)    

UI Shortcuts

Shortcut description WIN MAC Comment
Open Action Dialog CTRL + SHIFT + A + + A Good for learning shortcuts
Open push menu CTRL + SHIFT + K + + K  
Open “surround with” menu CTRL + SHIFT + T + + T  
Open live template menu CTRL + J    
Jump to line X CTRL + G    
Clipboard History CTRL + SHIFT + V + + V  
Search file in project SCHIFT SCHIFT SCHIFT    

Emmet

ul#nav>li*5>a{Page $}
div+a
div>(header>ul>li*2>a)+footer>p

Useful Settings