Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Sublime Text Keyboard Shortcuts: The Essential List

· 5 min read · Home Tech

In this article
  1. Why Keyboard Shortcuts Matter
  2. Essential Shortcuts for Every User
  3. Multi-Cursor Editing
  4. Customizing Shortcuts
  5. Common Problems and Fixes
  6. Comparing with Other Editors
  7. Frequently Asked Questions

Sublime Text keyboard shortcuts let you edit code faster by keeping your hands on the keyboard. This article lists the most useful shortcuts for Windows, Mac, and Linux, explains how to customize them, and answers common questions.

Why Keyboard Shortcuts Matter

Mouse use breaks your flow. Every time you reach for the mouse to select text, open a file, or run a command, you lose a few seconds. Over a day, that adds up to minutes. Over a year, hours. Keyboard shortcuts keep you in the editor, which is why power users learn them early.

Sublime Text is built around this idea. Its command palette (Ctrl+Shift+P on Windows/Linux, Cmd+Shift+P on Mac) gives you access to every command without touching the mouse. Many shortcuts are intuitive: Ctrl+S saves, Ctrl+C copies, Ctrl+V pastes. But the real power lies in multi-cursor editing, quick file navigation, and split panes.

Essential Shortcuts for Every User

These are the shortcuts you will use daily. The table below lists the most common ones. On Mac, replace Ctrl with Cmd (⌘) and Alt with Option (⌥).

  • Open file quickly: Ctrl+P (Cmd+P) opens the file switcher. Type part of the filename and press Enter.
  • Go to a line: Ctrl+G (Cmd+G) lets you jump to a specific line number.
  • Search in file: Ctrl+F finds text. Ctrl+H (Cmd+H) finds and replaces.
  • Search in all files: Ctrl+Shift+F (Cmd+Shift+F) searches across your whole project.
  • Command palette: Ctrl+Shift+P (Cmd+Shift+P) opens every command in a searchable list.
  • Toggle comment: Ctrl+/ (Cmd+/) comments or uncomments the current line or selection.
  • Duplicate line: Ctrl+Shift+D (Cmd+Shift+D) duplicates the current line.
  • Delete line: Ctrl+Shift+K (Cmd+Shift+K) deletes the current line.
  • Move line up/down: Ctrl+Shift+Up/Down (Cmd+Ctrl+Up/Down) moves the line.
  • Indent / unindent: Ctrl+] and Ctrl+[ (Cmd+] and Cmd+[) adjust indentation.

Multi-Cursor Editing

This is Sublime Text’s killer feature. You can place multiple cursors and type in several places at once. It changes how you edit repetitive code.

  • Add cursor with mouse: Hold Ctrl (Cmd on Mac) and click where you want extra cursors.
  • Add cursor above/below: Ctrl+Alt+Up/Down (Cmd+Ctrl+Up/Down) adds a cursor on the line above or below.
  • Select all occurrences: Ctrl+Shift+L (Cmd+Shift+L) splits the current selection into multiple lines, each with its own cursor.
  • Select next occurrence: Ctrl+D (Cmd+D) selects the next occurrence of the current word. Keep pressing to add more. Ctrl+Shift+D skips one.

Example: You have ten lines that all end with ; but need a comma. Place a cursor at the end of each line (using Ctrl+Shift+L after selecting all lines), then press , once.

Customizing Shortcuts

Default shortcuts are good, but you will want your own. Sublime Text lets you rebind any key.

  1. Open the menu: Preferences > Key Bindings (on Mac: Sublime Text > Preferences &em; Key Bindings).
  2. This opens two files: the default bindings (read-only) and your user bindings (empty).
  3. To add a custom binding, paste a JSON array entry like this:
    { "keys": ["ctrl+shift+y"], "command": "toggle_comment" }
  4. Save the file. The new shortcut works immediately.

You can find the exact command name by opening the console (Ctrl+`) and typing sublime.log_commands(True), then performing the action. The console will show the command name.

Common Problems and Fixes

Shortcuts sometimes don’t work. Here are the usual culprits.

  • Shortcut conflicts with OS or other software: For example, Ctrl+Alt+Up might rotate your screen on Windows. You can disable that in your graphics driver, or rebind the Sublime shortcut.
  • Shortcut not doing anything: Check if you are in a different keymap (like Vintage mode for Vim emulation). Disable it in Preferences > Settings by setting "ignored_packages": [] and removing "Vintage".
  • Mac vs Windows differences: On Mac, the Command key is used instead of Ctrl for most shortcuts. The Option key is often used instead of Alt.
  • Shortcut only works in certain contexts: Some commands are only available when editing text, not in the file tree. Check the context in the default key bindings file.

Comparing with Other Editors

Sublime Text’s shortcuts are similar to those in VS Code and Atom, because they all share a common heritage. If you switch from one to the other, you will feel at home. The main difference is that Sublime Text is lighter and faster, while VS Code has more built-in features. For keyboard-driven editing, Sublime Text’s multi-cursor and command palette are still among the best.

Frequently Asked Questions

How do I see all shortcuts? Go to Preferences > Key Bindings (or Key Bindings - Default). This opens a JSON file with every default shortcut. You can also install a package like “Keymap” to view them in a nicer format.

How do I change a shortcut? Open Preferences > Key Bindings, then add a JSON entry to the right-hand (user) file. For example, to make Ctrl+Shift+Y toggle comments, add: { "keys": ["ctrl+shift+y"], "command": "toggle_comment" }.

Why doesn’t Ctrl+D work? Ctrl+D selects the next occurrence of the current word. If it doesn’t work, you might have a selection that isn’t a word (like a space), or you might be in a different keyboard mode. Try pressing Ctrl+D again to select more occurrences.

How do I use multi-cursor effectively? Start by selecting a word, then press Ctrl+D to select the next occurrence. Keep pressing to select all. Or, use Ctrl+Shift+L to split a selection into lines. Practice on a small file with repeated code.

Are there shortcuts for formatting? Sublime Text doesn’t have a built-in “format code” shortcut, but you can install a package like “Prettier” or “Black” and bind it to a key. The default shortcut for reindent is Ctrl+Shift+I (Cmd+Shift+I on Mac) but it only reindents lines, it doesn’t fully format.

Can I use Vim keybindings? Yes. Sublime Text includes a “Vintage” mode that emulates Vim. Enable it by adding "ignored_packages": [] in your settings (it is ignored by default). Then you can use h,j,k,l to move, etc. You can also set "vintage_ctrl_keys": true to keep Ctrl shortcuts.