Skip to content

Latest commit

 

History

History
568 lines (454 loc) · 36 KB

atom_cheatsheet.md

File metadata and controls

568 lines (454 loc) · 36 KB

Atom Cheat-sheet (Linux version).

Creative Commons License
Atom Cheatsheet by Paul Dunne is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

I created this as a printable version of Jesse Kasky's excellent atom-keybinding-cheatsheet Github Key Binding Cheatsheet Package. As I go I'm expanding it with my own notes.

Cheat-sheet Source Code: https://github.com/pd-gmit/atom-cheatsheet.git

Atom concept notes

starting atom

  • You can start Atom from the command line (and it will start and open all the files in that folder). The files will be visible in the "folder view" in the file view panel.

folders and files

  • When Atom starts you can toggle the "file/folder view pane" by pressing the Ctrl and \ simultaneously. This shortcut is often simply written in the documentation as Ctrl-\

  • Alternatively you can display a list of files (in the folder in question) by typing Ctrl t. This cause a drop-down menu to appear. Simply select the file you require from the drop-down selection panel to open it in the editor.

  • Each folder you open in Atom starts a new instance of Atom. This new instance will display the folder contents in a new "tree view" in that Atom instance.

shortcut keys

  • A full listing of "shortcut keys" are listed in this cheat sheet. Please note that the Shift key is often labeled on the keyboard as

user settings

  • General Atom settings can be seen by typing the Ctrl , combination. "Keybindings" is one of the options available. It shows the mapping between keys combinations and the action they perform. Settings

  • Packages shows the currently installed packages (including ones that the user has installed themselves).

  • Themes show the installed themes - more can be added by the user.

  • Install is a useful option here. It lets you search for (add-on) packages that are available from the community. This includes "markdown-toc", which will insert a table of contents in your markdown etc.

the command palette

  • The "Command Pallet" is a useful drop-down dialog that lists Atom commands. You can run any "command" by selecting it in the drop down menu. To see the commands (and key bindings) that are relevant to the currently focused GUI interface element press Ctrl Shift p

editor pane

  • When you're in an editor "pane" you can create a new file by selecting the menu item File|New File or else type Ctrl n and a new tab will be created in that pane for your new file.
  • A "pane" can contain multiple tabs.
  • You can show "Whitespace" in the editor by going to FILE > SETTINGS [RHS PANE] select/tick SHOW INVISIBLES.
  • The "Command Pallet" dialog gives you commands "to split a pane in two" and more. Press Ctrl Shift p simultaneously and then type "pane" in the dialog to get a list of pane related commands.
  • A useful plugin for working with panes is the "resize-panes" package. Unfortunately it doesn't work initially (it has Mac key bindings). Its fixable by editing the configuration file~/.atom/packages/resize-panes/keymaps/resize-panes.cson and appending the following to the file.
 .platform-win32, .platform-linux':
 'ctrl-alt-=': 'resize-panes:enlarge-active-pane'
 'ctrl-alt--': 'resize-panes:shrink-active-pane'

Panes and Tabs

editing files

  • You can correct spellings by selecting the misspelled word and pressing the Ctrl : keys. Choose the correct spelling from the pop up dialog that appears.

  • You can select several sequential | non-sequential lines in a file by pressing Ctrl and then Mouse-Left-Click the line(s) you want to select. A blinking cursor will appear at each selected point in the file. You can now write to them (or edit them) all simultaneously! Press Esc to stop simultaneous editing.

install additional packages and themes

Open File > Settings and then click/select + Install . In the Search Packages box that appears simply type the name of the package/theme you wish to install.

keeping track of your installed packages

  • For a detailed list of all installed packages (show in a directory tree like format) type apm list on the command line.
  • For a simple list of packages that you installed type apm list --installed --bare on the command line.

over-type mode

A plugin exists that allows you "overtype" (type and replace/over-write existing text) its called atom-overtype-mode. The Insert key does not work without this plugin.

window

Keys Action Comment
F11 toggle full screen
Ctrl + increase font size
Ctrl = increase font size
Ctrl - </kbd decrease
Ctrl _ </kbd decrease font size
Ctrl 0 highlights current file
Ctrl Alt p run package specs opens a spec suite window
<Ctrl Alt f reloads file
Ctrl k Ctrl focus pane on left
Ctrl k Ctrl focus on pane below
Ctrl k Ctrl n move focus to next pane
Ctrl k Ctrl p move focus to previous pane
Ctrl k Ctrl move focus to pane on right
Ctrl k Ctrl move focus to pane above
Ctrl Shift l toggle dev tools
Ctrl Shift W close window

tree-view

(NB: tree view must be open and selected for these commands to succeed)

Keys Action
a pops add a new file dialog
Alt recursive collapse directory
Alt recursive expand directory
backspace delete/remove selected file
Ctrl 0 toggle focus
Ctrl 1 open selected entry in pane 1
Ctrl 2 open selected entry in pane 2
Ctrl 3 open selected entry in pane 3
Ctrl 4 open selected entry in pane 4
Ctrl 5 open selected entry in pane 5
Ctrl 6 open selected entry in pane 6
Ctrl 7 open selected entry in pane 7
Ctrl 8 open selected entry in pane 8
Ctrl 9 open selected entry in pane 9
Ctrl [ collapse directory
Ctrl \ toggle tree view pane visibility
Ctrl k Ctrl b toggle tree view pane visibility
Ctrl Alt [ recursive collapse directory
Ctrl Alt ] recursive expand directory
Ctrl c copy file
Ctrl k open selected file in new pane down
Ctrl k j open selected file in new pane down
Ctrl k h open selected file in new pane left
Ctrl k open selected file in new pane left
Ctrl k k open selected file in new pane up
Ctrl k open selected file in new pane up
Ctrl k l open selected file in new pane right
Ctrl k open selected file in new pane right
Ctrl Shift C copy full path to file to clipboard
Ctrl v paste
Ctrl x cut
Ctrl | reveal active file in tree view
d duplicate active file in tree view
delete/remove file in tree view
Enter open selected entry in tree view
F2 pops dialogue for new path for file
m pops dialogue for new path for file
i toggle vcs ignored files
L expand directory
expand directory
collapse directory
h collapse directory
Shift A pops dialogue to enter path for new folder

pane

Keys Action
Alt 1 show/switch to pane 1 or tab 1 (as appropriate)
Alt 2 show/switch pane/tab 2
Alt 3 show/switch pane/tab 3
Alt 4 show/switch pane/tab 4
Alt 5 show/switch pane/tab 5
Alt 6 show/switch pane/tab 6
Alt 7 show/switch pane/tab 7
Alt 8 show/switch pane/tab 8
Alt 9 show/switch pane/tab 9
Ctrl k Ctrl w close current pane
Ctrl k swaps current line with line below
Ctrl k moves cursor one word left
Ctrl k moves cursor one word right
Ctrl k swaps current line with line above
Ctrl PgDn show next pane/tab
Ctrl PgUp show previous pane/tab
Ctrl Shift T reopens previously closed file(s) in pane/tab
Ctrl Shift PgDn move item right
Ctrl Shift PgUp move item left
Ctrl cycles through panes/tabs forward order
Ctrl Shift cycles through panes/tabs reverse order

editor

Keys Action
Alt h delete to beginning of word
Alt b move to beginning of word
Ctrl delete to beginning of word
Alt Shift B select to beginning of word
Alt f move to end of word
Alt d delete to end of word
Ctrl delete to end of word
Alt Shift F select to end of word
Alt Shift add selection below
Alt Shift add selection above
Ctrl / toggle line comments
Ctrl < show settings dialog
Ctrl [ out-dent selected rows
Ctrl ] indent selected rows
Ctrl Alt [ fold current row
Ctrl Alt ] unfold current row
Ctrl Alt f fold selection
Ctrl Alt Shift P log cursor scope
Ctrl Alt z checkout head revision
Ctrl Alt { fold all
Ctrl Alt } unfold all
Ctrl move line down
Ctrl Enter newline below
Ctrl j join lines
Ctrl K Ctrl 0 unfold all
Ctrl K Ctrl 1 fold at indent level 1
Ctrl K Ctrl 2 fold at indent level 2
Ctrl K Ctrl 3 fold at indent level 3
Ctrl K Ctrl 4 fold at indent level 4
Ctrl K Ctrl 5 fold at indent level 5
Ctrl K Ctrl 6 fold at indent level 6
Ctrl K Ctrl 7 fold at indent level 7
Ctrl K Ctrl 8 fold at indent level 8
Ctrl K Ctrl 9 fold at indent level 9
Ctrl K Ctrl l lower case
Ctrl K Ctrl u upper case
Ctrl l select line
Ctrl move to beginning of word
Ctrl move to end of word
Ctrl Shift C copy path
Ctrl Shift D duplicate lines
Ctrl Shift K delete line
Ctrl Shift Enter newline above
Ctrl Shift select to beginning of word
Ctrl Shift select to end of word
Ctrl move line up
End move to end of sceeen line
Enter newline
Esc consolodate selection
Home move to first character of line
Shift End select to end of line
Shift Home select to first character of line
Shift Tab outdent selected rows
Tab indent

Notifications

Keys Action
Alt Ctrl Tab select to first character of line

#Find and Replace

Keys Action Comment
Alt Enter find all
Alt F3 select all
Ctrl Alt / toggle regex option
Ctrl Alt c toggle case option
Ctrl Alt f show replace
Ctrl Alt s toggle selection option
Ctrl Alt w toggle whole word option
Ctrl d select next
Ctrl e use selction as find pattern
Ctrl Enter confirm
Ctrl Enter replace all ??
Ctrl f show
Ctrl k Ctrl d select skip
Ctrl u select undo
F3 find next
Shift Enter previous show
Shift F3 find previous
Shift Tab focus-previous
Tab focus next

#Open on GitHub

Keys Action
Alt g n blame
Alt g c copy URL
Alt g h history
Alt g o file
Alt g r branch compare

#Git Diff

Keys Action
Alt g d toggle diff list
Alt g move to next diff
Alt g move to previous diff

#Snippets

Keys Action
Alt Shift S "available"
Shift Tab previous tab stop
Tab expand
Tab next tab stop

#Bookmarks

Keys Action
Alt Shift F2 clear bookmarks
Ctrl F2 view all
Ctrl Shift F2 toggle bookmarks
F2 jump to next bookmark
Shift F2 jump to previous bookmark

#Text Character Encoding drop down selector

Keys Action
Alt u show supported character encodings

#Core Commands

Core Keys Action
backspace
Ctrl : cancel
Ctrl a select all
Ctrl c copy
Ctrl End move to bottom
Ctrl Home move to top
Ctrl Insert copy
Ctrl s save
Ctrl Shift S save as
Ctrl Shift Z redo
Ctrl Shift move down
Ctrl Shift End select to bottom
Ctrl Shift Home select to top
Ctrl Shift move up
Ctrl v paste
Ctrl w close
Ctrl w cancel
Ctrl x cut
Ctrl y redo
Ctrl z undo
Delete delete
move down
Enter confirm
Escape cancel
j move down
k move up
left move left
Page Down page down
Page Up page up
right
Shift backspace
Shift Delete cut
Shift select down
Shift Insert paste
Shift select left
Shift Page Down select page down
Shift select right
Shift Tab focus previous
Shift select up
Space validate
Tab focus next
Tab confirm
move up

#asciidoc preview

Keys Action
Cmd + zoom in
Cmd - zoom out
Cmd 0 reset zoom
Cmd = zoom in
Cmd </kbd> zoom out
Ctrl Alt a toggle render on save only
Ctrl Shift a toggle

#image view

Keys Action
Ctrl + zoom in
Ctrl - zoom out
Ctrl 0 reset zoom
Ctrl = zoom in
Ctrl + zoom in
Ctrl Shift M toggle

#markdown preview

Keys Action
Ctrl + zoom in
Ctrl - zoom out
Ctrl 0 reset zoom
Ctrl = zoom in
Ctrl \ zoom out
Ctrl Shift M toggle

#application

Keys Action
Ctrl , show settings
Ctrl Alt o opendev
Ctrl Alt s run all specs
Ctrl n new-file
Ctrl o open file
Ctrl q quit
Ctrl Shift N new windows
Ctrl Shift O open folder

#settings view

Keys Action
Ctrl , open

#key binding resolver

Keys Action
Ctrl . togggle

#spell check

Keys Action
Ctrl : correct misspelling

#bracket matcher

Keys s Action
Ctrl ] remove brackets from selection
Ctrl Alt . close tag
Ctrl Alt remove matching bracket
Ctrl m go to matching bracket

#keybindding cheat sheet

Keys Action
Ctrl Alt / toggle key binding cheat sheet

#project find

Keys Action
Ctrl Alt / toggle regex option
Ctrl Alt c toggle case option
Ctrl Enter confirm
Ctrl Enter replace all
Ctrl Shift F show

#symbols view

Keys Action
Ctrl Alt go to declaration
Ctrl Alt return from declaration
Ctrl r toggle file symbols
Ctrl Alt return from declaration

#autoflow

Keys Action
Ctrl Alt q reflow selection

#fuzzy finder

Keys Action
Ctrl b toggle buffer finder
Ctrl p toggle file finder
Ctrl ShiftB toggle git status finder
Ctrl t toggle file finder

#go to line

Keys Action
Ctrl g toggle

#markdown pdf

Keys Action
Ctrl Shift C convert

#style guide

Keys Action
Ctrl Shift G show

#grammar selector

Keys Action
Ctrl Shift L show

#command palette

Keys Action
Ctrl Shift P toggle

#auto complete

Keys Action
Ctrl Space L toggle

#tool panel

Keys Action
Esc unfocus

Terminal Commands.

  • open the current project or directory in atom.

$ atom --dev --foreground --help --log-file --new-window --spec-directory --test --version --wait [file ...]'

  • install the given Atom package.

$ apm install \[<package_name>]'

  • uninstall the package

$ apm uninstall \[<package_name>]...'delete the installed package(s).`

  • search for Atom packages/themes on the atom.io registry.

$ apm search <package_name>':

  • view information about a package/theme in the atom.io registry.

$ apm view <package_name>':

Other Useful Things.

  • configure Atom to be your Git commit editor.

$ git config --global core.editor "atom --wait"':