Instantly share code, notes, and snippets.

Embed
What would you like to do?
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
  • ↓ : Down arrow key
  • ⌥ : Option or Alt key
  • ↩ : Return or Enter key
  • ⇧ : Shift key

Contents

The Command Palette

Task Keystrokes
Open Command Palette ⌘-⇧-p

Configuration

| Task | Keystrokes | | --------| --------- | | **Open Configuration Editor** | ⌘-, |

Application Tasks

Task Keystrokes
Hide Application ⌘-h
Hide Other Applications ⌥-⌘-h
Minimize Application ⌘-m
New File ⌘-n
New Window ⌘-⇧-n
Open Application ⌘-o
Open Dev ⇧-⌘-o
Quit ⌘-q

Autocomplete

Task Keystrokes
Toggle Autocomplete ⌃-space

Bookmarks

Task Keystrokes
Toggle Bookmark ⌘-F2
View All Bookmarks ⌃-F2
Jump to Next Bookmark F2
Jump to Previous Bookmark ⇧-F2
Clear All Bookmarks ⌘-⇧-F2

Brackets

Task Keystrokes
Find Matching Bracket ⌃-m

Code Folding

Task Keystrokes
Fold Code ⌥-⌘-[
Unfold Code ⌥-⌘-]
Fold at Indentation Level (N) ⌘-k cmd-N
Fold Selected Text ⌥-⌘-⌃-f
Unfold All Code ⌥-⌘-}

Code Navigation & Management

Task Keystrokes
Cut to End of Line ⌃-k
Delete to Beginning of Word ⌥-⌫
Delete to End of Word ⌥-d
Delete Line ⌃-⇧-k
Duplicate Line ⌘-⇧-d
Go to Line ⌃-g
Go to Matching Bracket ⌃-m
Indent Selected Text ⌘-]
Outdent Selected Text ⌘-[
Join Lines ⌘-j
Move to Beginning of Word ⌥-b
Move to End of Word ⌥-f
Move to Beginning of Line ⌃-a
Move to End of Line ⌃-e
Move Line Up ⌘-⌃-↑
Move Line Down ⌘-⌃-↓
Move to Top of File ⌘-↑
Move to Bottom of File ⌘-↓
Move to First Character of Line ⌘-←
Move to Last Character of Line ⌘-→
Select Left Character ⌘-⌃-b
Select Right Character ⌘-⌃-f
Select to Beginning of Word ⌥-⇧-b
Select to End of Word ⌥-⇧-f
Select Entire Word ⌃-⇧-w
Select to First Character of Line ⌥-⇧-a
Select to Last Character of Line ⌥-⇧-e
Select to Same Position, Next Line ⌥-⇧-n
Select to Same Position, Previous Line ⌥-⇧-p
Select to Top of File ⌘-⇧-↑
Select to Bottom of File ⌘-⇧-↓
Select All ⌘-a
Select Next ⌘-d
Select Line ⌘-L
Toggle Line Comments ⌘-/

Character Transformations

Task Keystrokes
Convert Tabs to Spaces ⌥-⌘-[
Convert Spaces to Tabs ⌥-⌘-]
Convert to Upper Case ⌘-k-u
Convert to Lower Case ⌘-k-L

Comments

| Task | Keystrokes | | --------| --------- | | **Toggle Comment** | ⌘-/ |

Editor View Tasks

| Task | Keystrokes | | --------| --------- | | **Split Panes Vertically** | ⌘-k-↓ | | **Split Panes Horizontally** | ⌘-k-→ | | **Vertical Navigation Panes** | ⌘-k ⌘-↓ | | **Horizontal Navigation Panes** | ⌘-k ⌘-→ | | **Toggle Full Screen** | ⌃-⌘-f | | **Toggle Tree View** | ⌘-\ |

File Tasks

Task Keystrokes
Fuzzy Find Files ⌘-t
Find Open File ⌘-b
Find Modified, Untracked (git) File ⌘-⇧-b
Open Tree View ⌃-0
Toggle Tree View ⌘-\
Add a File a
Move a File m
Delete a File
Reopen Last File ⌘-⇧-t

Find & Replace

| Task | Keystrokes | | --------| --------- | | **Find String in Current File** | ⌘-f | | **Find String in All Project Files** | ⇧-⌘-f | | **Find Next Matching String** | ⌘-g | | **Find Previous Matching String** | ⇧-⌘-g | | **Select Next Matching String** | ⌘-d | | **Select All Matching Strings** | ⌃-⌘-g | | **Replace String in Current File** | ⌥-⌘-f |

Font Tasks

Task Keystrokes
Increase Font Size cmd-+
Decrease Font Size cmd--

Grammar

Task Keystrokes
Select Grammar ⌃-⇧-L
Task Keystrokes
Search for Symbol ⌘-r
Search for Symbol Across Project ⌘-⇧-r
@kentcdodds

This comment has been minimized.

kentcdodds commented Apr 5, 2016

Use cmd-shift-\ to reveal the current file in the Tree View 👍

@feixionglee

This comment has been minimized.

feixionglee commented Apr 20, 2016

@kentcdodds that's cool 👍

@vanesa

This comment has been minimized.

vanesa commented May 25, 2016

Very nice, thank you!

@Wellenfunktion37

This comment has been minimized.

Wellenfunktion37 commented Jun 6, 2016

perfect! thank you! 👍

@thekemkid

This comment has been minimized.

thekemkid commented Jun 8, 2016

Nice 👍 It would be cool to see Tabs shortcuts added :)

@jnuc093

This comment has been minimized.

jnuc093 commented Jun 11, 2016

cmd-shift-\ perfect

@iPotaje

This comment has been minimized.

iPotaje commented Jul 1, 2016

Multiple selections:
⌘-k ⌘-d Ignore current selection
⌘-u Go to last selection

Thanks!

@tpizzle

This comment has been minimized.

tpizzle commented Jul 6, 2016

thank you @kentcdodds exactly what I was looking for!

@Dispader

This comment has been minimized.

Dispader commented Jul 26, 2016

@chrissimpkins Thank you so much for this Gist!

@tommygebru

This comment has been minimized.

tommygebru commented Jul 29, 2016

How to toggle the find&replace???

@Nolwennig

This comment has been minimized.

Nolwennig commented Aug 3, 2016

@chrissimpkins 👍 Thank you !
@tommygebru Have you try to close this panel with esc key ?

@akmur

This comment has been minimized.

akmur commented Aug 10, 2016

⌘-Shift-[
and
⌘-Shift-]

To switch to previous and next tab

@fwuensche

This comment has been minimized.

fwuensche commented Sep 20, 2016

⌘-Option-leftarrow
and
⌘-Option-rightarrow

To switch to previous and next tab 👍

@HeatfanJohn

This comment has been minimized.

HeatfanJohn commented Oct 23, 2016

Thank you @Nolwennig the esc key closes the Find & Replace panel.

@watashiSHUN

This comment has been minimized.

watashiSHUN commented Nov 5, 2016

Move to Beginning of Line ⌃-a

isn't control a == select all? How can I move to the beginning of the line in atom?

@kingarawana

This comment has been minimized.

kingarawana commented Dec 12, 2016

Is there a short cut for going back to the last open tab, and then forward to the tab I was at. I believe Intellij and Eclipse has this feature.

And just to clarify, I don't mean to cycle trough the open tabs in order. I want to cycle through tabs according to the order I used them.

Thanks!

@jeongsd

This comment has been minimized.

jeongsd commented Dec 19, 2016

thank you!

@Sande3p

This comment has been minimized.

Sande3p commented Dec 19, 2016

Is there a sortcut for basic math calculations. Let's say type & select 2+5 then press the calculate shortcut to get the result 5.

@RuNpiXelruN

This comment has been minimized.

RuNpiXelruN commented Dec 20, 2016

Any way to search for a string or sentence in project?

@w-barath

This comment has been minimized.

w-barath commented Feb 24, 2017

Fries with that?

How about you change the title of this Gist to "Atom Editor Cheat Sheet - McOS only (Sweetmeat)"

@lordKnighton

This comment has been minimized.

lordKnighton commented Mar 1, 2017

Thank you 👻

@alexdodduk

This comment has been minimized.

alexdodduk commented Mar 9, 2017

@Sande3p yeah your Mac will do that when you press ⌘ + space

@JCWDFCS

This comment has been minimized.

JCWDFCS commented Apr 22, 2017

Thank you.

@fdfandrade

This comment has been minimized.

fdfandrade commented May 13, 2017

Hi!

For some reason I changed the vertical width of my file view with Alt+Cmd+-
Anyone know how to revert this?!

@brianbier

This comment has been minimized.

brianbier commented May 22, 2017

Wrap text inside a type of html element ⌃-w

@stevepentler

This comment has been minimized.

stevepentler commented Jun 14, 2017

Thanks 👍

@PhilippePerret

This comment has been minimized.

PhilippePerret commented Jun 19, 2017

⇧ + a

=> add a folder

@antonydb

This comment has been minimized.

antonydb commented Aug 10, 2017

⌃-⇧-→ Move current tab to the right in tab bar
⌃-⇧-← Move current tab to the left in tab bar

@mariozugaj

This comment has been minimized.

mariozugaj commented Aug 11, 2017

@fdfandrade ⌥-⌘-=

@TomonariShinozawa

This comment has been minimized.

TomonariShinozawa commented Sep 1, 2017

@chanjman
Thanks 👍

@bhrd

This comment has been minimized.

bhrd commented Nov 6, 2017

Thank you!! 👍

@Rajavn6789

This comment has been minimized.

Rajavn6789 commented Nov 28, 2017

Thanks a heap

@danedavid

This comment has been minimized.

danedavid commented Dec 5, 2017

anything similar to this for Linux users ?

@Skeeve

This comment has been minimized.

Skeeve commented Feb 3, 2018

And now for foreign keyboards (like german) please…

For example:

⌥-⌘-[ will not fold code but outdent the current line, because for "[" I have to press ⌥-5 I would have to press ⌥-⌘-⌥-5 - which doesn't work ;)

@Juan-cc

This comment has been minimized.

Juan-cc commented Feb 6, 2018

Hi, does anybody know what's the editor.function() to move 1 char to the right? Thanks!!

@a1exlism

This comment has been minimized.

a1exlism commented Mar 11, 2018

Table list in markdown Typography Corrected version: fork-correct-version

@prncevince

This comment has been minimized.

prncevince commented Mar 27, 2018

This rocks !!!

@xpe

This comment has been minimized.

xpe commented Nov 21, 2018

@chrissimpkins Thanks; you might also consider merging changes from @a1exlism (two comments above):
https://gist.github.com/a1exlism/b2c5964db6b04927e3e6ede68f9713c4

@xpe

This comment has been minimized.

xpe commented Nov 21, 2018

Request: I'm looking for a quick keyboard shortcut to move up/down through a project file list while showing that file in the editor window.

Sublime Text makes this easy, but I haven't figured out if it is possible in Atom. I use the arrow keys to visually compare adjacent files in a directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment