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

Commit 447a48d

Browse files
authored
Merge pull request #528 from atom/rsese-chapter2-cleanup
Chapter 2 cleanup
2 parents ed2af51 + c084181 commit 447a48d

7 files changed

+12
-10
lines changed
81.4 KB
Loading
Loading

content/using-atom/sections/atom-packages.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Atom Packages
55

66
First we'll start with the Atom package system. As we mentioned previously, Atom itself is a very basic core of functionality that ships with a number of useful packages that add new features like the [Tree View](https://github.com/atom/tree-view) and the [Settings View](https://github.com/atom/settings-view).
77

8-
In fact, there are more than 90 packages that comprise all of the functionality that is available in Atom by default. For example, the [Welcome screen](https://github.com/atom/welcome) that you see when you first start Atom, the [spell checker](https://github.com/atom/spell-check), the [themes](https://github.com/atom/one-dark-ui) and the [Fuzzy Finder](https://github.com/atom/fuzzy-finder) are all packages that are separately maintained and all use the same APIs that you have access to, as we'll see in great detail in [Hacking Atom](/hacking-atom/).
8+
In fact, there are more than 80 packages that comprise all of the functionality that is available in Atom by default. For example, the [Welcome screen](https://github.com/atom/welcome) that you see when you first start Atom, the [spell checker](https://github.com/atom/spell-check), the [themes](https://github.com/atom/one-dark-ui) and the [Fuzzy Finder](https://github.com/atom/fuzzy-finder) are all packages that are separately maintained and all use the same APIs that you have access to, as we'll see in great detail in [Hacking Atom](/hacking-atom/).
99

1010
This means that packages can be incredibly powerful and can change everything from the very look and feel of the entire interface to the basic operation of even core functionality.
1111

@@ -89,6 +89,6 @@ $ apm view build-coffee
8989
> ├── Atom Build provider for coffee, compiles CoffeeScript
9090
> ├── 1152 downloads
9191
> └── 2 stars
92-
>
92+
>
9393
> Run `apm install build-coffee` to install this package.
9494
```

content/using-atom/sections/basic-customization.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ The scope name is shown in the settings view for each language. Click on "Packag
215215

216216
![Finding a language grammar](../../images/python-grammar.png "Finding a grammar's scope name")
217217

218-
Another way to find the scope for a specific language is to open a file of its kind and press <kbd class="platform-mac">Alt+Cmd+P</kbd><kbd class="platform-windows platform-linux">Alt+Ctrl+Shift+P</kbd> to show all scopes for the current position of the cursor. The scope mentioned top most is always the language for this kind of file, the scopes following are specific to the cursor position:
218+
Another way to find the scope for a specific language is to open a file of its kind and <span class="platform-mac">press <kbd class="platform-mac">Alt+Cmd+P</kbd></span><span class="platform-windows platform-linux">choose "Editor: Log Cursor Scope" in the Command Palette</span> to show all scopes for the current position of the cursor. The scope mentioned top most is always the language for this kind of file, the scopes following are specific to the cursor position:
219219

220220
![Finding a language grammar with cursor scope](../../images/cursor-scope.png "Finding a language grammar with cursor scope")
221221

@@ -242,7 +242,7 @@ The CSON configuration files for Atom are stored on disk on your machine. The lo
242242

243243
##### Custom home location with an environment variable
244244

245-
An environment variable can be used, though to make Atom use a different location. This can be useful for several reasons. One of these may be that multiple user accounts on a machine want to use the same Atom Home. The environment variable used to specify and alternate location is called `ATOM_HOME`. If this environment variable exists, the location specified will be used to load and store Atom settings.
245+
An environment variable can be used to make Atom use a different location. This can be useful for several reasons. One of these may be that multiple user accounts on a machine want to use the same Atom Home. The environment variable used to specify an alternate location is called `ATOM_HOME`. If this environment variable exists, the location specified will be used to load and store Atom settings.
246246

247247
##### Taking your customization with you with Portable Mode
248248

content/using-atom/sections/find-and-replace.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you launch either of those commands, you'll be greeted with the Find and Repl
1212

1313
![Find and replace text in the current file](../../images/find-replace-file.png "Find and replace text in the current file")
1414

15-
To search within your current file you can press <kbd class="platform-mac">Cmd+F</kbd><kbd class="platform-windows platform-linux">Ctrl+F</kbd>, type in a search string and press <kbd class="platform-all">Enter</kbd> (or <kbd class="platform-mac">Cmd+G</kbd><kbd class="platform-windows platform-linux">F3</kbd> or the "Find Next" button) multiple times to cycle through all the matches in that file. The Find and Replace panel also contains buttons for toggling case sensitivity, performing regular expression matching and scoping the search to selections.
15+
To search within your current file you can press <kbd class="platform-mac">Cmd+F</kbd><kbd class="platform-windows platform-linux">Ctrl+F</kbd>, type in a search string and press <kbd class="platform-all">Enter</kbd> (or <kbd class="platform-mac">Cmd+G</kbd><kbd class="platform-windows platform-linux">F3</kbd> or the "Find Next" button) multiple times to cycle through all the matches in that file. <kbd class="platform-all">Alt+Enter</kbd> will find all occurences of the search string. The Find and Replace panel also contains buttons for toggling case sensitivity, performing regular expression matching, scoping the search to selections, and performing whole word search.
1616

1717
If you type a string in the replacement text box, you can replace matches with a different string. For example, if you wanted to replace every instance of the string "Scott" with the string "Dragon", you would enter those values in the two text boxes and press the "Replace All" button to perform the replacements.
1818

@@ -30,7 +30,7 @@ You can also find and replace throughout your entire project if you invoke the p
3030

3131
This is a great way to find out where in your project a function is called, an anchor is linked to or a specific misspelling is located. Click on the matching line to jump to that location in that file.
3232

33-
You can limit a search to a subset of the files in your project by entering a [glob pattern](https://en.wikipedia.org/wiki/Glob_%28programming%29) into the "File/Directory pattern" text box. For example, the pattern `src/*.js` would restrict the search to javascript files in the `src` directory. The "globstar" pattern (`**`) can be used to match arbitrarily many subdirectories. For example, `docs/**/*.md` will match `docs/a/foo.md`, `docs/a/b/foo.md`, etc. You can enter multiple glob patterns separated by commas, which is useful for searching in multiple file types or subdirectories.
33+
You can limit a search to a subset of the files in your project by entering a [glob pattern](https://en.wikipedia.org/wiki/Glob_%28programming%29) into the "File/Directory pattern" text box. For example, the pattern `src/*.js` would restrict the search to JavaScript files in the `src` directory. The "globstar" pattern (`**`) can be used to match arbitrarily many subdirectories. For example, `docs/**/*.md` will match `docs/a/foo.md`, `docs/a/b/foo.md`, etc. You can enter multiple glob patterns separated by commas, which is useful for searching in multiple file types or subdirectories.
3434

3535
When you have multiple project folders open, this feature can also be used to search in only one of those folders. For example, if you had the folders `/path1/folder1` and `/path2/folder2` open, you could enter a pattern starting with `folder1` to search only in the first folder.
3636

content/using-atom/sections/snippets.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ The idea is that you can type something like `habtm` and then press the <kbd cla
99
Many Core and Community packages come bundled with their own snippets that are specific to it. For example, the `language-html` package that provides support for HTML syntax highlighting and grammar comes with dozens of snippets to create many of the various HTML tags you might want to use. If you create a new HTML file in Atom, you can type `html` and then press <kbd class="platform-all">Tab</kbd> and it will expand to:
1010

1111
```html
12-
<html>
12+
<!DOCTYPE html>
13+
<html lang="en" dir="ltr">
1314
<head>
15+
<meta charset="utf-8">
1416
<title></title>
1517
</head>
1618
<body>
@@ -19,7 +21,7 @@ Many Core and Community packages come bundled with their own snippets that are s
1921
</html>
2022
```
2123

22-
It will also position the cursor in the middle of the `title` tag so you can immediately start filling out the tag. Many snippets have multiple focus points that you can move through with the <kbd class="platform-all">Tab</kbd> key as well - for instance, in the case of this HTML snippet, once you've filled out the title tag you can press <kbd class="platform-all">Tab</kbd> and the cursor will move to the middle of the `body` tag.
24+
It will also position the cursor in the `lang` attribute value so you can edit it if necessary. Many snippets have multiple focus points that you can move through with the <kbd class="platform-all">Tab</kbd> key as well - for instance, in the case of this HTML snippet, after the cursor is placed in the `lang` attribute value, you can continue pressing <kbd class="platform-all">Tab</kbd> and the cursor will move to the `dir` attribute value, then to the middle of the `title` tag, then finally to the middle of the `body` tag.
2325

2426
To see all the available snippets for the file type that you currently have open, choose "Snippets: Available" in the Command Palette.
2527

content/using-atom/sections/writing-in-atom.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Any misspelled words will be highlighted (by default with a dashed red line bene
1717

1818
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.
1919

20-
The default grammars to spell check are `text.plain`, `source.gfm`, and `text.git-commit` but you can add something like `source.asciidoc` if you wish to check those types of files too.
20+
The default grammars to spell check are `text.plain`, `source.gfm`, `text.git-commit`, `source.asciidoc`, `source.rst`, and `text.restructuredtext` but you can add other grammars if you wish to check those types of files too.
2121

2222
The spell checking is implemented in the [spell-check](https://github.com/atom/spell-check) package.
2323

@@ -31,7 +31,7 @@ When writing prose in a markup language, it's often very useful to get an idea o
3131

3232
As you edit the text, the preview will also update automatically. This makes it fairly easy to check your syntax as you type.
3333

34-
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".
34+
You can also copy the rendered HTML from the preview pane into your system clipboard when the preview is focused and you press <kbd class="platform-mac">Cmd+C</kbd><kbd class="platform-windows">Ctrl+C</kbd><kbd class="platform-linux">Ctrl+Ins</kbd> or if you right-click in the preview pane and choose "Copy as HTML".
3535

3636
Markdown preview is implemented in the [markdown-preview](https://github.com/atom/markdown-preview) package.
3737

0 commit comments

Comments
 (0)