Created
October 6, 2014 10:40
-
-
Save AndrewVos/b221f846eef93ead54a2 to your computer and use it in GitHub Desktop.
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
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