Default macOS Keymap Refactoring F5/F6 Copy/Move Delete Safe Delete F6 Rename N Inline Variable M/V/F/C Extract Method/Variable/Field/Constant. We now need to reconfigure PhpStorm to list on this port. Open preferences and type xdebug into the search box. Then find Languages & Frameworks - PHP - Debug on the left hand navigation pane and change the port to 9001. That’s pretty much it for PhpStorm. Right-click the macro and choose Add Keyboard Shortcut in the context menu. In the Enter Keyboard Shortcut dialog, press Ctrl+S to be used as the shortcut and click OK. PhpStorm will warn you that the shortcut is assigned to another action. Click Remove to remove the Ctrl+S shortcut for the File Save All action.
Tutorials
IDE Helpers
Theme
Documentation
- Quick docs:
F1 - External docs:
shift + F1 - Method parameter information:
cmd + p - Search in Dash:
cmd + shift + d(requires Dash plugin)
Shortcuts
Basics
- Paste from history:
shift + cmd + v
Selection
- Expand selection:
alt + up - Multiple cursors:
alt + click(add and also remove) - Select next of kind:
ctrl + g - Select all of kind:
ctrl + cmd + g - Move selection:
alt + shift + up/alt + shift + down - Remove line:
cmd + backspace
Search
- Search everywhere:
shift + shift - Search for action:
cmd + shift + a
Refactor
- Refactor:
ctrl + t
Format
- (Re-)Format code:
alt + cmd + l

Create & Scaffold
- Duplicate line:
cmd + d - Create new file:
cmd + n(within project sidebar) - Create temporary scratch file:
cmd + shift + n - Scaffold code:
cmd + n(within object) - Initialize fields:
alt + return - Quickfix:
ctrl + return - Import class namespace:
alt + return
Structure & Navigation
- Show structure of current file:
cmd + F12 - Select recent files:
cmd + e - Jump to declaration:
cmd + b - Jump to previous caret (text cursor) position:
alt + cmd + left - Jump to next caret (text cursor) position:
alt + cmd + right - Jump to current file (Scroll from Source):
alt + F1 > 1oralt + F1 > enter - Open file:
cmd + shift + o
Debug (Xdebug required)
- Setup Xdebug: https://gist.github.com/hofmannsven/9976152
- Debug:
ctrl + d - Step into:
F7 - Step over:
F8 - Finish execution:
alt + cmd + r - Stop debug:
cmd + F2
Autocomplete for external libraries
Add the global path as external library or require it via composer.

- External library:
/Applications/MAMP/Library/bin - Composer dependency:
'phpunit/phpunit': '5.6.*'
PHP Code Sniffer
Phpstorm Mac Os Download

Install
composer global require squizlabs/php_codesniffer- Alias:
alias phpcs='/Users/username/.composer/vendor/bin/phpcs'
Phpstorm Macos Backslash
Activate
- PhpStorm: Settings » Editor » Inspections » PHP » PHP Code Sniffer validation (PSR2)
Phpstorm Mac
Configure
Phpstorm Macos Big Sur
- PhpStorm: Languages » PHP » Code Sniffer

Comments are closed.