mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-16 05:43:47 -05:00
Added 'auto' mode indicator to fix #18
An indicator to show that Vim's autoformat is activated while in HardPencil mode.
This commit is contained in:
@@ -375,12 +375,22 @@ or if using [bling/vim-airline][va]:
|
||||
let g:airline_section_x = '%{PencilMode()}'
|
||||
```
|
||||
|
||||
If you don’t like the default indicators, you can specify different ones:
|
||||
The default indicators now include ‘auto’ for when Vim’s autoformat is
|
||||
activated in hard line break mode.
|
||||
|
||||
```vim
|
||||
let g:pencil#mode_indicators = {'hard': '␍', 'soft': '⤸', 'off': '',}
|
||||
let g:pencil#mode_indicators = {'hard': 'H', 'auto': 'A', 'soft': 'S', 'off': '',}
|
||||
```
|
||||
|
||||
If Unicode is detected, the default indicators are:
|
||||
|
||||
```vim
|
||||
let g:pencil#mode_indicators = {'hard': '␍', 'auto': 'ª', 'soft': '⤸', 'off': '',}
|
||||
```
|
||||
|
||||
If you don’t like the default indicators, you can specify your own in
|
||||
your `.vimrc`.
|
||||
|
||||
Note that `PencilMode()` will return blank for buffers in which _pencil_
|
||||
has not been initialized.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user