mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-15 21:33:47 -05:00
Additional indicator tweaking for #6
This commit is contained in:
@@ -283,7 +283,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': '✎ h', 'soft': '✎ s', 'off': '✎ ×',}
|
let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',}
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that `PencilMode()` will return blank for buffers in which _pencil_
|
Note that `PencilMode()` will return blank for buffers in which _pencil_
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ endf
|
|||||||
fun! PencilMode()
|
fun! PencilMode()
|
||||||
if exists('b:pencil_wrap_mode')
|
if exists('b:pencil_wrap_mode')
|
||||||
if b:pencil_wrap_mode ==# s:WRAP_MODE_SOFT
|
if b:pencil_wrap_mode ==# s:WRAP_MODE_SOFT
|
||||||
return get(g:pencil#mode_indicators, 'soft', 'sp')
|
return get(g:pencil#mode_indicators, 'soft', 'soft')
|
||||||
elsei b:pencil_wrap_mode ==# s:WRAP_MODE_HARD
|
elsei b:pencil_wrap_mode ==# s:WRAP_MODE_HARD
|
||||||
return get(g:pencil#mode_indicators, 'hard', 'hp')
|
return get(g:pencil#mode_indicators, 'hard', 'hard')
|
||||||
el
|
el
|
||||||
return get(g:pencil#mode_indicators, 'off', '')
|
return get(g:pencil#mode_indicators, 'off', 'off')
|
||||||
en
|
en
|
||||||
else
|
else
|
||||||
return ''
|
return '' " should be blank for non-prose modes
|
||||||
en
|
en
|
||||||
endf
|
endf
|
||||||
|
|
||||||
@@ -122,9 +122,9 @@ 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': '✎ h', 'soft': '✎ s', 'off': '✎ ×',}
|
let g:pencil#mode_indicators = {'hard': '✐ hard', 'soft': '✎ soft', 'off': '✎ off',}
|
||||||
el
|
el
|
||||||
let g:pencil#mode_indicators = {'hard': 'ph', 'soft': 'ps', 'off': 'px',}
|
let g:pencil#mode_indicators = {'hard': 'hard', 'soft': 'soft', 'off': 'off',}
|
||||||
en
|
en
|
||||||
en
|
en
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user