- vim-fugitive integration with delta.
- neovim
- vim-fugitive
- delta or diff-highlight
-
Get delta installation file from its release page.
- Alternatively, you can use
diff-highlight, which is distributed with Git. See setup diff-highlight for more information.
- Alternatively, you can use
-
Installation using Vundle.vim.
Plugin 'tpope/vim-fugitive' Plugin 'farhanmustar/fugitive-delta.nvim'
-
Installation using vim-plug.
Plug 'tpope/vim-fugitive' Plug 'farhanmustar/fugitive-delta.nvim'
- fugitive-delta add extra highlight group to diff and git buffer.
- It use
FugitiveDeltaTexthighlight group which is default to:
highlight link FugitiveDeltaText DiffText- Demo below showing 'changed' is highlighted using
FugitiveDeltaTexthighlight group.
- Alternatively, if you do not want to install git-delta, you can use diff-highlight, which is distributed with Git.
- Distributions like Ubuntu, for example, require you to take extra steps to make diff-highlight available in your path.
- You need to run the following commands to make it available:
cd /usr/share/doc/git/contrib/diff-highlight/
sudo make
sudo ln -s /usr/share/doc/git/contrib/diff-highlight/diff-highlight /usr/local/bin/diff-highlight
sudo chmod +x /usr/share/doc/git/contrib/diff-highlight/diff-highlight- If you have both git-delta and diff-highlight available, you might need to force it to use diff-highlight by adding the following line to your Vim configuration:
let g:exe_fugitive_delta=2- You can switch between the two in the current session by setting it to 1 for git-delta. You might want to do this to compare the two, as they have different highlighting behaviors.
