DEV Community

Chan
Chan

Posted on

Hot Keys on Mac

Since I switched over to Mac, Hot keys(Shortcut keys) are confusing and easy to forget. To stop making mistakes, here I wrote a list of frequently used combinations of keys.

Visual Studio Code

Integrated Terminal

  • Command + `: Toggle the integrated terminal
  • Control + Shift + `: Create a new terminal instance
  • Command + Backspace: Kill terminal instance

Run commands

  • Command + P: Go to File
  • Command + Shift + P: Open the Command Palette

Tabs

  • Command + T: Create a new tab
  • Command + W: Close tab

Search

  • Command + F: Find in the current file
  • Command + Shift + F: Replace in files
  • Command + Option + Enter: Replace all occurrences with the given expression across all files
  • Command + D: select the next occurrence

Change occurrences

  • Command + Shift + L: Change all occurrences in a file
  • Command + Shift + H: Change all occurrences in all files

Move the cursor

  • Option + Left Arrow: Move the cursor to the previous word
  • Option + Right Arrow: Move the cursor to the next word
  • Command + Left Arrow: Move the cursor to the beginning of the line
  • Command + Right Arrow: Move the cursor to the end of the line

Terminal

  • Command + K: Clear Terminal

Rectangle

  • Control + Option + Left Arrow: Move the current window to the left half
  • Control + Option + Right Arrow: Snap the current window to the right half

System

  • Control + Command + F: Toggle full-screen mode
  • Control + Left Arrow: Move to the full-screen app on the left side
  • Control + Right Arrow: Move to the full-screen ap on the right side

ChatGPT

  • Option + Space: Toggles chatting bar
  • Command + Space: Spotlight Search

Chrome

  • Option + Command + I: Toggle Devtools
  • Command + R: Refresh the page(normal refresh)
  • Command + Shift + R: Refresh the page(hard refresh) - The key clears the browser cache.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more