Improve docs for Conceal support

This commit is contained in:
Reed Esau
2014-08-22 00:34:37 -06:00
parent e7d12db91a
commit 0b9b38e877

View File

@@ -25,6 +25,9 @@ smooth the path to writing prose.
* Buffer-scoped configuration (with a few minor exceptions, _pencil_ * Buffer-scoped configuration (with a few minor exceptions, _pencil_
preserves your global settings) preserves your global settings)
* Pure Vimscript with no dependencies * Pure Vimscript with no dependencies
* Support for Vims Conceal feature to hide `_` and `*` characters when
displaying \_*italic*\_, \*\*__bold__\*\* and \*\*\*___bold
italic___\*\*\* styled text in Markdown
Need spell-check and other features? Vim is about customization. To Need spell-check and other features? Vim is about customization. To
complete your editing environment, learn to configure Vim and draw upon complete your editing environment, learn to configure Vim and draw upon
@@ -219,24 +222,27 @@ let g:pencil#cursorwrap = 1 " 0=disable, 1=enable (def)
### Concealing markup in Markdown ### Concealing markup in Markdown
For syntaxes such as [tpope/markdown][tm] which support Vims Conceal Syntaxes such as [tpope/vim-markdown][tm] support Vims Conceal feature,
feature, you can display \_*italic*\_, \*\*__bold__\*\* and \*\*\*___bold where the `_` and `*` characters will be hidden automatically when
italic___\*\*\* styles where the `_` and `*` characters will be hidden displaying \_*italic*\_, \*\*__bold__\*\* and \*\*\*___bold
when youre not on the line. Set the following to `2` to enable automatic italic___\*\*\* styled text. To enable, set the following to `2` in your
hiding: `.vimrc`:
```vim ```vim
let g:pencil#conceallevel = 2 " 0=disable (def), 1=onechar, 2=autohide let g:pencil#conceallevel = 2 " 0=disable (def), 1=onechar, 2=autohide
``` ```
A couple of requirements: to display the _italic_, **bold**, and ***bold A couple of things you will need:
italic*** styles in Vim, you will need both a font (such as [Cousine][co])
featuring those style variants as well as a colorscheme (such as
[reedes/vim-colors-pencil][cp]) which supports the Markdown-specific
highlight groups.
For those using Vim in terminal mode, such as with iTerm, youll have to 1. a font (such as [Cousine][co]) featuring the _italic_, **bold**,
read your documentation to determine how to enable bold and italic styles. and ***bold italic*** style variants
2. a colorscheme (such as [reedes/vim-colors-pencil][cp]) which
supports the Markdown-specific highlight groups.
Terminal users: sadly, the ***bold italic*** style wont be available.
Consult your terminals documentation to configure your terminal to
support **bold** and _italic_ styles.
For more details on Vims Conceal feature, see: For more details on Vims Conceal feature, see: