mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-14 04:43:47 -05:00
Switch to single-char indicators
There were problems with double-width indicator characters not displaying correctly when editing.
This commit is contained in:
@@ -27,8 +27,8 @@ smooth the path to writing prose.
|
|||||||
preserves your global settings)
|
preserves your global settings)
|
||||||
* Support for Vim’s Conceal feature to hide markup defined by Syntax
|
* Support for Vim’s Conceal feature to hide markup defined by Syntax
|
||||||
plugins (e.g., `_` and `*` markup for styled text in \_*Markdown*\_)
|
plugins (e.g., `_` and `*` markup for styled text in \_*Markdown*\_)
|
||||||
* Support for display of mode indicator (`✐ hard` or `✎ soft`, e.g.) in
|
* Support for display of mode indicator (`␍` and `⤸`, e.g.) in the status
|
||||||
the status line
|
line
|
||||||
* Pure Vimscript with no dependencies
|
* Pure Vimscript with no dependencies
|
||||||
|
|
||||||
Need spell-check and other features? Vim is about customization. To
|
Need spell-check and other features? Vim is about customization. To
|
||||||
@@ -291,7 +291,7 @@ terminal to support **bold** and _italic_ styles.
|
|||||||
## Status line indicator
|
## Status line indicator
|
||||||
|
|
||||||
Your status line can reflect the wrap mode for _pencil_ buffers. For
|
Your status line can reflect the wrap mode for _pencil_ buffers. For
|
||||||
example, `✐ hard` to represent `HardPencil` (hard line break) mode. To
|
example, `␍` to represent `HardPencil` (hard line break) mode. To
|
||||||
configure your status line, add to your `.vimrc`:
|
configure your status line, add to your `.vimrc`:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
@@ -307,7 +307,7 @@ let g:airline_section_x = '%{PencilMode()}'
|
|||||||
If you don’t like the default indicators, you can specify different ones:
|
If you don’t like the default indicators, you can specify different ones:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',}
|
let g:pencil#mode_indicators = {'hard': '␍', 'soft': '⤸', 'off': '',}
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that `PencilMode()` will return blank for buffers in which _pencil_
|
Note that `PencilMode()` will return blank for buffers in which _pencil_
|
||||||
|
|||||||
@@ -136,9 +136,10 @@ en
|
|||||||
if !exists('g:pencil#mode_indicators')
|
if !exists('g:pencil#mode_indicators')
|
||||||
" used to set PencilMode() for statusline
|
" used to set PencilMode() for statusline
|
||||||
if s:unicode_enabled()
|
if s:unicode_enabled()
|
||||||
let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',}
|
let g:pencil#mode_indicators = {'hard': '␍', 'soft': '⤸', 'off': '',}
|
||||||
|
"let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',}
|
||||||
el
|
el
|
||||||
let g:pencil#mode_indicators = {'hard': 'hard', 'soft': 'soft', 'off': 'off',}
|
let g:pencil#mode_indicators = {'hard': 'hard', 'soft': 'soft', 'off': '',}
|
||||||
en
|
en
|
||||||
en
|
en
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user