Skip to content
0:00 / 0:00

#vim#vimdiff#git

Vim universe. Vim as a diff tool

Alexey Samoshkin

1.1K subscribers • 3 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

5.2K views7 years ago1 recommendation

Tools and practiceVim, Emacs and editorsGit and version control

Alexey Samoshkin explains how to configure and use Vim as a diff viewer and Git difftool.

Turn Vim into a yet another diff viewer tool, like DiffMerge or kdiff3. Explore diff options, patch generation algorithm, use it as a Git difftool and more... Topics discussed: - several ways to enter and exit diff mode - running with with a clean configuration (without your Vimrc) - configuring diff options - explore diff algorithm or how Vim calculates diff hunks and generates patches - detect when Vim is in a diff mode and turn off syntax highlighting and spell checking - tweak colors in a diff mode by working with Vim highlight groups - configure Vim as a Git difftool - smartly quit diff mode by closing both sides/windows of a file comparison - diff navigation shortcuts - work with diff hunks even when Vim is not in a diff mode using github.com/airblade/vim-gitgutter Test Vimrc configuration from this demo: gist.github.com/samoshkin/90c39032687fd06e724fa8bba1c958bc My production Vimrc configuration: github.com/samoshkin/dotvim

Why it's here

1 person recommends this

What people say. Shared as a comprehensive guide to configuring Vim for comparing files and viewing diffs.

u/alsam88in r/vim • Recommends

Vim universe. Vim as a diff tool