How do I accept or reject individual changes in Vim's diff mode?
dp / do
When reviewing differences between files in Vim's built-in diff mode, dp and do let you selectively apply individual hunks without leaving the editor.
dp / do
When reviewing differences between files in Vim's built-in diff mode, dp and do let you selectively apply individual hunks without leaving the editor.
:set diffopt+=iwhite
When comparing files in Vim's diff mode, whitespace-only changes (extra spaces, changed indentation) can clutter the diff and hide meaningful edits.
require('gitsigns').setup()
gitsigns.
<Leader>hs / <Leader>hu
The vim-gitgutter plugin shows Git diff markers in the sign column and provides powerful commands to stage, undo, and preview individual hunks directly from Vim
:Gdiffsplit
The vim-fugitive plugin provides :Gdiffsplit (and its vertical variant :Gvdiffsplit) to open a side-by-side diff view comparing the working tree version of a fi
:Gedit HEAD~3:%
The vim-fugitive plugin lets you open any version of any file from your Git history directly in a Vim buffer using the :Gedit command.
]c / [c
The vim-gitgutter plugin shows Git diff markers in the sign column and provides ]c and [c mappings to jump between changed hunks — groups of added, modified,
:windo set scrollbind
The scrollbind option locks two or more windows together so that scrolling in one window automatically scrolls the others by the same amount.
buffers-windows #windows #navigation #splits #diff #productivity