Brackets Cheat Sheet – Mac

Expand All
Collapse All

Workspace

Keyboard Shortcuts

  • Cmd++ Increase Font Size
  • Cmd+- Decrease Font Size
  • Cmd+0 Return to Default
  • Cmd+Shift+H Hide/Show the Sidebar
  • Cmd+Alt+P Live Preview
  • Cmd+Shift+C Live Preview Highlight
  • From menu Turn Line Numbers on/off
  • From menu Turn Word Wrap on/off

Notes

  • Working Files can be sorted by name, type or order added by clicking on the Gear icon
  • Or you can drag them into your own desired order.
  • Change Projects by clicking on the project name and choosing a different project
  • Set your tab/spacing preferences at the bottom right corner by clicking on Tab/Spaces and the number
  • Look at the bottom status bar for information on Linting Errors, current line/column and more

Opening Closing/Files

Keyboard Shortcuts

  • Cmd+Shift+O Quick Open
  • Cmd+W Close Current File
  • Cmd+Shift+W Close All Files
  • Cmd+O Open a File
  • Cmd+N New File
  • Cmd+Alt+R Switch Project
  • F2Rename current file

Notes

  • You can drag a file from Explorer/Finder into Brackets to open it
  • You can open files by right-clicking on them and opening in Brackets
  • Setting the default open to Brackets will depend on your operating system
  • Right-click on files/folders in sidebar to rename, delete or reveal in Explorer/Finder

Writing/Editing Code

Keyboard Shortcuts

  • Cmd+X Delete/Cut line/selection
  • Cmd+D Duplicate line/selection
  • Cmd+C Copy line/selection
  • Cmd+V Paste line/selection
  • Cmd+/ Single line comment
  • Cmd+Alt+/ Block comment
  • Cmd+Enter Add a new line after the current line
  • Cmd+Shift+Enter Add a new line before the current line

Notes

  • When using a shortcut to copy/delete/cut code, if you have a selection made, that is what will get copied or cut. If you don't have an active selection, the current line will get copied or cut.
  • You can get comments to line up with your code if you select all the text on the line and do a block comment instead of a single line comment.
  • When copying a block of code, make sure you select from the beginning of the first line to the end of the last line, instead of just the beginning and the end of text.

Cursor Placement

Mac Keyboard Shortcuts

  • Move to the left
  • Move to the right
  • Move up one line
  • Move down one line
  • Alt+→ Move to next word
  • Alt+← Move to previous word
  • Cmd+→ Move to the end of line
  • Cmd+← Move to the beginning of the line
  • Cmd+↑ Move to the beginning of file
  • Cmd+↓ Move to the end of file
  • Ctrl+Alt+↑ Scroll up
  • Ctrl+Alt+↓ Scroll down

Selecting Code

Mac Keyboard Shortcuts

  • Ctrl+L Select the current line
  • Cmd+B Select the current word
  • Cmd+A Select all the text
  • Shift+→ Select the next character
  • Shift+← Select the previous character
  • Shift+↑ Select the previous line
  • Shift+↓ Select the next line
  • Shift+Alt+→ Select next word
  • Shift+Alt+← Select previous word
  • Shift+Cmd+→ Select to the end of line
  • Shift+Cmd+← Select to the beginning of line
  • Shift+Cmd+↑ Select to the beginning of file/li>
  • Shift+Cmd+↓ Select to the end of file

Notes

  • The PC and Mac shortcuts have some more complicated differences than normal for this section, so make sure you understand how it works on your system.

Moving Code

Keyboard Shortcuts

  • Cmd+Ctrl+↑ Move current line/selection up
  • Cmd+Ctrl+↓ Move current line/selection down
  • Cmd+] Indent Right
  • Cmd+[ Indent Left
  • Tab Indent Right (when lines are selected)
  • Shift+Tab Indent Left

Quick Edit

Keyboard Shortcuts

  • Cmd+E Open/Close Quick Edit
  • Alt+↓ Go to next rule in list
  • Alt+↑ Go to previous rule in list
  • Esc Close Quick Edit
  • Cmd+N Create a New Rule

Notes

  • You can have multiple Quick Edit windows open
  • If your cursor is inside of a Quick Edit window, ESC will only close that window
  • If your cursor is in the original document, hitting ESC will close all Quick Edit windows
  • You can access the Color Picker or Transition Editor by starting Quick edit on a color or transition value while in a CSS, Sass or Less file.

Find & Replace

Keyboard Shortcuts

  • Cmd+F Find
  • Cmd+G Find Next
  • Cmd+Shift+G Find Previous
  • Cmd+Shift+F Find in Files
  • Alt+Cmd+F Replace
  • Alt+Shift+Cmd+F Replace in Files

Notes

  • The case sensitive toggle in the find screen will stay set and will be used for any find operations – even when find panel is closed
  • The "Replace" button will replace the highlighted word. The "Batch" button will allow you to first see everywhere the word is found and then pick and choose where you want to replace with the new word.
  • When finding across files in a folder or project, you can deselect an entire file or specific lines in the file for Batch replacement.

Multiple Cursors

Keyboard Shotcuts

  • Cmd+B Add next match to your selection
  • Cmd+Shift+B Skip and add next match
  • Cmd+U Undo last selection change
  • Cmd+Shift+U Redo last selection change
  • Ctrl+Cmd+G Find all and select
  • Cmd+Click Add to your selection
  • Alt+Click+Drag Select a column
  • Alt+Shift+↑ Add Cursor to Previous Line
  • Alt+Shift+↓ Add Cursor to Next Line
  • Cmd+Alt+L Split Selection Into Lines
  • Esc Switch to a Single Selection

Notes

  • Splitting your selection into lines gives you multiple cursors
  • Any editing you do will happen at each cursor position
  • Knowing how to move your cursor placement shortcuts will make this tool even more powerful

Keyboard Shortcuts

  • Cmd+E Quick Edit
  • Cmd+J Jump to Definition
  • Cmd+Shift+O Quick Open
  • Cmd+T Go to Definition
  • Cmd+L Go to Line
  • Cmd+K Quick Docs

Notes

  • The Quick Open, Find Defintion and Go to Line all use the same panel, so if you pick the wrong one, you can change your mind by typing :, @ or nothing.