-
Notifications
You must be signed in to change notification settings - Fork 10
Fugitive: Vim
Shubham Shukla edited this page Oct 16, 2016
·
2 revisions
####1. Git [args] : Runs any arbitrary git command
-
Commands that don't generate much output are easy to run with Git.
-
Aliases in
.gitconfigwould work with it. -
Git checkout -b example -
Git rm % -
Git mv % target_path -
Git add %
####2. Fugitive provide several commands analogous to the Git commands:
-
Git rm %:Gremove- Delete the current file and the corresponding Vim buffer
-
Git mv % target_path:Gmove target_path- Rename the current file and the corresponding Vim buffer
-
target_pathis relative to current directory and/target_pathwill be relative to the root of the git repository.
-
Git add %:Gwrite- Stage the current file to the index
-
Git checkout %:Gread- Revert current file to last checked in version
####3. Gcommit
-
Opens a separate split window with the commit buffer.
-
Write the message into that and close the buffer to commit your changes.
- Auto-completion.
- As the auto completion picks up the contents of the open buffers, this helps to auto-complete the name of any functions present in the buffers.
:help compl-generic