VimPlugin: Fugitive: Difference between revisions
From wikinotes
No edit summary |
(→Usage) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<blockquote> | <blockquote> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
| <code>:h fugitive</code> || https://github.com/tpope/vim-fugitive/blob/master/doc/fugitive.txt | |||
|- | |- | ||
| github || https://github.com/tpope/vim-fugitive | | github || https://github.com/tpope/vim-fugitive | ||
Line 19: | Line 21: | ||
= Usage = | = Usage = | ||
<blockquote> | <blockquote> | ||
== | == Index == | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="vim"> | <syntaxhighlight lang="vim"> | ||
" commands | " commands | ||
" ======== | " ======== | ||
:Gstatus | :Gstatus " opens git-status | ||
" hotkeys | " hotkeys | ||
" ======= | " ======= | ||
- | - " toggle git add/untrack (works with multiple files selected) | ||
ca | ca " git commit --amend | ||
cc | cc " git commit | ||
</syntaxhighlight> | |||
You can visually select changes to commit | |||
<syntaxhighlight lang="vim"> | |||
:Gvdiff | |||
" select changes and diffput/diffget | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- | </blockquote><!-- Index --> | ||
== Diff == | == Diff == | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="vim"> | <syntaxhighlight lang="vim"> | ||
:Gvdiffsplit master " side-by-side changes of the file in master | |||
:Git difftool --name-only master... " files changed since master added to quickfix | :Git difftool --name-only master... " files changed since master added to quickfix | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Diff --> | </blockquote><!-- Diff --> | ||
== Service Integrations == | |||
<blockquote> | |||
<syntaxhighlight lang="vim"> | |||
:Gbrowse " show current file in github/gitlab/bitbucket/gitee/pagure/phabricator/azure/devops/sourcehut | |||
</syntaxhighlight> | |||
</blockquote><!-- Service Integrations --> | |||
</blockquote><!-- Usage --> | </blockquote><!-- Usage --> |
Latest revision as of 16:15, 22 July 2022
Documentation
:h fugitive
https://github.com/tpope/vim-fugitive/blob/master/doc/fugitive.txt github https://github.com/tpope/vim-fugitive
Tutorials
vimcasts (5 part series) http://vimcasts.org/blog/2011/05/the-fugitive-series/
Usage
Index
" commands " ======== :Gstatus " opens git-status " hotkeys " ======= - " toggle git add/untrack (works with multiple files selected) ca " git commit --amend cc " git commitYou can visually select changes to commit
:Gvdiff " select changes and diffput/diffgetDiff
:Gvdiffsplit master " side-by-side changes of the file in master :Git difftool --name-only master... " files changed since master added to quickfixService Integrations
:Gbrowse " show current file in github/gitlab/bitbucket/gitee/pagure/phabricator/azure/devops/sourcehut