Provide :DiffOrig

This seems like a weirdly specific thing to provide in a set of
defaults, but since defaults.vim provides it I guess we can too.

References: https://github.com/tpope/vim-sensible/issues/86
This commit is contained in:
Tim Pope
2022-12-27 23:34:26 -05:00
parent d2613eeaa1
commit 0b53989c02

View File

@@ -103,6 +103,12 @@ if empty(mapcheck('<C-W>', 'i'))
inoremap <C-W> <C-G>u<C-W>
endif
" From `:help :DiffOrig`.
if exists(":DiffOrig") != 2
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
\ | diffthis | wincmd p | diffthis
endif
" Load matchit.vim, but only if the user hasn't installed a newer version.
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
runtime! macros/matchit.vim