Questions tagged [vimdiff]

21 questions
59
votes
4 answers

vimdiff: Jump to next difference inside line?

vimdiff is very handy for comparing files. However, I often use it on files with long lines and relatively few differences inside the lines. vimdiff will correctly highlight differences inside a line (whole line pink, differing characters red). In…
sleske
  • 23,525
52
votes
3 answers

Make vimdiff show entire file

How can you have vimdiff show the entire contents of the files being differenced? I'd like the color highlights of the differences, but would still like to see the entire files, i.e. the parts that are identical as well.
36
votes
3 answers

How do I only dp or do just the lines, not the entire block in Vim diff?

I'm currently using MacVim (Snapshot 64) "Split Diff by..." menu option. The file is Django's my settings.py from version 1.3.1 to a fresh file from version 1.4. I know two basic commands do to "obtain" (and replace) a block from the other…
hobbes3
  • 1,041
  • 5
  • 14
  • 22
30
votes
1 answer

Can't run Vimdiff (7.4) on Windows 7

I recently installed the 7.4 version of gVim on a Windows 7 machine. Trying to diff two files from the context-sensitive menu on Windows Explorer, I keep getting the error messages: E810: Cannot read or write temp files E97: Cannot create…
ysap
  • 2,730
18
votes
3 answers

vim: diff two sections in two files, but not the entire file?

I upgraded a system from Nagios 2 to Nagios 3, and now I am comparing some differences in the old and new configuration files. There are significant changes to the configuration files, and I do not want to perform a diff on the entire file because…
8
votes
5 answers

Vimdiff and git all at once

I use vimdiff as my difftool with git. Let's say that I've changed twelve files. The problem is that sometimes I run git diff and around the fourth or fifth file I see something that I want to edit/change. Sometimes I need to make a few more changes…
So8res
  • 1,539
6
votes
1 answer

Git fails to launch Vim in Cygwin

I have Git working with Vim in a Powershell environment on my work laptop (Windows 7). It pops up Vim when I commit or use my git vimdiff alias. I have attempted the same setup under Cygwin (being a Unix guy at heart) but when I type git commit or…
Kazark
  • 3,509
5
votes
3 answers

Various methods of trying to set up a git diff tool lead to "fatal: cannot exec [...] : Bad address"

I'm on Linux Mint 17 64-bit. Just purged git and re-installed with apt. Deleted ~/.gitconfig. Only configuration I do after supposedly fresh install is (while inside a repo) git config diff.tool vimdiff Then I run git difftool…
5
votes
3 answers

Change color scheme when calling vimdiff inside Vim

I'm using the VCSCommand plugin. I'm calling VimDiff utility inside Vim by calling :VCSVimDiff. I have in my vimrc: if &diff set t_Co=256 set background=dark colorscheme peaksea else colorscheme molokai endif It works when I call…
4
votes
2 answers

Is there a quick way to horizontally scroll in VimDiff with word-wrap?

VimDiff seems to be a useful tool, but I can't seem to find a way of quickly and efficiently scrolling horizontally when word-wrap is set to "off". I am currently using "zh" and "zl" but they only work per click. I'd rather not use sublime for…
3
votes
1 answer

Key to close a fold in vimdiff?

Pressing spacebar on a + fold in vim in diff mode causes the fold to open. What and where do I key if I want to close the fold again?
3
votes
1 answer

Diff bar appears on normal editing mode after running vimdiff

Even after closing all instances of vim and vimdiff, when I open two files on a split window (:vsp other_file), a bar appears at the left of the screen, where vimdiff shows diff locations. How do I remove it and prevent it from appearing again when…
Plinio
  • 151
3
votes
1 answer

Is there a way to vim diff only certain blocks in two files?

I use vimdiff as my preferred diff tool. I wonder if there is a way to vimdiff only certain blocks between two files (preferably without a plugin). e.g. Comparing file1.py getValues() fn between line 14 - 26 to getValues() fn in file2.py between…
ankitj
  • 145
2
votes
1 answer

Vimdiff functionality in Sublime Text 2

I wanted to know if it is possible to have a vimdiff like functionality to check for diff and have synchronized scrolling of two (or more) files in Sublime Text 2 just like vimdiff? Thanks
2
votes
2 answers

show differences between file and file in (compressed) tar archive

Say I have unpacked a gz-compressed tar file, and do not remember what changes I made to the unpacked files, or I archived a folder a while ago and want to know what has changed to the files since. I can use tar -zd to get an overview. Then, say it…
Kyss Tao
  • 123
1
2