Useful Shortcuts in PhpStorm

Today, I have prepared a list of very useful shortcuts in PhpStorm that significantly enhance coding speed and are frequently used.

PhpStorm is a highly powerful IDE for the PHP language, capable of identifying syntax and runtime errors, as well as optimization issues. It provides outstanding and diverse features that make it unique.

Essential Shortcuts in PhpStorm:

  • Ctrl + D: Duplicate the current line
  • Ctrl + C: Copy the active line (without needing to select it)
  • Ctrl + Alt + L: Reformat the selected code
  • Ctrl + Alt + J: Apply a template to the selected code (e.g., wrapping text inside a specific tag)
  • Ctrl + /: Toggle comments for a single line
  • Ctrl + Shift + /: Toggle comments for multiple selected lines
  • Ctrl + W: Select tag content (repeatedly pressing selects parent content)
  • Ctrl + Q: Show documentation for the selected section
  • Ctrl + P: Display function parameters
  • Ctrl + Shift + V: Show the last five copied texts (stored in clipboard history)
  • Shift + Enter: Create a new line without breaking the current one
  • Ctrl + Space: This one needs no explanation…!
  • Alt + Enter: Show PhpStorm’s suggestions for a piece of code
  • F5: Copy the currently open file
  • Ctrl + E: Show recently opened files and management tabs
  • Ctrl + .: Collapse a block of code
  • Alt + J: Select similar code elements (e.g., nearby similar tags)
  • Alt + Mouse Click: Select multiple cursor positions
  • Tab: Emmet support
  • Alt + 1: Show project files
  • Alt + 7: Show file structure in the panel
  • Ctrl + F12: Show file structure in a popup
  • Hold Alt + Alt: Show management tabs
  • Alt + ←: Move to the previously opened file
  • Alt + →: Move to the next opened file
  • Alt + ↓: Move downward through tags and sections
  • Alt + ↑: Move upward through tags and sections

General Text Editing Shortcuts (Common in Windows Applications):

  • Ctrl + ←: Move one word to the left
  • Ctrl + →: Move one word to the right
  • Ctrl + Shift + ←: Move and select one word to the left
  • Ctrl + Shift + →: Move and select one word to the right

Leave a Reply

Your email address will not be published. Required fields are marked *