All Projects → AndrewRadev → Linediff.vim

AndrewRadev / Linediff.vim

A vim plugin to perform diffs on blocks of code

Projects that are alternatives of or similar to Linediff.vim

cartunes
Simple comparison app for iRacing car setups.
Stars: ✭ 18 (-94.56%)
Mutual labels:  diff
Vue Code Diff
vue文件差异对比
Stars: ✭ 271 (-18.13%)
Mutual labels:  diff
Dyff
/ˈdʏf/ - diff tool for YAML files, and sometimes JSON
Stars: ✭ 277 (-16.31%)
Mutual labels:  diff
Refactoring Code Smells
♻️ Example projects illustrating Code Smells in order to apply Refactoring techniques
Stars: ✭ 255 (-22.96%)
Mutual labels:  refactoring
Phpdeprecationdetector
Analyzer of PHP code to search issues with deprecated functionality in newer interpreter versions.
Stars: ✭ 263 (-20.54%)
Mutual labels:  refactoring
Repren
Rename anything
Stars: ✭ 275 (-16.92%)
Mutual labels:  refactoring
difftastic
a syntax-aware diff 🟥🟩
Stars: ✭ 1,701 (+413.9%)
Mutual labels:  diff
Reorder python imports
Rewrites source to reorder python imports
Stars: ✭ 320 (-3.32%)
Mutual labels:  refactoring
Diff
A library for diffing golang structures
Stars: ✭ 266 (-19.64%)
Mutual labels:  diff
Multidiff
Binary data diffing for multiple objects or streams of data
Stars: ✭ 282 (-14.8%)
Mutual labels:  diff
Ace Diff
A diff/merging wrapper for Ace Editor built on google-diff-match-patch
Stars: ✭ 257 (-22.36%)
Mutual labels:  diff
Differencekit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection.
Stars: ✭ 2,986 (+802.11%)
Mutual labels:  diff
Php Ide Serenata
Atom IDE package that integrates the Serenata server to provide PHP code assistance
Stars: ✭ 277 (-16.31%)
Mutual labels:  refactoring
diff2HtmlCompare
Side-by-side diff shown in HTML
Stars: ✭ 103 (-68.88%)
Mutual labels:  diff
Diff2html Cli
Pretty diff to html javascript cli (diff2html-cli)
Stars: ✭ 287 (-13.29%)
Mutual labels:  diff
VS.DiffAllFiles
Visual Studio Extension to make comparing files before and after committing them to Git and TFS faster and easier.
Stars: ✭ 26 (-92.15%)
Mutual labels:  diff
Pgquarrel
pgquarrel compares PostgreSQL database schemas (DDL)
Stars: ✭ 274 (-17.22%)
Mutual labels:  diff
Jsinspect
Detect copy-pasted and structurally similar code
Stars: ✭ 3,379 (+920.85%)
Mutual labels:  refactoring
Emacs Refactor
language-specific refactoring in Emacs
Stars: ✭ 313 (-5.44%)
Mutual labels:  refactoring
Editscript
A library designed to diff and patch Clojure data structures
Stars: ✭ 281 (-15.11%)
Mutual labels:  diff

GitHub version Build Status

The linediff plugin provides a simple command, :Linediff, which is used to diff two separate blocks of text.

Demo

A simple example:

def one
  two
end

def two
  three
end

If we mark the first three lines, starting from def one, in visual mode, and execute the :Linediff command, the signs 1- will be placed at the start and at the end of the visual mode's range. Doing the same thing on the bottom half of the code, starting from def two, will result in the signs 2- placed there. After that, a new tab will be opened with the two blocks of code in vertical splits, diffed against each other.

The two buffers are temporary, but when any one of them is saved, its original buffer is updated. Note that this does not save the original buffer, just performs the change. Saving is something you should do later.

Executing the command :LinediffReset will delete the temporary buffers and remove the signs.

Executing a new :Linediff will do the same as :LinediffReset, but will also initiate a new diff process.

For more commands and different workflows, you should read the full documentation with :help linediff

Note that you shouldn't linediff two pieces of text that overlap. Not that anything horribly bad will happen, it just won't work as you'd hope to. I don't feel like it's a very important use case, but if someone requests sensible behaviour in that case, I should be able to get it working.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].