-
Notifications
You must be signed in to change notification settings - Fork 0
Perform an interactive diff on two blocks of text
vim-scripts/linediff.vim
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a mirror of http://www.vim.org/scripts/script.php?script_id=3745 This plugin provides a simple command, ":Linediff", which is used to diff two separate blocks of text. Here's 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 doesn't save the original buffer, just performs the change. Saving is something you should do later on yourself. 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. The code is hosted on github, at http://github.com/AndrewRadev/linediff.vim. To report any bugs, send patches or suggest features, please use github's issue tracker: http://github.com/AndrewRadev/linediff.vim/issues.
About
Perform an interactive diff on two blocks of text
Resources
Stars
Watchers
Forks
Packages 0
No packages published