vimdiffext : An easier way to vim-diff files and directories.
script karma |
Rating 16/9,
Downloaded by 2284 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Yuriy Ershov |
|
script type |
ftplugin |
|
description |
Adds some more handling for diff output.
The most useful probably for multi-file and recursive diffs which are not supported originally.
To use it, just open a patch file or do something like:
$ diff -r -u folder1 folder2 | vim -R -
The added features are:
1. Folds for each individual file and each diff block within.
Since there are no folds originally defined for diff filetype, I added what it made sense for me.
2. A command to open a side-by-side diff mode in a new tab.
The new command is DD (stands for DoDiff) and keymap for it <leader>d (\d for me) in diff file.
To invoke it,
place the cursor on line containing the diff command line:
....
diff [options ...] file1 file2
....
and type :DD
or press \d
... a new tab with side-by-side diff mode will appear.
The files must be accessible by their paths from the current location.
3. Paragraph and section motions: [[ ]] { } move to the next/previous difference/file.
This is the most light-weight and easy solution to compare or sync two folders (recursively) using vim. |
|
install details |
1. Unpack into your vim home directory (~/.vim/ for Unixes, _vim for Windows):
$ cd ~/.vim ; tar zxf ~/Downloads/vimdiffext.tgz
2. Enjoy |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.9.172
|