mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-16 22:03:39 -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:
@@ -31,7 +31,11 @@ fun! PencilMode()
|
||||
if b:pencil_wrap_mode ==# s:WRAP_MODE_SOFT
|
||||
return get(g:pencil#mode_indicators, 'soft', 'S')
|
||||
elsei b:pencil_wrap_mode ==# s:WRAP_MODE_HARD
|
||||
return get(g:pencil#mode_indicators, 'hard', 'H')
|
||||
if &fo =~ 'a'
|
||||
return get(g:pencil#mode_indicators, 'auto', 'A')
|
||||
el
|
||||
return get(g:pencil#mode_indicators, 'hard', 'H')
|
||||
en
|
||||
el
|
||||
return get(g:pencil#mode_indicators, 'off', '')
|
||||
en
|
||||
@@ -135,9 +139,9 @@ en
|
||||
if !exists('g:pencil#mode_indicators')
|
||||
" used to set PencilMode() for statusline
|
||||
if s:unicode_enabled()
|
||||
let g:pencil#mode_indicators = {'hard': '␍', 'soft': '⤸', 'off': '',}
|
||||
let g:pencil#mode_indicators = {'hard': '␍', 'auto': 'ª', 'soft': '⤸', 'off': '',}
|
||||
el
|
||||
let g:pencil#mode_indicators = {'hard': 'H', 'soft': 'S', 'off': '',}
|
||||
let g:pencil#mode_indicators = {'hard': 'H', 'auto': 'A', 'soft': 'S', 'off': '',}
|
||||
en
|
||||
en
|
||||
|
||||
|
||||
Reference in New Issue
Block a user