Mac Developer Productivity Cheat Sheet

Quick Reference: This cheat sheet contains the most useful keyboard shortcuts and commands for Mac developers. For complete setup instructions including installations and configurations, see our Mac Developer Essentials.
A collection of keyboard shortcuts and commands for Mac developers.

Essential Mac Shortcuts

Common shortcuts: Cmd+Space (Spotlight/Raycast), Cmd+Tab (app switching), Cmd+Shift+. (show hidden files), and Space (Quick Look).

Finder & File Management

ShortcutActionWhen to Use
Cmd + Shift + .Show/hide hidden filesView .env, .git, config files
Cmd + Shift + GGo to folderJump to any path directly
Cmd + KConnect to serverMount network drives
Cmd + IGet infoCheck file permissions, sizes
Cmd + Option + IInspector windowLive file info as you browse
SpaceQuick Look previewPreview files without opening
Cmd + YQuick Look slideshowBrowse multiple files quickly
Cmd + DeleteMove to trashDelete files
Cmd + Shift + DeleteEmpty trashPermanently delete
Cmd + DDuplicate fileCreate copies
Cmd + Shift + NNew folderCreate directories
Cmd + Option + VMove file (after copy)Move instead of copy

System Navigation

ShortcutActionWhen to Use
Cmd + TabSwitch appsNavigate between applications
Cmd + ~Switch windowsMultiple windows in same app
Cmd + HHide current appDeclutter screen
Cmd + Option + HHide all other appsFocus on current app
Cmd + MMinimize windowSend to dock
Cmd + WClose windowClose without quitting
Cmd + QQuit applicationFully close app
Cmd + Option + EscForce quitUnresponsive apps
Cmd + SpaceSpotlight/RaycastLaunch anything
Ctrl + UpMission ControlSee all windows
Ctrl + DownApp windowsSee current app windows

Screenshots & Recording

ShortcutActionWhen to Use
Cmd + Shift + 3Full screenshotCapture entire screen
Cmd + Shift + 4Area screenshotSelect specific area
Cmd + Shift + 4 + SpaceWindow screenshotCapture specific window
Cmd + Shift + 5Screenshot menuAll capture options
Cmd + Ctrl + Shift + 3Copy screenshotTo clipboard (no file)
Cmd + Ctrl + Shift + 4Copy area screenshotTo clipboard (no file)

Text Editing (System-Wide)

ShortcutActionWhen to Use
Cmd + Left/RightBeginning/end of lineNavigate lines
Option + Left/RightJump by wordNavigate words
Cmd + Up/DownBeginning/end of documentNavigate documents
Option + DeleteDelete wordQuick word deletion
Cmd + DeleteDelete to line startClear line quickly
Fn + DeleteForward deleteDelete right
Cmd + ASelect allSelect everything
Cmd + ZUndoRevert changes
Cmd + Shift + ZRedoReapply changes

Terminal Productivity

Terminal shortcuts like Ctrl+A (beginning) and Ctrl+E (end) keep your hands on the home row, reducing hand movement.
ShortcutActionWhen to Use
Ctrl + ABeginning of lineJump to start
Ctrl + EEnd of lineJump to end
Ctrl + UClear to line startClear backwards
Ctrl + KClear to line endClear forwards
Ctrl + WDelete word backwardRemove last word
Alt + DDelete word forwardRemove next word
Ctrl + YPaste deleted textRestore deleted
Ctrl + LClear screenClean view
Ctrl + RSearch historyFind old commands
Ctrl + CKill processStop execution
Ctrl + ZSuspend processPause execution
Ctrl + DExit/EOFClose terminal

Command History

CommandActionWhen to Use
!!Repeat last commandQuick re-run
!$Last argument of previousReuse arguments
!*All arguments of previousReuse all args
!nRun command n from historyRun specific
!-nRun n commands agoRecent command
!stringRun last command starting withFind by prefix
^old^newReplace in last commandQuick fix
historyShow command historyReview commands

Directory Navigation

CommandActionWhen to Use
cd -Previous directoryToggle directories
cd ~Home directoryGo home
cd /Root directorySystem root
pushd [dir]Save and change directoryRemember location
popdReturn to saved directoryGo back
dirsShow directory stackView saved dirs

VS Code Shortcuts

Useful VS Code shortcuts: Cmd+P for Quick Open (faster than file tree navigation) and Cmd+Shift+P for the command palette.

Essential Navigation

ShortcutActionWhen to Use
Cmd + PQuick openOpen any file
Cmd + Shift + PCommand paletteRun any command
Cmd + Shift + EExplorerFile tree
Cmd + Shift + FSearch in filesGlobal search
Cmd + Shift + DDebug panelDebugging
Cmd + Shift + GSource controlGit panel
Cmd + Shift + XExtensionsManage extensions
Cmd + JToggle terminalShow/hide terminal
Cmd + BToggle sidebarMore space
Cmd + \Split editorSide by side
Cmd + 1/2/3Focus editor groupSwitch panes

Code Editing

ShortcutActionWhen to Use
Cmd + /Toggle commentComment code
Option + Shift + FFormat documentClean formatting
Cmd + DSelect next matchMulti-select
Cmd + Shift + LSelect all matchesSelect all occurrences
Cmd + Shift + KDelete lineRemove line
Option + Up/DownMove lineReorder code
Option + Shift + Up/DownCopy lineDuplicate
Cmd + EnterInsert line belowNew line
Cmd + Shift + EnterInsert line aboveNew line above
Cmd + [OutdentDecrease indent
Cmd + ]IndentIncrease indent
Cmd + Shift + [Fold regionCollapse code
Cmd + Shift + ]Unfold regionExpand code
Multi-cursor editing: Useful when making the same change in multiple places - renaming variables, adding prefixes, or formatting lists.

Multi-Cursor

ShortcutActionWhen to Use
Option + ClickAdd cursorMultiple cursors
Cmd + Option + Up/DownAdd cursor above/belowColumn selection
Cmd + UUndo cursorRemove last cursor
EscapeExit multi-cursorSingle cursor
Cmd + Shift + IInsert cursor at line endsEnd of selection

Search & Replace

ShortcutActionWhen to Use
Cmd + FFindSearch in file
Cmd + HReplaceFind and replace
Cmd + Shift + HReplace in filesGlobal replace
F3 / Shift + F3Next/Previous matchNavigate results
Alt + EnterSelect all matchesMulti-select results

Git Command Shortcuts

Git shortcuts: These aliases reduce typing. For example, gacp (add, commit, push) combines three commands into one.

Status & Information

CommandActionFull Command
gsGit statusgit status
gdGit diffgit diff
gdsDiff stagedgit diff --staged
glGit log shortgit log --oneline -10
gllGit log graphgit log --graph --all
gbGit branchesgit branch
gbaAll branchesgit branch -a

Common Operations

CommandActionFull Command
gac "msg"Add all & commitgit add . && git commit -m
gacp "msg"Add, commit & pushgit add . && git commit -m && git push
gco branchCheckoutgit checkout
gcb branchCreate & checkoutgit checkout -b
gpPullgit pull
gpuPushgit push
gstashStash changesgit stash
gpopApply stashgit stash pop

Chrome DevTools

Common DevTools shortcuts: Cmd+Option+I to open DevTools, Cmd+K to clear console, and F8-F11 for debugging.

Essential Shortcuts

ShortcutActionWhen to Use
Cmd + Option + IOpen DevToolsInspect page
Cmd + Option + JConsoleJavaScript console
Cmd + Option + CInspect elementSelect element
Cmd + Shift + CDevice modeMobile view
Cmd + ] / [Next/Previous panelNavigate panels
Cmd + KClear consoleClean console
Cmd + Shift + PCommand menuRun commands
Cmd + POpen fileSource files
Cmd + Shift + DDock positionMove DevTools
EscapeToggle drawerShow console

Debugging

ShortcutActionWhen to Use
F8ResumeContinue execution
F10Step overNext line
F11Step intoEnter function
Shift + F11Step outExit function
Cmd + \Toggle breakpointSet/remove break
Cmd + Shift + EConsole in contextEvaluate at breakpoint

Productivity Apps Shortcuts

Productivity apps extend system capabilities. Raycast enhances Spotlight functionality, HyperKey turns Caps Lock into a modifier for custom shortcuts.

Raycast (Spotlight Replacement)

CommandActionWhen to Use
Cmd + SpaceLaunch RaycastOpen launcher
Type app nameLaunch appQuick launch
kill port 3000Kill process on portStop servers
ipShow IP addressNetwork info
clipboard historyClipboard managerPaste history
switch audioAudio outputChange speakers
caffeinePrevent sleepKeep awake

HyperKey (Caps Lock Modifier)

ShortcutSuggested MappingPurpose
Hyper + SpaceVoice inputTranscription
Hyper + TTerminalOpen terminal
Hyper + CCalendarQuick calendar
Hyper + SSlackCommunication
Hyper + FFinderFile browser
Hyper + BBrowserWeb browser
Hyper + 1-9Project foldersQuick access

Quick Terminal Commands

Learn terminal commands as needed. Start with ls, cd, grep, and kill. Add others when you use them frequently.

File Operations

CommandActionExample
ls -laList all filesls -la ~/Documents
treeDirectory treetree -L 2
find . -nameFind filesfind . -name "*.js"
grep -rSearch in filesgrep -r "TODO" .
catView filecat package.json
head -nFirst n lineshead -20 file.txt
tail -nLast n linestail -20 log.txt
wc -lLine countwc -l *.js

Process Management

| Command | Action | Example | | --------------- | -------------- | --------------- | ---------- | | ps aux | List processes | ps aux | grep node | | kill -9 PID | Force kill | kill -9 12345 | | killall | Kill by name | killall node | | lsof -i :PORT | Port usage | lsof -i :3000 | | top | System monitor | top -o cpu |

Network

| Command | Action | Example | | ------------- | --------------- | --------------------- | ------------ | | ping | Test connection | ping google.com | | curl | HTTP request | curl -X GET api.com | | wget | Download file | wget file-url.com | | netstat -an | Network stats | netstat -an | grep LISTEN | | ifconfig | Network config | ifconfig en0 |

macOS Power User Tips

Mission Control Gestures

GestureActionWhen to Use
Three finger swipe upMission ControlSee all windows
Three finger swipe downApp ExposΓ©Current app windows
Three finger swipe left/rightSwitch desktopsChange spaces
Pinch with thumb + 3 fingersLaunchpadApp grid
Spread with thumb + 3 fingersShow desktopHide all windows

Quick Actions

ActionShortcutPurpose
Force ClickDeep press trackpadPreview/lookup
Two finger tapRight clickContext menu
Three finger tapLookupDictionary/preview
Four finger tapNotification CenterNotifications

The Daily Workflow

Practice shortcuts consistently for a week to build muscle memory. It may feel slower initially but becomes faster with practice.

Morning Routine

  1. Cmd + Space β†’ Launch Raycast
  2. Type app name β†’ Launch your IDE
  3. Cmd + J β†’ Open terminal in VS Code
  4. gs β†’ Check git status
  5. gp β†’ Pull latest changes

During Development

  • Cmd + P β†’ Quick file switching
  • Cmd + Shift + F β†’ Search across project
  • Cmd + D β†’ Multi-select for refactoring
  • gacp "message" β†’ Quick commits
  • Cmd + J β†’ Toggle terminal

Debugging Session

  • Cmd + Option + I β†’ Open DevTools
  • F8 β†’ Resume execution
  • F10 β†’ Step through code
  • Cmd + K β†’ Clear console
  • killport 3000 β†’ Kill stuck processes

Frequently Asked Questions

Start with 5-10 that solve your biggest pain points. Use them exclusively for a week until they’re automatic. Then add 5 more. Within a month, you’ll have 20-30 shortcuts in muscle memory - enough to transform your workflow.
Yes, but some differ slightly. MacBook keyboards lack some keys (like Page Up/Down), external keyboards may have different Function key behavior. The core Cmd/Option/Ctrl shortcuts work everywhere.
Apps can override system shortcuts. Check the app’s preferences for custom keybindings. You can often reassign shortcuts in System Settings β†’ Keyboard β†’ Shortcuts β†’ App Shortcuts.
Consider remapping Caps Lock to Escape or Control if you don’t use HyperKey. Many developers swap Control and Caps Lock for easier terminal use. Use Karabiner-Elements for complex remapping.
Most apps list shortcuts next to menu items. Press and hold Cmd in many apps to see available shortcuts. CheatSheet app shows all shortcuts for the current app when you hold Cmd.
No, but there are patterns. Cmd on Mac usually maps to Ctrl on Windows/Linux. Option maps to Alt. Some shortcuts are completely different (like screenshots). Learn the concepts, adapt the keys.
Based on usage data: Cmd+Tab (app switching), Cmd+Space (launcher), Cmd+C/V (copy/paste), Cmd+Z (undo), and Cmd+W (close). These five account for 50%+ of shortcut usage.
Yes! System Settings β†’ Keyboard β†’ Shortcuts lets you add app-specific shortcuts. Raycast and Keyboard Maestro enable system-wide custom shortcuts. BetterTouchTool adds gesture-based shortcuts.
In Terminal, Ctrl is used for terminal control (Ctrl+C to stop processes), while Cmd is used for app control (Cmd+N for new window). This split prevents conflicts between terminal and app commands.
No - use it digitally with Cmd+F to search. Better yet, create your personal cheat sheet with only the shortcuts you actually use. Keep it in Apple Notes or as a pinned tab for quick reference.

Want to set up your Mac for maximum productivity? Check our complete Mac Developer Essentials for installations, configurations, and automation scripts.