2021-01-01 20:57:00 +08:00
|
|
|
" MIT License. Copyright (c) 2013-2021 Bailey Ling et al.
|
2019-11-09 02:58:22 +08:00
|
|
|
" Plugin: https://github.com/szw/vim-ctrlspace
|
2015-02-28 10:44:35 +08:00
|
|
|
" vim: et ts=2 sts=2 sw=2
|
|
|
|
|
2016-09-24 08:16:30 +08:00
|
|
|
scriptencoding utf-8
|
|
|
|
|
2020-10-10 01:08:23 +08:00
|
|
|
function! airline#extensions#ctrlspace#statusline(...) abort
|
2019-11-09 02:58:22 +08:00
|
|
|
let spc = g:airline_symbols.space
|
2020-10-10 01:08:23 +08:00
|
|
|
let l:padding = spc . spc . spc
|
2019-11-09 02:58:22 +08:00
|
|
|
let cs = ctrlspace#context#Configuration().Symbols.CS
|
|
|
|
|
2015-02-28 10:44:35 +08:00
|
|
|
let b = airline#builder#new({ 'active': 1 })
|
2020-10-10 01:08:23 +08:00
|
|
|
call b.add_section('airline_b', cs . l:padding . ctrlspace#api#StatuslineModeSegment(l:padding))
|
2015-02-28 10:44:35 +08:00
|
|
|
call b.split()
|
2019-11-09 02:58:22 +08:00
|
|
|
call b.add_section('airline_x', spc . ctrlspace#api#StatuslineTabSegment() . spc)
|
2015-02-28 10:44:35 +08:00
|
|
|
return b.build()
|
|
|
|
endfunction
|
|
|
|
|
2020-10-10 01:08:23 +08:00
|
|
|
function! airline#extensions#ctrlspace#init(ext) abort
|
2016-01-12 20:47:44 +08:00
|
|
|
let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()"
|
2015-02-28 10:44:35 +08:00
|
|
|
endfunction
|