/vim-flayouts

flayouts.vim - Layouts for Fugitive

Primary LanguageVim script

flayouts.vim - Layouts for Fugitive

Flayouts.vim aims to ease work with Fugitive by providing window layouts for certain operations, such as:

  • Commit

  • Pull Request review

  • Conflict Resolution

:GlstatusTab - a "Commit" layout.

  • Run :GlstatusTab(or :Glc)
  • Review diff
  • Jump to "status" window
  • Press - to add/remove files
  • Run :Git diff or :Git diff --cached in a diff window to update diff
  • Press C in "status" window to enter a commit message
  • Run :Glcommit(or :Glc again) to commit
  • Run :Glabort to cancel commit and close tab

:GlpullRequestSummaryTab - a "Pull Request Review" layout.
  • Run :GlpullRequestSummaryTab origin/master or :GlpullRequestCommitsTab origin/master
  • Review diff
  • Run :GlopenFromDiff with your cursor on diff chunk to open corresponding file and line
  • Run :Gblame to show "git-blame" of current file
  • Press o on commit SHA to open commit where chunk was added.

:GlresolveConflictTab - a "Resolve Conflict" layout.
  • Run :GlresolveConflictTab
  • Compare "HEAD"(ours) versions and "MERGE"(theirs) version
  • Resolve conflict on "both modified" version
  • Run :Glwrite on "both modified" version to add file to index and close tab

All available commands and their description can be found here: https://github.com/vrybas/vim-flayouts/blob/master/doc/flayouts.txt

Installation

Bundle 'tpope/vim-fugitive'
Bundle 'vrybas/vim-flayouts'

License

Copyright (c) Vladimir Rybas.