citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

bufdiff.vim (211B)


      1 function! s:DiffWithSaved()
      2   let filetype=&ft
      3   diffthis
      4   vnew | r # | normal! 1Gdd
      5   diffthis
      6   exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
      7 endfunction
      8 com! DiffSaved call s:DiffWithSaved()