mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-13 12:23:47 -05:00
Improve docs for Conceal support
This commit is contained in:
@@ -25,6 +25,9 @@ smooth the path to writing prose.
|
||||
* Buffer-scoped configuration (with a few minor exceptions, _pencil_
|
||||
preserves your global settings)
|
||||
* Pure Vimscript with no dependencies
|
||||
* Support for Vim’s 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
|
||||
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
|
||||
|
||||
For syntaxes such as [tpope/markdown][tm] which support Vim’s Conceal
|
||||
feature, you can display \_*italic*\_, \*\*__bold__\*\* and \*\*\*___bold
|
||||
italic___\*\*\* styles where the `_` and `*` characters will be hidden
|
||||
when you’re not on the line. Set the following to `2` to enable automatic
|
||||
hiding:
|
||||
Syntaxes such as [tpope/vim-markdown][tm] support Vim’s Conceal feature,
|
||||
where the `_` and `*` characters will be hidden automatically when
|
||||
displaying \_*italic*\_, \*\*__bold__\*\* and \*\*\*___bold
|
||||
italic___\*\*\* styled text. To enable, set the following to `2` in your
|
||||
`.vimrc`:
|
||||
|
||||
```vim
|
||||
let g:pencil#conceallevel = 2 " 0=disable (def), 1=onechar, 2=autohide
|
||||
```
|
||||
|
||||
A couple of requirements: to display the _italic_, **bold**, and ***bold
|
||||
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.
|
||||
A couple of things you will need:
|
||||
|
||||
For those using Vim in terminal mode, such as with iTerm, you’ll have to
|
||||
read your documentation to determine how to enable bold and italic styles.
|
||||
1. a font (such as [Cousine][co]) featuring the _italic_, **bold**,
|
||||
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 won’t be available.
|
||||
Consult your terminal’s documentation to configure your terminal to
|
||||
support **bold** and _italic_ styles.
|
||||
|
||||
For more details on Vim’s Conceal feature, see:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user