Skip to content

Commit

Permalink
Merge pull request #1233 from nickcernis/patch-3
Browse files Browse the repository at this point in the history
Typo and grammar fixes to the rich comments docs
  • Loading branch information
bpringe authored Jul 13, 2021
2 parents d487c45 + b884be4 commit 250188e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/site/rich-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Why bother with **Rich comments**? Read on. Consider watching [this Youtube vide

<iframe width="560" height="315" src="https://www.youtube.com/embed/d0K1oaFGvuQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

## Things in `comment` is not evaluated
## Things in `comment` are not evaluated

The Clojure `comment` macro is defined like so:

Expand All @@ -17,7 +17,7 @@ The Clojure `comment` macro is defined like so:

It has no forms in its body and will therefore always (as long as the Clojure Reader can read it) evaluate to `nil`. That is: _nothing in the `(comment ...)` form will get evaluated when the file is loaded_.

This makes it a very good ”place” where you can develop code, experiment with code, and keep example code. Since you will be able to load/evaluate the current file without worrying about that the code in the `comment` form will get evaluated. This also holds true for when using tools that hot-reloads the code on save, such as [Figwheel](https://figwheel.org), [shadow-cljs](https://github.com/thheller/shadow-cljs) and [Krell](https://calva.io/krell/).
This makes it a very good ”place” where you can develop code, experiment with code, and keep example code. Since you will be able to load/evaluate the current file without worrying that the code in the `comment` form will get evaluated. This also holds true when using tools that hot-reloads the code on save, such as [Figwheel](https://figwheel.org), [shadow-cljs](https://github.com/thheller/shadow-cljs) and [Krell](https://calva.io/krell/).

To develop or refine a function you might:

Expand All @@ -36,13 +36,13 @@ To develop or refine a function you might:

Calva has several features to facilitate the Rich comments workflow, e.g.

1. Secial [Syntax highlight](customizing.md#calva-highlight). By default `comment` forms are rendered in _italics_
1. Special [Syntax highlight](customizing.md#calva-highlight). By default `comment` forms are rendered in _italics_
1. Special [top-level form](evaluation.md#current-top-level-form) context
1. Special formatting

### `comment` is top-level

To make it easy to evaluate forms in `(commment ...)` forms, they create a new top-level context. Instead of you having to place the cursor with precision before evaluating the **current form**, you can have the cursor anywhere within a `comment` enclosed form and [**Evaluate Top-Level Form**](evaluation.md#current-top-level-form).
To make it easy to evaluate forms in `(comment ...)` forms, they create a new top-level context. Instead of you having to place the cursor with precision before evaluating the **current form**, you can have the cursor anywhere within a `comment` enclosed form and [**Evaluate Top-Level Form**](evaluation.md#current-top-level-form).

This carries over to all commands in Calva which deal with the top level form. Including [custom command snippets](custom-commands.md).

Expand Down Expand Up @@ -126,4 +126,4 @@ But why would you? It is awesome! 😄
#### Only for the Current Form

!!! Note
This treatment only applies to formatting of [the current form](evaluation.md#current-form). With [fold when done](#fold-when-done) as an exception.
This treatment only applies to formatting of [the current form](evaluation.md#current-form). With [fold when done](#fold-when-done) as an exception.

0 comments on commit 250188e

Please sign in to comment.