Add GitRoot command

This commit is contained in:
Talia 2018-08-01 14:52:32 +02:00
parent 5dd8daf460
commit 5e150d5b81

1
vimrc
View file

@ -518,6 +518,7 @@ command! GitLast call <sid>git_last() | call s:git_info()
command! GitInfo call <sid>git_info() command! GitInfo call <sid>git_info()
command! -nargs=1 GitCheckout call <sid>file_at_revision(<f-args>) command! -nargs=1 GitCheckout call <sid>file_at_revision(<f-args>)
command! -nargs=? GitCompare call <sid>git_diff(<f-args>) command! -nargs=? GitCompare call <sid>git_diff(<f-args>)
command! GitRoot exec 'cd '.system('git rev-parse --show-toplevel')
" === FILE STUFF === " === FILE STUFF ===