Skip to content

Instantly share code, notes, and snippets.

@AndrewVos

AndrewVos/.vimrc

Created Sep 12, 2014
Embed
What would you like to do?
if !empty(glob(".git"))
function! GitLsFiles(A,L,P)
let pattern = a:A
if len(pattern) > 0
return split(system("git ls-files \| grep " . pattern), "\n")
else
return split(system("git ls-files"), "\n")
endif
endfunction
command! -complete=customlist,GitLsFiles -nargs=1 Z :edit <args>
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.