This file contains 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
" Lightweight alternative to vim-fugitive: | |
" The following `:Git` command looks up the Git repository of the current file, | |
" and launches `git` in the root directory of that repository. This way, you can | |
" launch vim anywhere outside the Git repository, and, e.g. have open files from | |
" multiple Git repositories, and `:Git <args>` command always points to the | |
" right repository. | |
" One thing to note, however, is that "%" doesn't necessarily point to a correct | |
" path (so for example `:Git commit %` might not work), but in this case "%:p" | |
" should be one way to work around the issue. |