Skip to content

dsummersl/vim-diffundo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-diffundo

Open a vertical diffsplit against a files undo history, and quickly pull changes from your undo history into your current buffer.

Installation

Use your favorite package manager to install this plugin. For instance:

Plug 'dsummersl/vim-diffundo'

Commands

:DiffEarlier : compare your current buffer against the buffer if you had typed :earlier. Accepts the same parameters as the builtin :earlier command.

:DiffLater : compare your current buffer against the buffer if you had typed :later. Accepts the same parameters as the builtin :later command.

:DiffSearch : search your undo history for the addition of <needle> and open a vertical diffsplit against that undo version and your current buffer.

Setup

Example setup:

" Diff against last undo:
map <leader>uu :DiffEarlier<cr>
map <leader>rr :DiffLater<cr>

" Diff against last time this buffer was written:
map <leader>uf :DiffEarlier 1f<cr>
map <leader>rf :DiffLater 1f<cr>

" Make commands Repeatable (with kreskij/Repeatable.vim):
Repeatable map <leader>uf :DiffEarlier 1f<cr>
Repeatable map <leader>rf :DiffLater 1f<cr>

About

Vim plugin to quickly open diff splits against your undo history.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published