This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |