Atom Editor
Basic Terminology
Buffer
A buffer is the text content of a file in Atom. It’s basically the same as a file for most descriptions, but it’s the
version Atom has in memory. For instance, you can change the test of a buffer and it isn’t written to its associated
file until you save it.
Pane
A pane is a visual section of Atom. If you look at the welcome screen we just launched, you can see four Panes -
the tab bar, the gutter (which has line numbers in it), the status bar at the bottom and finally the text editor.
Command Palette
In that welcome screen, we are introduced to probably the most important command in Atom, the “Command Palette”.
cmd-shift-p , open Command Palette
cmd -, open Atom’s setting screen or hit cmd-shift-p search for setting-view:open int the command palette
Opening a File
File >> Open
cmd - o
terminal >> $ atom ./file1 file2
Editing and Saving a File
File >> Save / cmd-s , save a file
Save As / cmd-shift-s , save the current content under a different file name
Opening Directories
File >> Open Folder / File >> Open
File >> Add Project Folder… / cmd-shift-o
atom ./hopes ./dreams
Tree view in an open project
cmd - \
tree-view:toggle command fromm the Palette, and ctrl-0 (0,是数字 0 ,不是字母 o) will focus it.
When the Tree view has focus you can press a, m, or delete to add, move or delete files and folders.
Opening a File in a Project
cmd-T or cmd-P , search for any file inn any directory your project by typing parts of the path.
Moving in Atom
alt-left, alt-B
Move to beginning of word
alt-right, alt-F
Move to end of word
cmd-left, ctrl-A
Move to first character of line
cmd-right, ctrl-E
Move to end of line
cmd-up
Move to top of file
cmd-down
Move to bottom of file