GithubHelp home page GithubHelp logo

jsit / conflict-sleuth.vim Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 3 KB

Vim Conflict Sleuth: Examine 3-way merge conflicts in multiple tabs in Vim

Vim Script 100.00%
vim conflict-resolution plugin git

conflict-sleuth.vim's Introduction

Introduction

conflict-sleuth.vim allows you to examine a gnarly merge conflict in multiple tabs:

The first tab contains BASE and LOCAL files in the top half, diff'd against each other.

The second tab contains BASE and REMOTE files in the top half, diff'd against each other.

The lower half of each tab is the MERGED file that you write to in order to resolve the conflict.

This plugin also adds syntax highlighting for an additional conflict filetype, which the MERGED file is set to.

Usage

The function ConflictSleuth() takes four arguments:

  1. The Merged file
  2. The Base File
  3. The Local file
  4. The Remote file

An easy way to set this up is to add this to your .gitconfig:

[mergetool "conflict-sleuth"]

	cmd = vim -c \"ConflictSleuth $MERGED $BASE $LOCAL $REMOTE\"
	trustExitCode = false

When a conflict occurs, run git mergetool -t conflict-sleuth.

The function CSRotateDiff() changes which files in the current tab are diff'd against each other -- BASE vs. LOCAL/REMOTE, BASE vs. MERGED, or LOCAL/REMOTE vs. MERGED.

The function CSToggleFiller() toggles whether Vim's diff options use filler lines for missing text.

Remaps

The following remaps are added by default:

  • <leader>d: CSRotateDiff()
  • <leader>f: CSToggleFiller()

conflict-sleuth.vim's People

Contributors

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