mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 09:58:29 +08:00
parent
dc7d991007
commit
54584a2bb2
|
@ -8,7 +8,8 @@ if !airline#util#has_fugitive()
|
|||
endif
|
||||
|
||||
|
||||
if exists("+autochdir") && &autochdir == 1
|
||||
let s:has_autochdir = exists("+autochdir") && &autochdir
|
||||
if s:has_autochdir
|
||||
let s:fmod = ':p'
|
||||
else
|
||||
let s:fmod = ':.'
|
||||
|
@ -33,12 +34,12 @@ function! airline#extensions#fugitiveline#bufname()
|
|||
if empty(b:fugitive_name)
|
||||
return fnamemodify(bufname('%'), s:fmod)
|
||||
else
|
||||
return fnamemodify(b:fugitive_name, s:fmod)
|
||||
return fnamemodify(b:fugitive_name, s:fmod). " [git]"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#fugitiveline#init(ext)
|
||||
if exists("+autochdir") && &autochdir == 1
|
||||
if s:has_autochdir
|
||||
" if 'acd' is set, vim-airline uses the path section, so we need to redefine this here as well
|
||||
call airline#parts#define_raw('path', '%<%{airline#extensions#fugitiveline#bufname()}%m')
|
||||
else
|
||||
|
|
|
@ -599,6 +599,9 @@ It is deactivated by default if |airline-bufferline| is activated.
|
|||
* enable/disable bufferline integration >
|
||||
let g:airline#extensions#fugitiveline#enabled = 1
|
||||
<
|
||||
If enabled, the buffer that comes from fugitive, will have added a trailing
|
||||
"[git]" to be able do distinguish between fugitive and non-fugitive buffers.
|
||||
|
||||
------------------------------------- *airline-grepper*
|
||||
vim-grepper <https://github.com/mhinz/vim-grepper>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user