diff options
-rw-r--r-- | .gitmodules | 3 | ||||
m--------- | vim/bundle/diff_prune | 0 | ||||
-rw-r--r-- | vim/vimrc | 11 |
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 @@ -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 |