*diff_prune.txt* For Vim version 7.0 Last change: 2018 June 29 DESCRIPTION *diff_prune* This filetype plugin for diffs/patches ("diff" filetype) provides buffer-local mappings in normal and visual mode to reverse changes defined by a linewise motion or visual mode selection: leading minus signs are removed, and lines with leading plus signs are deleted. If the changes result in a diff block or file block having no changes left, it is also removed. This can be handy for using with the `-e` or `--edit` option to `git-add`, which allows you to edit a diff before applying changes to the staging area. REQUIREMENTS *diff_prune-requirements* This plugin is only available if 'compatible' is not set. It requires Vim 7.0 or newer. MAPPINGS *diff_prune-mappings* *(DiffPrune)* A single mapping target name `(DiffPrune)` for normal and visual modes provided. There is no default key mapping. You could put this in `after/ftplugin/diff.vim` to use `p`, with `pp` to prune the current line: > nmap p (DiffPrune) xmap p (DiffPrune) nmap pp (DiffPrune)_ let b:undo_ftplugin = b:undo_ftplugin \ . '|nunmap p' \ . '|xunmap p' \ . '|nunmap pp' < AUTHOR *diff_prune-author* Written and maintained by Tom Ryder . LICENSE *diff_prune-license* Licensed for distribution under the same terms as Vim itself (see |license|). vim:tw=78:ts=8:ft=help:norl: