atom keyboard hacks 2021

Atom Keyboard Shortcuts

Atom is the code editor released and maintained by the GitHub team. Released in 2014, the “Sublime Text killer” has over 1.1 million monthly users, and it’s no surprise: easily expandable, customizable and hackable, the IDE has become the favorite of many developers.

 

Despite its wide use, I often see competent developers taking a long way around to do things, or not knowing about its true potential. This post explores some tricks for improving your Atom workflow. I’m hoping that, by the time you’ve finished, you’ll have learned at least one new trick you can’t live without.

 

 

Keyboard Shortcuts

minus1. General
Ctrl+, Preferences
Ctrl+Shift+P Toggle command palette
Ctrl+B Browse list of open files
Ctrl+Alt+R Reload Atom
Ctrl+Shift+L Change synatx highlighting
Alt+Shift+S Show available code snippets
Ctrl+Shift+M Markdown preview
Ctrl+Alt+I Toggle Developer Tools

 

minus2. File Management
Ctrl+N New file
Ctrl+Shift+N New Window
Ctrl+P Open file (type the name to perform a search)
Ctrl+O Open file
Ctrl+Shift+O Open folder
Ctrl+S Save
Ctrl+Shift+S Save as
Ctrl+W Close tab
Ctrl+Shift+W Close window

 

minus3. Editing Lines
Ctrl+G Go to line
Ctrl+L Select line
Ctrl+Shift+D Duplicate line
Ctrl+Shift+K Delete line
Ctrl+Arrow Up/Arrow Down Move line up/down
Ctrl+/ Toggle comment line
Ctrl+Enter New line below
Ctrl+[/] Indent / outdent selected lines
Ctrl+J Join lines

 

minus4. Editing Words and Brackets
Alt+B/F Move to beginning / end of current word
Alt+Shift+B/F Select to beginning / end of current word
Ctrl+Backspace OR Alt+H Delete to beginning of current word
Ctrl+Delete OR Alt+D Delete to end of current word
Ctrl+Alt+. Complete bracket
Ctrl+M Go to matching bracket
Ctrl+Alt+M Select code inside matching brackets

 

minus5. Code Folding
Ctrl+k, then Ctrl+1 … 9 Fold all code at indent level 1 … 9
Ctrl+Alt+/ Fold / unfold code
Ctrl+Alt+F Fold selected code
Ctrl+Alt+[/] Fold / unfold all code

 

minus6. Find and Replace
Ctrl+F Find in current file
Ctrl+Shift+F Find in project
F3 Find next
Shift+F3 Find previous
Ctrl+Enter Replace all
Ctrl+Alt+/ Use Regex in search
Ctrl+Alt+C Match case in search
Ctrl+Alt+S Search only in selection
Ctrl+Alt+W Match whole word

 

minus7. View
Ctrl+Shift+=/ Increase / decrease text size
Ctrl+0 (zero) Reset text size
F11 Toggle fullscreen

 

minus8. Tree View
Ctrl+0 (zero) or Alt+\ Toggle focus Tree View
Ctrl+k, then b or Ctrl+\ Toggle tree view
J/K Select next/previous item
H/l OR Arrow Right/Arrow Left Expand / collapse selected directory
Alt+Arrow Left/Arrow Right OR Ctrl+Alt+[/] Recursively expand / collapse directories
Enter Open selected item
m OR F2 Move selected item
Backspace OR Delete Delete current item
D Duplicate selected item
Ctrl+1 … 9 Open selected item in pane 1 … 9
A Add new file
Shift+A Add new folder
I Toggle display of VCS ignored files

 

minus9. Github Integration
Alt+g, then b Open on Github: blame
Alt+g, then c Open on Github: copy-url
Alt+g, then g Open on Github: repository
Alt+g, then h Open on Github: history
Alt+g, then i Open on Github: issues
Alt+g, then o Open on Github: file
Alt+g, then r Open on Github: branch-compare

 

minus10. Manage Diffs
Alt+g, then d Toggle list of diffs in file
Alt+g, then Arrow Down/Arrow Up Move to next/previous diff in file