Add g:airline#extensions#capslock#symbol

Add help

Add linebreak and default
This commit is contained in:
Freed-Wu 2020-03-17 17:27:30 +08:00
parent 4e2546a209
commit 254d1a2d8d
2 changed files with 4 additions and 1 deletions

View File

@ -9,7 +9,7 @@ if !exists('*CapsLockStatusline')
endif endif
function! airline#extensions#capslock#status() function! airline#extensions#capslock#status()
return tolower(CapsLockStatusline()) == '[caps]' ? 'CAPS' : '' return tolower(CapsLockStatusline()) ==# '[caps]' ? get(g:, 'airline#extensions#capslock#symbol', 'CAPS') : ''
endfunction endfunction
function! airline#extensions#capslock#init(ext) function! airline#extensions#capslock#init(ext)

View File

@ -568,6 +568,9 @@ vim-capslock <https://github.com/tpope/vim-capslock>
* enable/disable vim-capslock integration > * enable/disable vim-capslock integration >
let g:airline#extensions#capslock#enabled = 1 let g:airline#extensions#capslock#enabled = 1
* change vim-capslock symbol >
let g:airline#extensions#capslock#symbol = 'CAPS' (default)
------------------------------------- *airline-coc* ------------------------------------- *airline-coc*
coc <https://github.com/neoclide/coc.nvim> coc <https://github.com/neoclide/coc.nvim>