Fix: Alt+F4 closes the entire IDE window. It is a painful mistake. If you fat-finger this, PhpStorm will prompt you to save your work, but it is still disruptive.
The terminal emulator supports emacs-like navigation and selection, but PHPStorm adds IDE-powered extras.
| Shortcut | Action |
|----------|--------|
| Ctrl + A / Ctrl + E | Jump to beginning/end of line |
| Ctrl + U | Clear line from cursor to start |
| Ctrl + K | Clear from cursor to end |
| Shift + Arrow Keys | Select text in terminal |
| Ctrl + C / Ctrl + V | Copy/paste (within terminal) |
| Ctrl + Shift + V | Paste from clipboard history |
Deep insight: Unlike most terminals, PHPStorm allows you to copy with syntax highlighting intact. Just select and copy — HTML/ANSI codes are preserved. phpstorm terminal shortcut top
What it does: Cycles between multiple terminal tabs (if you have several open).
Scenario: You have three tabs:
Instead of clicking the tabs, use Alt+Right to move forward and Alt+Left to move backward. Fix: Alt+F4 closes the entire IDE window
What it does: Opens a new terminal session in a new tab while you are already inside the terminal.
Use case: You are watching logs in one terminal tab (tail -f storage/logs/laravel.log) but need to run a separate command without stopping the log stream. Press Ctrl+T to create a new tab, run your command, then switch back.
These are not PhpStorm-specific but work because the terminal emulator passes them to the shell. They are listed for completeness as "top" productivity boosters. Instead of clicking the tabs, use Alt+Right to
| Action | Shortcut (bash/zsh) |
|--------|----------------------|
| Clear screen | Ctrl+L |
| Interrupt process | Ctrl+C |
| Search command history | Ctrl+R |
| Move cursor word-by-word | Alt+B / Alt+F (or Esc+B / Esc+F on macOS) |
Create a PHPStorm Run Configuration, then choose “Run in terminal” instead of “Run in console”. This gives you interactive input support for CLI scripts.