Catalog / Sublime Text Cheat Sheet

Sublime Text Cheat Sheet

A comprehensive cheat sheet for Sublime Text, covering essential commands, shortcuts, and features to enhance your coding workflow.

Basic Navigation & Editing

File Operations

Ctrl+N

New File

Ctrl+O

Open File

Ctrl+S

Save File

Ctrl+Shift+S

Save File As…

Ctrl+W

Close File

Ctrl+Shift+T

Reopen Last Closed File

Basic Editing

Ctrl+X

Cut

Ctrl+C

Copy

Ctrl+V

Paste

Ctrl+Z

Undo

Ctrl+Y or Ctrl+Shift+Z

Redo

Ctrl+A

Select All

Navigation

Ctrl+G

Go to Line

Ctrl+P

Go to File

Ctrl+R

Go to Symbol

Ctrl+;

Go to Word

Alt+Left/Right

Navigate back/forward

Ctrl+Up/Down

Scroll Line Up/Down

Selection & Find/Replace

Selection

Ctrl+D

Select Word

Ctrl+Shift+Space

Select Scope

Ctrl+Shift+M

Select Inside Brackets

Ctrl+L

Select Line

Ctrl+Shift+L

Split into Lines

Alt+F3 or Ctrl+Cmd+G

Select All Matching

Find & Replace

Ctrl+F

Find

Ctrl+H

Replace

Ctrl+Shift+F

Find in Files

F3

Find Next

Shift+F3

Find Previous

Alt+Enter

Select All Occurrences

Incremental Find

Ctrl+I

Incremental Find Forward

Ctrl+Shift+I

Incremental Find Backward

Code Manipulation & Snippets

Code Folding

Ctrl+Shift+[

Fold Current Block

Ctrl+Shift+]

Unfold Current Block

Ctrl+K, Ctrl+0

Fold All

Ctrl+K, Ctrl+J

Unfold All

Ctrl+K, Ctrl+1

Fold Level 1 (Headers, etc.)

Code Manipulation

Ctrl+J

Join Lines

Ctrl+Shift+D

Duplicate Line

Ctrl+T

Transpose Line

Ctrl+Up/Down

Move Line Up/Down

Tab / Shift+Tab

Indent / Unindent Line

Snippets

Sublime Text supports code snippets for faster coding. Create custom snippets in Packages/User/. Snippets are XML files with <snippet> root element.

Snippet Example:

<snippet>
  <content><![CDATA[
for (int i = 0; i < ${1:array}.length; i++) {
  ${2://TODO}
}
]]></content>
  <tabTrigger>fori</tabTrigger>
  <description>For Loop</description>
  <scope>source.java</scope>
</snippet>

View & Configuration

View Settings

Ctrl+Shift+P

Open Command Palette

Command Palette > Set Syntax: [Language]

Change Syntax Highlighting

Command Palette > View: Toggle Side Bar

Toggle Sidebar Visibility

Command Palette > View: Toggle Minimap

Toggle Minimap Visibility

Command Palette > View: Toggle Console

Toggle Console Visibility

Configuration Files

Sublime Text settings are stored in JSON files. You can access them via Preferences > Settings.

  • Preferences.sublime-settings: Global settings.
  • Preferences (Platform).sublime-settings: Platform-specific settings (e.g., Preferences (Windows).sublime-settings).
  • Project-specific settings are stored in .sublime-project files.

Example:

{
  "theme": "ayu-dark.sublime-theme",
  "font_size": 14,
  "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme"
}

Panels

Alt+Shift+1

Single Panel Layout

Alt+Shift+2

Two Column Layout

Alt+Shift+8

Four Panel Layout

Ctrl+K, Ctrl+B

Toggle Side Bar