PhpStorm is a leading IDE for PHP developers, offering powerful tools and an intuitive interface to streamline coding workflows. Mastering shortcut keys in PhpStorm can significantly boost your productivity and reduce reliance on the mouse.
PhpStorm Windows Shortcut Keys
Editing
Shortcut
Action
CtrlSpace
Basic code completion
AltEnter
Show intention actions and quick-fixes
CtrlP
Parameter info (within method call arguments)
CtrlQ
Quick documentation lookup
Ctrl(mouse over code)
Brief Info
AltInsert
Generate code... (Getters, Setters, Constructors)
CtrlO
Override methods
CtrlI
Implement methods
CtrlAltT
Surround with...(if..else, try..catch, for, etc.)
Ctrl/
Comment/uncomment with line comment
CtrlShift/
Comment/uncomment with block comment
CtrlW
Select successively increasing code blocks
CtrlShiftW
Decrease current selection to previous state
CtrlAltL
Reformat code
CtrlAltI
Auto-indent line(s)
CtrlD
Duplicate current line or selected block
CtrlY
Delete line at caret
CtrlShiftJ
Smart line join (HTML and JavaScript only)
CtrlEnter
Smart line split (HTML and JavaScript only)
ShiftEnter
Start a new line
CtrlShiftU
Toggle case for word at caret or selected block
CtrlShift[
Select till code block start
CtrlShift]
Select till code block end
CtrlDelete
Delete to word end
CtrlBackspace
Delete to word start
Ctrl+/-
Expand/collapse code block
CtrlF4
Close active editor tab
CtrlShiftV
Paste from history
Debugging
Shortcut
Action
F8
Step over
F7
Step into
ShiftF8
Step out
AltF8
Evaluate expression
F9
Resume program
CtrlF8
Toggle breakpoint
CtrlShiftF8
View breakpoints
Running
Shortcut
Action
ShiftF10
Run
ShiftF9
Debug
CtrlShiftF10
Run context configuration from editor
CtrlShiftX
Run command line
Search/Replace
Shortcut
Action
CtrlF/R
Find/Replace
F3
Find next
ShiftF3
Find previous
CtrlShiftF/R
Find/Replace in path
Usage Search
Shortcut
Action
AltF7
Find usages
CtrlF7
Find usages in file
CtrlShiftF7
Highlight usages in file
CtrlAltF7
Show usages
Navigation
Shortcut
Action
CtrlN
Go to class
CtrlShiftN
Go to file
CtrlShiftAltN
Go to symbol
CtrlG
Go to line
AltLeft/Right
Go to next/previous editor tab
Esc
Go to editor (from tool window)
CtrlE
Recent files popup
CtrlAltLeft/Right
Navigate back/forward
CtrlShiftBackspace
Navigate to last edit location
AltF1
Select current file or symbol in any view
CtrlB
Go to declaration
CtrlAltB
Go to implementation(s)
CtrlShiftI
Open quick definition lookup
CtrlShiftB
Go to type declaration
CtrlU
Go to super-method/super-class
AltUp/Down
Go to previous/next method
Ctrl]/[
Move to code block end/start
F2
Next highlighted error
ShiftF2
Previous highlighted error
F4
Edit/view source
Refactoring
Shortcut
Action
F5/F6
Copy/Move
AltDelete
Safe delete
ShiftF6
Rename
CtrlAltN
Inline variable
CtrlAltM/V/F/C
Extract Method/Variable/Field/Constant
CtrlAltShiftT
Refactor This (shows all available refactorings)
VCS/Local History
Shortcut
Action
Alt`
VCS quick popup
CtrlK
Commit project to VCS
CtrlT
Update project from VCS
AltShiftC
View recent changes
General
Shortcut
Action
Shift x2
Search everywhere
CtrlShiftA
Find Action
Alt1-9
Open corresponding tool window
CtrlAltF11
Toggle full screen mode
CtrlShiftF12
Toggle maximizing editor
AltShiftF
Add to Favorites
AltShiftI
Inspect current file with current profile
CtrlAltS
Open Settings dialog
CtrlTab
Switch between tabs and tool window
Live Templates/Snippets
Shortcut
Action
CtrlJ
Insert Live Template
eco
'echo' statement
fore
foreach(iterable_expr as $value) {...}
forek
foreach(iterable_expr as $key => $value) {...}
inc/inco
'include'/'include_once' statement
prif
private function
prof
protected function
pubf
public function
rqr/rqro
'require'/'require_once' statement
Misc
Shortcut
Action
CtrlShiftA
Find Action
PhpStorm MacOS Shortcut Keys
General Navigation
Shortcut Key
Description
Command+E
View recent files
Command+Shift+E
View recently edited files
Control+Left / Control+Right
Navigate between tabs
Command+O
Navigate to class
Command+Shift+O
Navigate to file
Command+Shift+T
Navigate to test
Command+F12
Show file structure
Command+1 to Command+9
Switch between tool windows
Command+Shift+A
Find an action or setting
Command+[, Command+]
Navigate to the previous/next location
Editing
Shortcut Key
Description
Command+D
Duplicate the current line or selection
Command+Delete
Delete the current line
Command+Shift+U
Toggle case of selected text
Option+Command+L
Reformat code
Command+/
Comment/uncomment current line
Option+Command+/
Block comment/uncomment
Command+Shift+V
Paste from clipboard history
Command+Shift+Enter
Complete current statement
Command+Option+T
Surround with code construct
Option+Delete
Delete to word start
Command+Option+Shift+J
Select all occurrences
Search and Replace
Shortcut Key
Description
Command+F
Search in file
Command+R
Replace in file
Command+Shift+F
Search in project
Command+Shift+R
Replace in project
Command+Option+F
Find next occurrence
Command+Option+G
Highlight usages in the file
Debugging
Shortcut Key
Description
Command+Shift+D
Debug
Command+Shift+F9
Debug with coverage
F8
Step over
F7
Step into
Shift+F8
Step out
Option+F9
Run to cursor
Option+Command+F8
Toggle breakpoint
Command+Option+R
Resume program
Refactoring
Shortcut Key
Description
Command+Shift+R
Rename
Command+Option+N
Inline
Command+Option+V
Extract variable
Command+Option+M
Extract method
Command+Option+C
Extract constant
Command+Option+F
Extract field
Command+Option+P
Extract parameter
Command+Option+T
Refactor this
Code Assistance
Shortcut Key
Description
Command+Space
Code completion
Command+Shift+Space
Smart code completion
Command+Option+Space
Class name completion
Command+P
Parameter info
Option+Command+T
Generate code
Option+Command+L
Show documentation
Version Control
Shortcut Key
Description
Command+K
Commit changes
Command+T
Update project
Command+Shift+K
Push changes
Command+9
Open Version Control tool window
Command+Shift+U
Toggle case of changes
Other Useful Shortcuts
Shortcut Key
Description
Command+Shift+N
Open file by name
Command+Option+S
Open settings
Command+Shift+H
Search in files
Command+Option+G
Generate classes
Control+Option+I
Inspect code
Command+Shift+Q
Quit PhpStorm
About PhpStorm
PhpStorm is developed by JetBrains and provides a comprehensive development environment for PHP. Its features include intelligent coding assistance, debugging tools, and seamless integration with frameworks and tools.
How do I customize shortcut keys in PhpStorm?
Go to File > Settings > Keymap (Windows) or PhpStorm > Preferences > Keymap (MacOS).
Can I export my custom keymap?
Yes, export it from the Keymap settings by saving it as an XML file.
What is the most useful shortcut for debugging?
Use Shift+F9 to start debugging and F8 to step over.
How can I reset shortcut keys to default?
In the Keymap settings, select "Reset to Default" to revert customizations.
Are there predefined keymaps for other IDEs?
Yes, PhpStorm includes keymaps for IntelliJ IDEA, Eclipse, and Visual Studio.
How do I view all available shortcuts?
Press Ctrl+Shift+A (Windows) or Command+Shift+A (MacOS) and search for "Keymap."
Conclusion
Mastering PhpStorm shortcuts can greatly enhance your efficiency as a developer. Experiment with these keys, and refer to the official documentation to further explore their potential.
Discussion
New Comments
No comments yet. Be the first one!