is there any way I can know all changes I made to a (existing) file before saving it in vi ?
In other words any way to do “diff” between saved and edited version of a file in vi.
Thanks
is there any way I can know all changes I made to a (existing)
Share
The
$VIMRUNTIME/vimrc_example.vimdefines a:DiffOrigcommand that does exactly that. See also:help :DiffOrigfor the description. Just copy the command definition to your~/.vimrc, and you’re done!