aboutsummaryrefslogtreecommitdiff
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
parentb31c9cb3744dc681351e51aa8a5539bf8d6e7e7c (diff)
downloaddotfiles-97d3c005b9825e605a4524295733330c473a0d33.tar.gz
dotfiles-97d3c005b9825e605a4524295733330c473a0d33.zip
Add diff_prune.vim ftplugin
-rw-r--r--.gitmodules3
m---------vim/bundle/diff_prune0
-rw-r--r--vim/vimrc11
3 files changed, 14 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index 30a58edc..dd10f0e4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -8,6 +8,9 @@
[submodule "vim/bundle/copy_linebreak"]
path = vim/bundle/copy_linebreak
url = https://sanctum.geek.nz/code/vim-copy-linebreak.git
+[submodule "vim/bundle/diff_prune"]
+ path = vim/bundle/diff_prune
+ url = https://sanctum.geek.nz/code/vim-diff-prune.git
[submodule "vim/bundle/fixed_join"]
path = vim/bundle/fixed_join
url = https://sanctum.geek.nz/code/vim-fixed-join.git
diff --git a/vim/bundle/diff_prune b/vim/bundle/diff_prune
new file mode 160000
+Subproject 7b1356734b2262c46ffc401f2c89f183509ff77
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