README edit

Edited the addition regarding Pygments.
This commit is contained in:
Chris Lane 2019-01-11 15:13:41 -05:00
parent 95843e4674
commit 6b796adaf7
1 changed files with 6 additions and 2 deletions

View File

@ -109,13 +109,16 @@ export CHEATPATH="$CHEATPATH:/path/to/more/cheats"
You may view which directories are on your `CHEATPATH` with `cheat -d`. You may view which directories are on your `CHEATPATH` with `cheat -d`.
### Enabling Syntax Highlighting ### ### Enabling Syntax Highlighting ###
`cheat` can optionally apply syntax highlighting to your cheatsheets. To can use this feature is `cheat` can optionally apply syntax highlighting to your cheatsheets. To
neccessary to install the package [Pygments](http://pygments.org/). To enable syntax highlighting, export a `CHEATCOLORS` environment variable: enable syntax highlighting, export a `CHEATCOLORS` environment variable:
```sh ```sh
export CHEATCOLORS=true export CHEATCOLORS=true
``` ```
Note that [pygments][] must be installed on your system for this to work.
#### Specifying a Syntax Highlighter #### #### Specifying a Syntax Highlighter ####
You may manually specify which syntax highlighter to use for each cheatsheet by You may manually specify which syntax highlighter to use for each cheatsheet by
wrapping the sheet's contents in a [Github-Flavored Markdown code-fence][gfm]. wrapping the sheet's contents in a [Github-Flavored Markdown code-fence][gfm].
@ -145,4 +148,5 @@ See Also:
[dotfiles]: http://dotfiles.github.io/ [dotfiles]: http://dotfiles.github.io/
[gfm]: https://help.github.com/articles/creating-and-highlighting-code-blocks/ [gfm]: https://help.github.com/articles/creating-and-highlighting-code-blocks/
[installing]: https://github.com/chrisallenlane/cheat/wiki/Installing [installing]: https://github.com/chrisallenlane/cheat/wiki/Installing
[pygments]: http://pygments.org/
[related-projects]: https://github.com/chrisallenlane/cheat/wiki/Related-Projects [related-projects]: https://github.com/chrisallenlane/cheat/wiki/Related-Projects