GitXplorerGitXplorer
m

vim-diffstat

public
4 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
bfb249c770c44175eb77789bf1336092dba6daab

Now resizes when possible

mmpetrov committed 12 years ago
Unverified
bfe200599fcef85b39e9b53c979e9409f8b06bfd

Updated documentation

mmpetrov committed 12 years ago
Unverified
8e747b532bbcfcc65293ab2d749509d2e5579b3a

Update README.md

mmpetrov committed 12 years ago
Unverified
41c4cb16497cbf783d0106443a080ed428d3fdd1

Added screencap

mmpetrov committed 12 years ago
Unverified
60f32447c85952dca3deb65c8374ac6361a53874

Updated documentation

mmpetrov committed 12 years ago
Unverified
a70e094e2adc649af3969412f61fd620c51e52ab

lots of bugfixes

mmpetrov committed 12 years ago

README

The README file for this repository.

DiffStat

Introduction

DiffStat is a plugin that runs git diff --stat in a new Vim window. It allows for easy file navigation, by jumping to the file under the cursor when Enter is pressed.

The standard command line returns paths relative to the git toplevel directory, not the working directory. It also simplifies paths, which breaks jumping by file names. This plugin aims to correct those two problems, while displaying the output in a syntax-highlighted 80-character window.

This plugin also integrates with Fugitive, allowing one to easily jump to, or diff against, other revisions.

Installation

It's recommended that you install the plugin using Pathogen or Vundle. After the plugin is installed update your help tags and see :help DiffStat for instructions on how to use and configure the plugin.

Usage

This plugin can be invoked using the :DiffStat command. When inside a repo, run :DiffStat [commits..] to open the DiffStat window. See :help DiffStat-usage for more details.

An example of this would be :DiffStat HEAD~1 to view a diff against the parent of the current tip.

The following key mappings are supported when the cursor is over a file:

  • <cr> (Enter) - Jumps to the file.
  • D - Opens a diff of the file against a particular revision. (Requires Fugitive)
  • e - Opens the file against a particular revision. (Requires Fugitive)

Mapping

One can easily remap <leader>d, for example, to view the last couple commit points by adding the following to you .vimrc: noremap <leader>d :DiffStat HEAD HEAD..HEAD~1 HEAD~1..HEAD~2<cr>

Screenshots

Using :DiffStat HEAD HEAD~1 on the OpenJDK7 source: DiffStat Screenshot