Giter Club home page Giter Club logo

view_diff's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2090

Tags: vimdiff svn subversion diff 

WHY I WRITE IT:
  During daily work, I often need to read the result of "svn diff" before I commit my work into subversion repository. But only reading the diff result is tedious: sometimes I want to read more context lines; sometimes, when I find some mistake I made in my work, I have to open the file and modify the codes there. On the other hand, vim provide a very good way to view the diff of two versions of file, that is vimdiff, I like it! So f we can use it here that will be very useful. But after some web searching, I did not find anything that can help me here. So the script comes out.

HOW TO USE IT:
  Normally I use this script in the following way: 
    1. piped svn diff result to vim, for example: "svn diff | vim - "
    2. use shortcuts to open vimdiff modes on current diff file
    shortcuts: 
        <leader>dv   :   open two versions of file in vimdiff mode
        <leader>df    :   open  the old/new file 
        <leader>dn   :   open next two versions of file in vimdiff mode in svn diff result file
        <leader>dp   :   open previous two versions of file in vimdiff mode in svn diff result file
        <leader>dz   :    fold svn diff result file
    This script work both for svn diff result and normal diff result. 

    There is not more docs till now(maybe more in future), but you can learn this script by trying it :)    

  I need to point out that I am not an experienced vim script programmer and I just want to work out a script that can fulfill my needs. So the codes of script may not be beautiful, but I have used it for several months and it works fine. 

  If you have any comment, bug report, patch, please email it to me(linsong DOT qizi AT gmail DOT com), Thanks. 

  Happy Vimming! 


view_diff's People

Contributors

linsong avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.