VimPlugin: Fugitive: Difference between revisions

From wikinotes
 
(3 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>
== Git Index ==
== Index ==
<blockquote>
<blockquote>
<syntaxhighlight lang="vim">
<syntaxhighlight lang="vim">
Line 33: Line 35:
cc        " git commit
cc        " git commit
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Git Index -->
 
You can visually select changes to commit
<syntaxhighlight lang="vim">
:Gvdiff
" select changes and diffput/diffget
</syntaxhighlight>
</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 commit

You can visually select changes to commit

:Gvdiff
" select changes and diffput/diffget

Diff

:Gvdiffsplit master                  " side-by-side changes of the file in master
:Git difftool --name-only master...  " files changed since master added to quickfix

Service Integrations

:Gbrowse   " show current file in github/gitlab/bitbucket/gitee/pagure/phabricator/azure/devops/sourcehut