aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-25 08:38:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-25 08:39:09 +1200
commit97d3c005b9825e605a4524295733330c473a0d33 (patch)
tree5dff63f6c1d6c826d728a5595d0e0364f2e4212a /vim/vimrc
parentUpdate redact_pass.vim plugin (diff)
downloaddotfiles-97d3c005b9825e605a4524295733330c473a0d33.tar.gz
dotfiles-97d3c005b9825e605a4524295733330c473a0d33.zip
Add diff_prune.vim ftplugin
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index ab4e971d..5eadb86a 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -272,6 +272,17 @@ nmap \x <Plug>StripTrailingWhitespace
" \z sets NZ English spelling (compare \u)
nnoremap \z :<C-U>setlocal spelllang=en_nz spelllang?<CR>
+" Key bindings for diff mode
+if has('autocmd') && v:version >= 700
+ augroup vimrc
+ autocmd!
+ autocmd FileType diff
+ \ nmap <buffer> <LocalLeader>p <Plug>DiffPrune
+ autocmd FileType diff
+ \ xmap <buffer> <LocalLeader>p <Plug>DiffPrune
+ augroup END
+endif
+
" Add packaged matchit.vim, if supported
if has('packages')
packadd! matchit