mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-22 01:28:26 +08:00
[update] gina's extensions in extensions dir
fix typo and add section_b [add] extension gina [add] unstaged extensions [fix] typo [Done] gina refactoring [fix] document [fix] gina's spell [add] abort
This commit is contained in:
20
autoload/airline/extensions/gina.vim
Normal file
20
autoload/airline/extensions/gina.vim
Normal file
@@ -0,0 +1,20 @@
|
||||
scriptencoding utf-8
|
||||
if !get(g:, 'loaded_gina', 0)
|
||||
finish
|
||||
endif
|
||||
|
||||
function! airline#extensions#gina#apply(...) abort
|
||||
if (&ft =~# 'gina' && &ft !~# 'blame') || &ft ==# 'diff'
|
||||
call a:1.add_section('airline_a', ' gina ')
|
||||
call a:1.add_section('airline_b', ' %{gina#component#repo#branch()} ')
|
||||
call a:1.split()
|
||||
call a:1.add_section('airline_y', ' staged %{gina#component#status#staged()} ')
|
||||
call a:1.add_section('airline_z', ' unstaged %{gina#component#status#unstaged()} ')
|
||||
return 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#gina#init(ext) abort
|
||||
let g:gina_force_overwrite_statusline = 0
|
||||
call a:ext.add_statusline_func('airline#extensions#gina#apply')
|
||||
endfunction
|
||||
Reference in New Issue
Block a user