2013-02-14 06:59:23 +04:00
|
|
|
# Getting Started
|
|
|
|
|
2013-08-21 03:48:01 +04:00
|
|
|
Welcome to Atom! This guide provides a quick introduction so you can be
|
|
|
|
productive as quickly as possible. There are also guides which cover
|
2013-10-16 02:13:38 +04:00
|
|
|
[configuring], [theming], and [extending] Atom.
|
2013-02-14 06:59:23 +04:00
|
|
|
|
|
|
|
## The Command Palette
|
|
|
|
|
2013-12-04 23:33:04 +04:00
|
|
|
If there's one key-command you remember in Atom, it should be `cmd-shift-P`. You
|
|
|
|
can always press `cmd-shift-P` to bring up a list of commands (and key bindings)
|
|
|
|
that are relevant to the currently focused interface element. This is a great
|
|
|
|
way to explore the system and learn key bindings interactively. For information
|
|
|
|
about adding or changing a key binding refer to the [customizing key
|
|
|
|
bindings][key-bindings] section.
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-10-15 04:00:16 +04:00
|
|
|
![Command Palette]
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-08-21 03:48:01 +04:00
|
|
|
## The Basics
|
2013-02-23 01:31:19 +04:00
|
|
|
|
2013-02-16 01:13:47 +04:00
|
|
|
### Working With Files
|
|
|
|
|
2014-01-22 07:33:39 +04:00
|
|
|
Atom windows are scoped to a single directory on disk. If you launch Atom from
|
|
|
|
the command line via the `atom` command and don't specify a path, Atom opens a
|
|
|
|
window for the current working directory. The current window's directory will be
|
2014-02-23 06:27:53 +04:00
|
|
|
visible as the root of the tree view on the left, and also serve as the context
|
2014-01-22 07:33:39 +04:00
|
|
|
for all file-related operations.
|
2013-08-29 21:40:40 +04:00
|
|
|
|
2013-02-16 01:13:47 +04:00
|
|
|
#### Finding Files
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-12-04 23:33:04 +04:00
|
|
|
The fastest way to find a file is to use the fuzzy finder. Press `cmd-t` and
|
|
|
|
begin typing the name of the file you're looking for. If you are looking for a
|
|
|
|
file that is already open press `cmd-b` to bring up a searchable list of open
|
2014-02-23 06:29:31 +04:00
|
|
|
files. If you are using Git you can use `cmd-shift-b` to search the list of
|
|
|
|
files modified and untracked in your project's repository.
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2014-01-22 07:33:39 +04:00
|
|
|
You can also use the tree view to navigate to a file. To open and focus the
|
|
|
|
the tree view, press `ctrl-0`. The tree view can be toggled open and closed with
|
|
|
|
`cmd-\`.
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-02-16 01:13:47 +04:00
|
|
|
#### Adding, Moving, Deleting Files
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2014-02-23 06:31:52 +04:00
|
|
|
You can add, move, and delete files and folders by right-clicking them in the
|
|
|
|
tree view and selecting the desired operation from the context menu. You can
|
|
|
|
also perform these operations from the keyboard by selecting a file or folder
|
|
|
|
and using `a` to add, `m` to move, and `delete` to delete.
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-08-21 03:48:01 +04:00
|
|
|
### Searching
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-08-21 03:48:01 +04:00
|
|
|
#### Find and Replace
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-10-16 02:13:38 +04:00
|
|
|
To search within a buffer use `cmd-f`. To search the entire project use
|
2013-12-04 23:33:04 +04:00
|
|
|
`cmd-shift-f`.
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-02-16 01:13:47 +04:00
|
|
|
#### Navigating By Symbols
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2014-01-22 07:33:39 +04:00
|
|
|
To jump to a symbol such as a method definition, press `cmd-r`. This opens a
|
|
|
|
list of all symbols in the current file, which you can fuzzy filter similarly to
|
|
|
|
`cmd-t`.
|
2013-08-21 21:09:05 +04:00
|
|
|
|
2014-01-22 07:33:39 +04:00
|
|
|
To search for symbols across your project, use `cmd-shift-r`. First you'll need
|
2014-02-23 06:45:53 +04:00
|
|
|
to make sure you have `tags` (or `TAGS`) file generated for your project.
|
|
|
|
This can be done by installing [ctags](http://ctags.sourceforge.net/) and
|
2014-02-23 06:50:56 +04:00
|
|
|
running a command such as `ctags -R src/` from the command line in your
|
|
|
|
project's root directory. Using [Homebrew](http://brew.sh/)? Just run
|
2014-02-23 06:45:53 +04:00
|
|
|
`brew install ctags`.
|
|
|
|
|
|
|
|
You can customize how tags are generated by creating your own `.ctags` file
|
|
|
|
in your home directory (`~/.ctags`). Here is [a good example][ctags] to start
|
|
|
|
from.
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2013-02-16 01:13:47 +04:00
|
|
|
### Split Panes
|
2013-02-14 06:59:23 +04:00
|
|
|
|
2014-01-22 07:33:39 +04:00
|
|
|
You can split any editor pane horizontally or vertically by using `cmd-k right`
|
|
|
|
or `cmd-k down`. Once you have a split pane, you can move focus between them
|
|
|
|
with `cmd-k cmd-right` or `cmd-k cmd-down`. To close a pane, close all its
|
2014-04-01 19:50:09 +04:00
|
|
|
editors with `cmd-w`, then press `cmd-w` one more time to close the pane. You
|
2014-02-26 21:20:57 +04:00
|
|
|
can configure panes to auto-close when empty in the Settings view.
|
2013-02-14 07:04:34 +04:00
|
|
|
|
2013-02-16 01:13:47 +04:00
|
|
|
### Folding
|
2013-02-14 07:04:34 +04:00
|
|
|
|
2014-01-22 07:33:39 +04:00
|
|
|
You can fold blocks of code by clicking the arrows that appear when you hover
|
|
|
|
your mouse cursor over the gutter. You can also fold and unfold from the
|
|
|
|
keyboard with `alt-cmd-[` and `alt-cmd-]`. To fold everything, use
|
|
|
|
`alt-cmd-shift-{` and to unfold everything use `alt-cmd-shift-}`. You can also
|
|
|
|
fold at a specific indentation level with `cmd-k cmd-N` where N is the
|
|
|
|
indentation depth.
|
2013-02-14 07:04:34 +04:00
|
|
|
|
2013-02-16 01:13:47 +04:00
|
|
|
### Soft-Wrap
|
2013-02-14 07:04:34 +04:00
|
|
|
|
|
|
|
If you want to toggle soft wrap, trigger the command from the command palette.
|
2013-12-04 23:33:04 +04:00
|
|
|
Press `cmd-shift-P` to open the palette, then type "wrap" to find the correct
|
2014-01-22 07:33:39 +04:00
|
|
|
command. By default, lines will wrap based on the size of the editor. If you
|
|
|
|
prefer to wrap at a specific line length, toggle "Wrap at preferred line length"
|
|
|
|
in preferences.
|
2013-02-16 01:13:47 +04:00
|
|
|
|
2013-08-21 03:48:01 +04:00
|
|
|
## Configuration
|
2013-02-16 01:13:47 +04:00
|
|
|
|
2014-02-26 21:22:02 +04:00
|
|
|
Press `cmd-,` to open the Settings view. This is the place to change settings,
|
2014-02-23 06:25:50 +04:00
|
|
|
install packages, and change the theme.
|
2013-02-16 01:13:47 +04:00
|
|
|
|
2013-08-21 03:48:01 +04:00
|
|
|
For more advanced configuration see the [customization guide][customization].
|
|
|
|
|
2013-10-15 04:00:16 +04:00
|
|
|
[configuring]: customizing-atom.md
|
|
|
|
[theming]: creating-a-theme.md
|
|
|
|
[extending]: creating-a-package.md
|
|
|
|
[customization]: customizing-atom.md
|
2013-12-04 23:33:04 +04:00
|
|
|
[key-bindings]: customizing-atom.md#customizing-key-bindings
|
2013-10-15 04:00:16 +04:00
|
|
|
[command palette]: https://f.cloud.github.com/assets/1424/1091618/ee7c3554-166a-11e3-9955-aaa61bb5509c.png
|
2014-02-23 06:27:07 +04:00
|
|
|
[ctags]: https://github.com/atom/symbols-view/blob/master/lib/.ctags
|