mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-14 04:43: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:
|
||||
|
||||
```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_
|
||||
|
||||
@@ -29,14 +29,14 @@ endf
|
||||
fun! PencilMode()
|
||||
if exists('b:pencil_wrap_mode')
|
||||
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
|
||||
return get(g:pencil#mode_indicators, 'hard', 'hp')
|
||||
return get(g:pencil#mode_indicators, 'hard', 'hard')
|
||||
el
|
||||
return get(g:pencil#mode_indicators, 'off', '')
|
||||
return get(g:pencil#mode_indicators, 'off', 'off')
|
||||
en
|
||||
else
|
||||
return ''
|
||||
return '' " should be blank for non-prose modes
|
||||
en
|
||||
endf
|
||||
|
||||
@@ -122,9 +122,9 @@ en
|
||||
if !exists('g:pencil#mode_indicators')
|
||||
" used to set PencilMode() for statusline
|
||||
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
|
||||
let g:pencil#mode_indicators = {'hard': 'ph', 'soft': 'ps', 'off': 'px',}
|
||||
let g:pencil#mode_indicators = {'hard': 'hard', 'soft': 'soft', 'off': 'off',}
|
||||
en
|
||||
en
|
||||
|
||||
|
||||
Reference in New Issue
Block a user