A list of all sublime shortcuts with GIFs to show it in action. Using keyboard shortcuts is one of the easiest ways to improve your workflow and become a coding ninja in the process... and it makes sense.
You’re faster with keyboard shortcuts than you are with a mouse. Try them out and unlock your full potential!
Every editor comes with a ton of keyboard shortcuts that help cut down on the amount of time you spend writing code. It would be almost impossible to list all of them here, so for brevity we've highlighted the most useful commands for Sublime Text and Atom.
This page is filled with keyboard shortcut keys and example videos of how they're used. You don't need to read the entire page. Instead, use the links below to jump to specific commands.
- cut, copy, paste
- undo, redo
- duplicate
- select
- move cursor
- jump
- indent, unindent
- toggle comment
- tab management
- quick open
- find
Other editors have keyboard shortcuts too! Check out:
- Cut: ⌘ + X
- Copy: ⌘ + C
- Paste: ⌘ + V
- Cut: Ctrl + X
- Copy: Ctrl + C
- Paste: Ctrl + V
The classics! Stop typing the same thing over and over again. Use cut, copy, and paste.
- Undo: ⌘ + Z
- Redo: ⌘ + ⇧ + Z or ⌘ + Y
- Undo: Ctrl + Z
- Redo: Ctrl + ⇧ + Z or Ctrl + Y
Make a mistake? Need to redo what you just did? No problem, just use the undo and redo commands.
- ⌘ + ⇧ + D with or without text highlighted
- Ctrl + ⇧ + D with or without text highlighted
If you’ve got text highlighted, you will copy that text specifically. If you don’t have any text highlighted, you will duplicate the line your cursor is on.
- Select Word: ⌘ + D
- Select Line: ⌘ + L
- Select All: ⌘ + A
- Select Every Instance: ⌘ + Ctrl + G
- Select Word: Ctrl + D
- Select Line: Ctrl + L
- Select All: Ctrl + A
- Select Every Instance: Alt + F3
Need to select a word, line, or entire file? Use one of these commands. If you select a word and want to continue selecting the same word, keep pressing ⌘ + D (Mac) or Ctrl + D (Windows/Linux). Want to select every instance of the same word? Press ⌘ + Ctrl + G (Mac) or Alt + F3 (Windows/Linux) to select all instances of the same word.
- Move Cursor to Previous Word: Alt + ←
- Move Cursor to Next Word: Alt + →
- Move Cursor to Start of Line: ⌘ + ←
- Move Cursor to End of Line: ⌘ + →
- Move Cursor to Start of Document: ⌘ + ↑
- Move Cursor to End of Document: ⌘ + ↓
- Move Cursor to Previous Word: Ctrl + ←
- Move Cursor to Next Word: Ctrl + →
- Move Cursor to Start of Line: Home
- Move Cursor to End of Line: End
- Move Cursor to Start of Document: Ctrl + Home
- Move Cursor to End of Document: Ctrl + End
Use the move cursor commands to quickly traverse a document without using a mouse. Also, if you hold ⇧ (Shift) down while using the commands then the text within the move will be selected.
- Jump to Opening/Closing Parentheses, Brackets, Braces: Ctrl + M
- Jump to Definition: ⌘ + R
- Jump to Opening/Closing Parentheses, Brackets, Braces: Ctrl + M
- Jump to Definition: Ctrl + R
The jump commands are useful for snapping to places in code fast! Try them out.
- Indent: Tab or ⌘ + ]
- Unindent: ⇧ + Tab or ⌘ + [
- Indent: Tab or Ctrl + ]
- Unindent: ⇧ + Tab or Ctrl + [
Make your code easier to read by leveraging the indent and unindent commands.
- ⌘ + /
- Ctrl + /
Leave comments in your code with the toggle comments command. You'll thank yourself later! Also, this is great for quickly debugging.
- New Tab: ⌘ + N
- Switch Tab Left: ⌘ + ⇧ + [
- Switch Tab Right: ⌘ + ⇧ + ]
- Close Tab: ⌘ + W
- Reopen Tab: ⌘ + ⇧ + T
- New Tab: Ctrl + N
- Switch Tab Left: Ctrl + PgUp
- Switch Tab Right: Ctrl + PgDn
- Close Tab: Ctrl + W
- Reopen Tab: Ctrl + ⇧ + T
Look like a dynamo creating new tabs, swapping between tabs, and closing tabs. Check out these commands for tab management.
Also, try using these commands in your browser. They work there too! Only difference is ⌘ + N (Mac) or Ctrl + N (Windows/Linux) will open a new window in the browser and ⌘ + T (Mac) or Ctrl + T (Windows/Linux) will open a new tab.
- ⌘ + P
- Ctrl + P
Try opening a folder inside Sublime or Atom. Notice how you can see all the files in the sidebar? That's a project! Use the sidebar or the quick open command to open the file you want to work on.
- ⌘ + F
- Ctrl + F
Looking for a word in a file? Use the find command to search for it. Want to search the entire project? Add ⇧ (Shift) to the command.
For an entire list of Sublime’s or Atom’s keyboard shortcuts, visit the links below.
[source: Google Udacity Front End Developer Course]