Basics

ALT-AShow only your code

Navigation

CTRL-⬆️ / CTRL-⬇️Move cursor from method to method
CMD-SHIFT-MINUSCollapse entire class (all code)
CMD-PLUSExpand one level of code
CMD-SHIFT-PLUSExpand all code
ALT-JSelect next occurrence
ALT-SHIFT-JSelect all occurrences
ALT-ALT (hold second) ⬆️ / ⬇️Add multiple cursors without the mouse
ALT-SHIFT-⬆️ / ⬇️Move code up or down

Git

CMD-9Show/Hide Git Window
CTRL-SHIFT-G + ⬇️Pull
CTRL-SHIFT-G + ⬆️Push
CTRL-SHIFT-G + FFetch
CTRL-SHIFT-G + AToggle annotations

Refactoring

CTRL-SHIFT-E + CTRL-SHIFT-MExtract Method

Testing

CMD-SHIFT-TToggle between class and tests
CTRL-SHIFT-RRun Test
CTRL-SHIFT-S + CShow Coverage Data
CTRL-SHIFT-H + CHide Coverage Data

Live Templates

lioLog::shouldReceive(‘info’)->once();
leoLog::shouldReceive(‘error’)->once();
pubt/** @test */
public function
()
{

}
pubfpublic function ()
{

}
prifprivate function ()
{

}
msr$mock->shouldReceive(”)
->once()
->andReturn();
msrt$mock->shouldReceive(”)
->once()
->andThrow();

Creating / Editing Live Templates

  • CMD-comma to enter Preferences
  • Search for Live Templates
PHPStorm Shortcuts For Mac