vim: Add diff command for unsaved file changes

This commit is contained in:
2020-11-22 13:35:36 +01:00
parent 22a87097df
commit ee4f35b146

View File

@@ -168,6 +168,10 @@ if (has('nvim'))
highlight NonText guibg=NONE highlight NonText guibg=NONE
endif endif
" Commands #####################################################################
command DiffOrig vert new | set buftype=nofile | read ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
" Autocommands ################################################################# " Autocommands #################################################################
" Highlight trailing whitespaces " Highlight trailing whitespaces
" (https://vim.fandom.com/wiki/Highlight_unwanted_spaces) " (https://vim.fandom.com/wiki/Highlight_unwanted_spaces)