Keyboard Shortcuts for Developers

Developers spend their days cycling between the same handful of tools: a code editor, a terminal, a browser, GitHub, and increasingly an AI coding assistant. The shortcuts that matter most are not obscure tricks buried in documentation — they are the keystrokes that eliminate the small, repetitive friction points you hit hundreds of times per day. This page is your starting point — pick a tool above for its full cheat sheet, or scroll down for the cross-app shortcuts every developer should know.

The tables below use macOS notation (Cmd). On Windows and Linux, substitute Ctrl for Cmd and Alt for Option unless noted otherwise.

Writing and Editing Code

The biggest time savings in a code editor come from reducing how often your hands leave the keyboard to reach for the mouse. These shortcuts apply primarily to VS Code but most work across JetBrains IDEs, Sublime Text, and other modern editors.

Multi-Cursor Editing

Multi-cursor editing is one of the most powerful and underused features in modern editors. Once you build the habit, you will find yourself using it constantly for renaming variables, editing structured data, and transforming repeated patterns.

Action macOS Windows / Linux
Add cursor at click position Option + click Alt + click
Add cursor above / below Cmd + Option + Up / Down Ctrl + Alt + Up / Down
Select next occurrence of current selection Cmd + D Ctrl + D
Select all occurrences of current selection Cmd + Shift + L Ctrl + Shift + L

A practical example: you have a list of CSS class names you want to wrap in quotes. Select the first one, press Cmd + D repeatedly to add each subsequent match, then type the surrounding quotes. All instances update simultaneously.

Navigation Within a File

Scrolling through a file to find what you need is slow. Symbol-based and search-based navigation lets you jump directly to the code you care about.

Action macOS Windows / Linux
Go to line number Ctrl + G Ctrl + G
Go to symbol in file Cmd + Shift + O Ctrl + Shift + O
Go to definition F12 F12
Peek definition (inline) Option + F12 Alt + F12
Go back to previous location Ctrl + - Alt + Left
Go to file by name Cmd + P Ctrl + P

The combination of Go to Definition (F12) followed by Go Back (Ctrl + -) is essential for tracing code paths. You can drill into a function call, read the implementation, and then pop back to where you were without losing your place.

Find and Replace

Basic find-and-replace is useful, but regex mode transforms it into a refactoring tool. In VS Code, toggle regex mode with Option + Cmd + R (or Alt + R on Windows/Linux) inside the search panel.

Action macOS Windows / Linux
Find in file Cmd + F Ctrl + F
Replace in file Cmd + Option + F Ctrl + H
Find across all files Cmd + Shift + F Ctrl + Shift + F
Replace across all files Cmd + Shift + H Ctrl + Shift + H

Regex find-and-replace with capture groups handles tasks like converting foo.bar to foo['bar'] across an entire project in seconds. Search for (\w+)\.(\w+) and replace with $1['$2'].

Line Manipulation

Moving, copying, and deleting lines without selecting them first saves a surprising amount of time over the course of a day.

Action macOS Windows / Linux
Move line up / down Option + Up / Down Alt + Up / Down
Copy line up / down Shift + Option + Up / Down Shift + Alt + Up / Down
Delete entire line Cmd + Shift + K Ctrl + Shift + K
Toggle line comment Cmd + / Ctrl + /
Indent / outdent line Cmd + ] / [ Ctrl + ] / [

Working With the Integrated Terminal

Switching between your editor and an external terminal window is a common source of lost focus. The integrated terminal in VS Code keeps everything in one place, and a few shortcuts make the transition seamless.

Action macOS Windows / Linux
Toggle terminal panel Ctrl + ` Ctrl + `
Create new terminal Ctrl + Shift + ` Ctrl + Shift + `
Split terminal Cmd + \ Ctrl + Shift + 5
Focus editor from terminal Cmd + 1 Ctrl + 1

The most valuable habit here is Ctrl + ` to toggle the terminal. It lets you quickly run a command and then return to your code without any window switching.

Command Line Efficiency

Whether you use the integrated terminal or a standalone app, these shell shortcuts (for bash and zsh) dramatically speed up command entry and correction.

History Search

Retyping long commands is unnecessary. Reverse history search is the single most time-saving terminal skill most developers overlook.

Action Shortcut
Reverse search command history Ctrl + R
Search forward in history Ctrl + S
Previous command Up arrow
Run last command !!
Run last command with sudo sudo !!

Press Ctrl + R and start typing any part of a previous command. The shell will match the most recent command containing that text. Press Ctrl + R again to cycle through older matches. Press Enter to run the match or Esc to edit it first.

Word-by-Word Navigation and Editing

Navigating character-by-character through a long command is painfully slow. These readline shortcuts let you jump and delete by word or jump to the start and end of a line instantly.

Action Shortcut
Move to beginning of line Ctrl + A
Move to end of line Ctrl + E
Move back one word Option + B (or Alt + B)
Move forward one word Option + F (or Alt + F)
Delete word before cursor Ctrl + W
Delete from cursor to end of line Ctrl + K
Paste last killed text Ctrl + Y
Clear screen Ctrl + L

Process Control

When a command is running longer than expected, or you need to manage background tasks, these are the signals you need.

Action Shortcut
Cancel current command Ctrl + C
Suspend current process (background it) Ctrl + Z
Resume suspended process in foreground fg
Resume suspended process in background bg
Send EOF / close shell Ctrl + D

A common workflow: you are editing a file in vim or nano and realize you need to run a command. Press Ctrl + Z to suspend the editor, run your command, then type fg to pick up exactly where you left off.

Debugging in Browser DevTools

Front-end developers spend significant time in browser DevTools. These shortcuts work across Chrome, Firefox, and Edge and eliminate the need to navigate menus to reach the tools you use most.

Opening DevTools Panels

Action macOS Windows / Linux
Open DevTools (last used panel) Cmd + Option + I F12 or Ctrl + Shift + I
Open DevTools to Console Cmd + Option + J Ctrl + Shift + J
Inspect element (pick mode) Cmd + Shift + C Ctrl + Shift + C
Toggle responsive design mode Cmd + Shift + M Ctrl + Shift + M

Working Inside DevTools

Once DevTools is open, these shortcuts help you move between panels and find what you need quickly.

Action Shortcut
Switch between DevTools panels Cmd + [ / ] (macOS) or Ctrl + [ / ]
Open command menu (run DevTools commands) Cmd + Shift + P (macOS) or Ctrl + Shift + P
Search across all loaded sources Cmd + Option + F (macOS) or Ctrl + Shift + F
Open file in Sources panel Cmd + P (macOS) or Ctrl + P
Clear console Cmd + K (macOS) or Ctrl + L

The DevTools command menu (Cmd + Shift + P) is the fastest way to do almost anything in DevTools. You can type commands like "disable JavaScript," "capture screenshot," or "show network conditions" without hunting through menus.

Debugging Shortcuts

Action Shortcut
Step over next function call F10
Step into function call F11
Step out of current function Shift + F11
Resume script execution F8
Toggle breakpoint on current line Cmd + B (macOS) or Ctrl + B

Git Workflows

Version control is part of every developer's daily routine. Speeding up Git operations, whether through your editor or the terminal, reduces context switching and keeps you focused.

Git in VS Code

VS Code has deep Git integration. The Source Control panel and inline diff views are fully keyboard-accessible.

Action macOS Windows / Linux
Open Source Control panel Ctrl + Shift + G Ctrl + Shift + G
Open Command Palette (for Git commands) Cmd + Shift + P Ctrl + Shift + P
Toggle inline diff view Cmd + Shift + P then type "inline diff" Ctrl + Shift + P then type "inline diff"

From the Command Palette, you can type "git" to see all available Git commands: commit, push, pull, checkout, create branch, stash, and more. This is often faster than typing the equivalent terminal commands, especially for operations like interactive staging.

Terminal Git Aliases

If you prefer Git on the command line, shell aliases for common operations save hundreds of keystrokes per day. Add these to your .bashrc, .zshrc, or Git config:

  • alias gs='git status' -- the command you run most often
  • alias ga='git add'
  • alias gc='git commit'
  • alias gp='git push'
  • alias gl='git log --oneline --graph' -- compact visual history
  • alias gd='git diff'
  • alias gco='git checkout'
  • alias gb='git branch'

You can also set these as Git-native aliases in your ~/.gitconfig under the [alias] section. For example, co = checkout lets you type git co main instead of git checkout main.

General Productivity

Beyond code-specific tools, system-level shortcuts for managing windows and switching context have a compounding effect on your daily productivity.

Window and App Management

Action macOS Windows
Switch between apps Cmd + Tab Alt + Tab
Switch between windows of same app Cmd + ` N/A (use Alt + Tab)
Snap window to left half Ctrl + Option + Left (with Rectangle app) Win + Left
Snap window to right half Ctrl + Option + Right (with Rectangle app) Win + Right
Maximize window Ctrl + Option + Enter (with Rectangle app) Win + Up
Show all windows (Expose / Task View) Ctrl + Up or F3 Win + Tab
Spotlight / system search Cmd + Space Win + S

On macOS, window snapping requires a third-party tool like Rectangle (free) since the OS does not provide keyboard shortcuts for this by default. Window management is one of the highest-impact productivity improvements for developers who work with multiple monitors or frequently compare files side by side.

Clipboard History

Standard copy-paste limits you to one item at a time. A clipboard manager lets you access everything you have copied recently, which is invaluable when moving data between multiple sources.

Action macOS Windows
Open clipboard history Depends on tool (e.g., Cmd + Shift + V in Alfred/Raycast) Win + V

Windows has clipboard history built in (enable it in Settings under System, then Clipboard). On macOS, tools like Raycast, Alfred, or Maccy provide this functionality. Once you start using clipboard history, copying multiple values from one source and pasting them sequentially into another becomes effortless.

Tab and Browser Navigation

Developers typically have many browser tabs open. These shortcuts work across all major browsers.

Action macOS Windows / Linux
New tab Cmd + T Ctrl + T
Close current tab Cmd + W Ctrl + W
Reopen last closed tab Cmd + Shift + T Ctrl + Shift + T
Switch to tab by position Cmd + 1 through 8 Ctrl + 1 through 8
Switch to last tab Cmd + 9 Ctrl + 9
Focus address bar Cmd + L Ctrl + L
Hard refresh (bypass cache) Cmd + Shift + R Ctrl + Shift + R

AI Coding Assistants

AI coding tools have become a core part of the developer toolkit. Each has its own keyboard model — inline edits in Cursor, autocomplete in Copilot, plan mode in Claude Code — and the shortcuts below are the ones you will touch dozens of times a day once you build the muscle memory.

Cursor (AI-Native Editor)

ActionShortcut
Open inline edit (rewrite selection)Cmd + K
Open the AI chat sidebarCmd + L
Open Composer (multi-file edits)Cmd + I
Accept current AI suggestionTab
Accept the next word onlyCmd + Right
Reject suggestionEsc
Reference a file in chat or composer@ then type filename

GitHub Copilot (in VS Code)

ActionShortcut
Accept full suggestionTab
Accept next wordCmd + Right
Dismiss suggestionEsc
Show next / previous suggestionOption + ] / [
Open Copilot inline chatCmd + I
Open Copilot Chat sidebarCtrl + Cmd + I
Open Copilot suggestions panelCmd + Enter (in inline chat)

Claude Code (Terminal CLI)

ActionInput
Toggle plan mode (propose before acting)Shift + Tab
Cancel the current requestEsc
Reference a file in your message@ then type path
Run a shell command inline (bash mode)! then command
Add a note to memory# then your note
Compact conversation to free up context/compact
Resume your last sessionclaude --continue

The patterns are converging across tools: Tab to accept, Esc to dismiss, @ to reference files, and a chat-style sidebar opened with a single chord. Learning one tool fluently transfers most of the muscle memory to the others — see VS Code vs. Cursor for a deeper comparison of the two most-used editors.

Building the Habit

Learning shortcuts is not about memorizing a massive list. The most effective approach is to pick two or three shortcuts that target your most frequent pain points and force yourself to use them for a week. Once they become muscle memory, add a few more.

Start with these five if you do not use them already:

  1. Cmd + P to open files by name in your editor, instead of clicking through the file tree
  2. Cmd + D for multi-cursor selection when editing repeated patterns
  3. Ctrl + ` to toggle the integrated terminal without leaving your editor
  4. Ctrl + R in the terminal to search command history instead of retyping
  5. Tab to accept AI suggestions in Cursor or Copilot — and Esc to dismiss them quickly when they are wrong

Each of these addresses a moment where developers commonly break their flow. Eliminating those interruptions, even if each one only saves a few seconds, adds up to a meaningfully faster and less frustrating workday.