Code Monkey home page Code Monkey logo

sign-diff's Introduction

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

now this plugin supports Windows though cmd.exe shows up at front most...
http://tyru.yu-nagi.com/stash/screencast_vim_sign-diff.swf

diff program for windows here:
  http://gnuwin32.sourceforge.net/packages/diffutils.htm
  http://www.gfd-dennou.org/library/cc-env/diff-win/SIGEN.htm
or see cygwin, mingw.


Usage:
  Commands:
      SDAdd
          add current file to diff list.
          current buffer will be diffed with
          the written file's buffer.
          if you want to change that, see g:SD_comp_with.
      SDUpdate
          update signs.
      SDEnable
          start showing signs.
      SDDisable
          stop showing signs.
      SDToggle
          toggle showing signs.
      SDList
          list all signs in current file


  Global Variables:
      g:SD_backupdir (default:'~/.vim-sign-diff')
          backup directory to save some backup of current file.
          this dir will be mkdir-ed if doesn't exist.

      g:SD_diffopt (default:&diffopt)
          script local value of &diffopt.

      g:SD_diffexpr (default:&diffexpr)
          script local value of &diffopt.

      g:SD_hl_diffadd (default:'DiffAdd')
          highlight group of the added line(s).

      g:SD_hl_diffchange (default:'DiffChange')
          highlight group of the changed line(s).

      g:SD_hl_diffdelete (default:'DiffDelete')
          highlight group of the deleted line(s).

      g:SD_hl_difftext (default:'DiffText')
          highlight group of the one changed line.

      g:SD_sign_add (default:'+')
          sign of the added line(s).

      g:SD_sign_change (default:'*')
          sign of the changed line(s).

      g:SD_sign_delete (default:'-')
          sign of the changed line(s).

      g:SD_sign_text (default:'@')
          sign of the one changed line.
          see :help hl-DiffText

      g:SD_comp_with (default:['written', 'buffer'])
          g:SD_comp_with is List of two items.
          valid items are 'buffer'(same as 1), 'written',
          or number of revisions to revert.
          get diff output like the following.
          (if this value is default)
          $ diff written buffer > output

      g:SD_autocmd_add (default:['BufReadPost'])
          do autocmd for adding signs with these group

      g:SD_autocmd_update (default:['CursorHold', 'InsertLeave'])
          do autocmd for updating signs with these group

      g:SD_delete_files_vimleave (default:1)
          when starting VimLeave event,
          delete all files under g:SD_backupdir.

      g:SD_no_update_within_seconds (default:3)
          won't update within this seconds.
          0 to update each autocmd.
          see g:SD_autocmd_add and g:SD_autocmd_update
          about timing to throw event.


  Tips:
      I suggest the following map.
          nnoremap <C-l>  :SDUpdate<CR><C-l>

sign-diff's People

Contributors

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