Coder Social home page Coder Social logo

vim-gitgutter's Introduction

Vim Git Gutter

A Vim plugin which shows a git diff in the 'gutter' (sign column). It shows whether each line has been added, modified, and where lines have been removed.

This is a port of the Git Gutter plugin for Sublime Text 2.

Screenshot

screenshot

In the screenshot above you can see:

  • Line 15 has been modified.
  • Lines 21-24 are new.
  • A line or lines were removed between lines 25 and 26.

Installation

If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:

cd ~/.vim/bundle
git clone git://github.com/airblade/vim-gitgutter.git

FAQ

The colours in the sign column are weird.

The syntax highlighting for your sign column is probably set strangely. Either modify your colorscheme or add this to your ~/.vimrc:

highlight clear SignColumn

Lines removed below a modified line are not shown.

True. This plugin uses Vim's signs which require a sign to be on a line (not between two lines) and only permit one sign per line. Removed lines are signed with an underscore on the line above. If that line has also been modified, the plugin has to choose whether to show the removed-lines sign or the modified-line sign. It prefers the latter.

Alternatives

I'm not aware of any other Vim plugins which (only) show git diffs in the gutter. However these may be of interest:

  • quickfixsigns_vim has a large superset of this functionality.
  • fugitive.vim is a full-on Git wrapper. It doesn't show git diffs in the gutter (ha!) but it does a bazillion other git things.

Intellectual Property

Copyright Andrew Stewart, AirBlade Software Ltd. Released under the MIT licence.

vim-gitgutter's People

Contributors

airblade avatar jspahrsummers avatar twinside avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.