Local History

23 views
Skip to first unread message

Vedanth Srinivasan

unread,
May 15, 2019, 5:40:21 PM5/15/19
to vim_dev
Is there any way I can get a local history for a file in vim? I have already completed the file and am trying to see my changes at each point.

Tony Mechelynck

unread,
May 16, 2019, 12:38:57 AM5/16/19
to vim_dev
On Wed, May 15, 2019 at 11:40 PM Vedanth Srinivasan <veds...@gmail.com> wrote:
>
> Is there any way I can get a local history for a file in vim? I have already completed the file and am trying to see my changes at each point.

This is more of a question for vim_use than for vim_dev.

See
:help u
:help CTRL-R
:help undo-two-ways
:help 'cpoptions'
:help 'compatible'

Other than undo and redo, I suppose that for a more permanent history
you should have placed your file in a source control management system
such as CVS, subversion, git, Mercurial etc. That would have allowed
you to see a diff between any two stages of your file without undoing
changes but it is outside the scope of Vim itself, and now that the
file is finished it is too late for that.

Best regards,
Tony.

Nazri Ramliy

unread,
May 18, 2019, 9:13:49 PM5/18/19
to vim_dev
On Thu, May 16, 2019 at 5:40 AM Vedanth Srinivasan <veds...@gmail.com> wrote:
>
> Is there any way I can get a local history for a file in vim? I have already completed the file and am trying to see my changes at each point.

As Tony said, it's too late for that. For the future checkout :h
'undofile', which tells vim to save the undo list when you quit vim
and restore it if you reopen the file.

nazri
Reply all
Reply to author
Forward
0 new messages