Thanks Marcin and Ben.
Chandra

On 01/04/2014 08:49 PM, Marcin Szamotulski wrote:
On 23:07 Fri 03 Jan     , Ben Fritz wrote:
On Friday, January 3, 2014 11:09:44 PM UTC-6, Chandra Amarasingham wrote:
I am a fairly novice user of vim.  One thing I worry about is

accidentally changing something on the file without being aware of it by

accidental keystrokes, etc.



Is there an easy way of seeing all the changes which have been made to

the current file being edited?  a "live" diff so to speak?


There is a command included in the vimrc_example.vim file distributed with Vim, 
called :DiffOrig.

This command will open a scratch buffer containing the current on-disk file 
contents, and diff it with your current unsaved buffer. Then you can see all 
the changes you've made.

Alternatively, there are also plugins that just let you know what lines have 
changed, for example, http://www.vim.org/scripts/script.php?script_id=3052 for 
changes since you started editing, or 
http://www.vim.org/scripts/script.php?script_id=4487 for changes since the last 
commit in your version control system.


This is not directly related but it might be helpful as well: there is also 
gundo plugin which shows undo tree in a nice format.
http://sjl.bitbucket.org/gundo.vim/

Best regards,
Marcin


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to