Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Chapter 2 - Using Atom #2

Merged
merged 21 commits into from
Jan 8, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
notes and outlines for text section of ch2
  • Loading branch information
schacon committed Dec 16, 2014
commit 0e5a13db6c558425e3ed2ae321dce9b60fa69e9a
120 changes: 89 additions & 31 deletions book/02-using-atom/sections/02-text.asc
Original file line number Diff line number Diff line change
@@ -1,55 +1,113 @@
:compat-mode:
[[_working_with_text]]
=== Working with Text

OK, so now we've got our
[[_moving_in_atom]]
=== Moving in Atom

* line manipulation (indent, goto)
`cntl-G` - go to line

`cntl-cmd-up`, `cntl-cmd-down` - moves lines up and down
basic emacs bindings

* case, delete, transpose
* recording and replaying
* change encoding, grammar
* bracket matching
* multiple cursors
- cmd-shift-L (selection to cursors)
- cntl-shift-up (add cursor up/down)
* whitespace
* spell checking
`cntl-[PBNF]` - simple movement

* move to beginning/end of word
* move to next word boundry
* move to top/bottom
* move to beginning/end of line
* move to first character of line
* move to next/prev word
* move to beginning of next/prev paragraph

==== Navigating by Symbols

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`.

To search for symbols across your project, use `cmd-shift-r`. First you'll need to make sure you have `tags` (or `TAGS`) file generated for your project. This can be done by installing http://ctags.sourceforge.net[ctags] and running a command such as `ctags -R src/` from the command line in your project's root directory.

Using http://brew.sh/[Homebrew]? Just run
`brew install ctags`.

==== Wrapping Text
You can customize how tags are generated by creating your own `.ctags` file in your home directory (`~/.ctags`). An example can be found https://github.com/atom/symbols-view/blob/master/lib/.ctags[here].

[[_atom_bookmarks]]
==== Atom Bookmarks

`F2` to toggle bookmark, `cmd-F2` to go through them (shift to go backwards), `cntl-F2` to view them all

If you want to toggle soft wrap, trigger the command from the command palette. Press `cmd-shift-P` to open the palette, then type "wrap" to find the correct 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.

[[_atom_selections]]
=== Atom Selections

[[_searching]]
=== Searching
Selections mirror many of the movement commands.

[[_find_replace]]
=== Find and Replace
* select to beginning/end of word
* select to next word boundry
* select to top/bottom
* select to beginning/end of line
* select to first character of line
* select to next/prev word
* select to beginning of next/prev paragraph

To search within a buffer use `cmd-f`. To search the entire project use `cmd-shift-f`.
[[_working_with_text]]
=== Editing and Deleting Text

[[_moving_in_atom]]
=== Moving in Atom
==== Basic Manipulation

==== Navigating by Symbols
transpose - `cntl-T`

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`.
join lines - `cmd-J`

To search for symbols across your project, use `cmd-shift-r`. First you'll need to make sure you have `tags` (or `TAGS`) file generated for your project. This can be done by installing http://ctags.sourceforge.net[ctags] and running a command such as `ctags -R src/` from the command line in your project's root directory.
`cntl-cmd-up`, `cntl-cmd-down` - moves lines up and down

Using http://brew.sh/[Homebrew]? Just run
`brew install ctags`.
duplicate lines - `cmd-shift-D`

case - `cmd-K, cmd-U`, `cmd-K, cmd-L`


==== Deleting and Cutting

delete line - `cntl-shift-K`

delete to end of line - `cmd-delete` (cmd-fn-backspace on mac)

delete to beginning of line - `cmd-backspace`

del ben of word - `alt-backspace`, `alt-H`

del end of word - `alt-delete`, `alt-D`

cut to end of line `cntl-K`


==== Multiple Cursors

- cmd-click (add new selection)
- cmd-shift-L (selection to cursors)
- cntl-shift-up (add cursor up/down)


==== Whitespace

convert spaces/tabs, remove trailing whitespace (on save)



==== Brackets

* bracket matching

==== Encoding

change encoding

`cntl-shift-U`


[[_find_replace]]
=== Find and Replace

To search within a buffer use `cmd-f`. To search the entire project use `cmd-shift-f`.

You can customize how tags are generated by creating your own `.ctags` file in your home directory (`~/.ctags`). An example can be found https://github.com/atom/symbols-view/blob/master/lib/.ctags[here].

[[_atom_bookmarks]]
=== Atom Bookmarks


=== Autocompletion and Snippets
Expand Down
7 changes: 7 additions & 0 deletions book/02-using-atom/sections/03-interface.asc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[[_key_bindings]]
=== Atom Keybindings

=== Grammar

change grammar

`cntl-shift-L`


[[_atom_folding]]
=== Folding

Expand Down
4 changes: 4 additions & 0 deletions book/02-using-atom/sections/04-git-markdown.asc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
=== Markdown in Atom

* editing markdown

==== Spell Checking

* spell checking