Add GitFiles command

This commit is contained in:
Ilia Choly
2015-10-30 12:05:54 -04:00
committed by Ilia Choly
parent 0e995e1913
commit 1a2d597045
4 changed files with 15 additions and 0 deletions

View File

@@ -323,6 +323,18 @@ function! fzf#vim#history(...)
\}, a:000)
endfunction
" ------------------------------------------------------------------
" GitFiles
" ------------------------------------------------------------------
function! fzf#vim#gitfiles(...)
call s:fzf({
\ 'source': 'git ls-tree --name-only -r HEAD',
\ 'sink*': s:function('s:common_sink'),
\ 'options': '--prompt "GitFiles> " -m'.s:expect(),
\}, a:000)
endfunction
" ------------------------------------------------------------------
" Buffers
" ------------------------------------------------------------------