Created
November 19, 2015 09:03
-
-
Save drasill/ff9b94025dc8aa7e404f to your computer and use it in GitHub Desktop.
vim : git ls-file + fzf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:escape(path) | |
return substitute(a:path, ' ', '\\ ', 'g') | |
endfunction | |
function! GitLsHandler(line) | |
execute 'e '. s:escape(a:line) | |
endfunction | |
command! -nargs=* Fgl call fzf#run({ | |
\ 'source': 'git ls-files -o -c --exclude-standard "<args>"', | |
\ 'sink': function('GitLsHandler'), | |
\ 'options': '+m', | |
\ 'tmux_height': '60%' | |
\ }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use it with vim-plug :