diff --git a/README.md b/README.md index e7c7d594fd..d0cc5e4226 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ This book is open source under a Creative Commons license. To check the current progress and planned content of the book, check out the [outline](outline.md). - ## How To Generate the Book There are two ways to generate e-book content from this source code. diff --git a/book/02-using-atom/images/dictionary.png b/book/02-using-atom/images/dictionary.png new file mode 100644 index 0000000000..8ce8aa6e21 Binary files /dev/null and b/book/02-using-atom/images/dictionary.png differ diff --git a/book/02-using-atom/images/preview.png b/book/02-using-atom/images/preview.png new file mode 100644 index 0000000000..53732a6fc7 Binary files /dev/null and b/book/02-using-atom/images/preview.png differ diff --git a/book/02-using-atom/images/spellcheck.png b/book/02-using-atom/images/spellcheck.png new file mode 100644 index 0000000000..f0238c5c3a Binary files /dev/null and b/book/02-using-atom/images/spellcheck.png differ diff --git a/book/02-using-atom/sections/05-writing.asc b/book/02-using-atom/sections/05-writing.asc index 18d4dcd7e2..ed5715e16e 100644 --- a/book/02-using-atom/sections/05-writing.asc +++ b/book/02-using-atom/sections/05-writing.asc @@ -1,12 +1,73 @@ +:compat-mode: [[_atom_markdown]] === Writing in Atom -Though it is probably most common to use Atom to write software code, Atom can also be used to write prose quite effectively. Most often this is done in some sort of markup language such as Markdown or Asciidoc (as this manual is written in). +Though it is probably most common to use Atom to write software code, Atom can also be used to write prose quite effectively. Most often this is done in some sort of markup language such as Markdown or Asciidoc (as this manual is written in). Here we'll quickly cover a few of the tools Atom provides for helping you write prose. -* editing markdown +Here we'll concentrate on writing in Markdown, but other prose markup languages like Asciidoc have packages that provide similar functionality. + +==== Spell Checking + +If you're workng in text (which includes plain text files, GitHub markdown and Git commit messages by default), Atom will automatically try to check your spelling. + +Any misspelled words will be highlighted (by default with a dashed red line beneath the word) and you can pull up a menu of possible corrections by hitting `cmd-:` (or by choosing ``Correct Spelling'' from the right-click context menu or from the Command Palette). + +.Checking your spelling +image::images/spellcheck.png[spell checking] + +To add more types of files to the list of what Atom will try to spell check, go to the Spell Check package settings in your Settings view and add any grammars you want to spell check. + +By default it's set to ``text.plain, source.gfm, text.git-commit'' but you can add something like ``source.asciidoc'' if you wish to check those types of files too. + +The Atom spell checker uses the system dictionary, so if you want it to check your spelling in another language or locale, you can change it easily. + +.Changing your spell checking dictionary +image::images/dictionary.png[spell check dictionary] + +The spell checking is implemented in the https://github.com/atom/spell-check[atom/spell-check] package. ==== Previews -==== Spell Checking +When writing prose in a markup language, it's often very useful to get an idea of what the content will look like when it's rendered. Atom ships with a markdown preview plugin by default. + +`cntl-shift-M`:: Will toggle Preview mode for Markdown. + +.Preview your prose +image::images/preview.png[preview prose] + +As you edit the text, the preview will also update by default. This makes it fairly easy to check your syntax as you type. + +You can also copy the rendered HTML from the preview pane into your system clipboard. There is no keybinding for it, but you can find it in the Command Palette by searching for ``Markdown Preview Copy HTML''. + +Markdown preview is implemented in the https://github.com/atom/markdown-preview[atom/markdown-preview] package. + +==== Snippets + +There are also a number of great snippets available for writing Markdown quickly. + +If you type `img` and hit `tab` you get Markdown formatted image embed code like `![]()`. If you type `table` and hit `tab` you get a nice example table to fill out. + +[source] +---- +| Header One | Header Two | +| :------------- | :------------- | +| Item One | Item Two | +---- + +There are only a handful of them (`b` for bold, `i` for italic, 'code' for a code block, etc), but it can easily save you time from having to look up the more obscure syntaxes. Again, you can easily see a list of all available snippets for the type of file you're currently in by hitting 'alt-shift-S' + + +==== Wrapping customization + +Many people prefer for their prose files to soft wrap lines but not their code. Atom allows you to customize settings for specific grammars, so we can easily override the wrapping settings specifically for our prose files. + +Open your config file via the command palette type ``open config'', and hit enter. Add a snippet of configuration text like this: + +[source,js] +---- +'.source.gfm': # markdown overrides + 'editor': + 'softWrap': true +---- -* spell checking +This will set the soft wrapping on by default for any Markdown files.