How to keep VS change history after saving?
Asked Answered
A

3

6

When one makes a few changes to the code in Visual Studio, then undoes some of them (Ctrl+Z) and then saves the code (Ctrl+S) the whole change history from that point onward (all undone changes) are lost - one can't redo these changes (Ctrl+Y). The history from that point backward is kept by VS but the forward part of it is for an unknown reason dropped.

Any way to keep the whole history?

Annabell answered 7/8, 2013 at 9:56 Comment(10)
Hmm, are you sure? Which version? Here it only looses history when you close the file, which is logical, and I think it has been like that since VS6 or so?Disaffection
Well, I'm not entirely sure what is implemented into VS and how it works internally but I'm 100% sure about the results (described above). Even my Redo arrow becomes inactve after saving. VS2010, didn't test on other versions.Annabell
you're right I misread it, it's in VS2010. But there's more to it than what you say, I cannot always reproduce it. Not sure what it depends on though.Disaffection
Is this connect issue the same?Lynnell
@Lynnell No, I've never had a problem with Undo feature.Annabell
Can you start devenv with the /safemode switch and try to reproduce?Lynnell
@Lynnell Yes, it behaves the same.Annabell
Have you tried the things listed here? #1533415Gamic
@Gamic But it's about Undo not working, mine is about Redo being disabled.Annabell
I'd imagine those features are related, might be worth tryingGamic
T
1

You cannot do anything to make the editor(which maintains the history) save every step you did when you undo some changes and save it. So the answer is NO. I don't know about visual studio 2012 editor though because I haven't used it.

Transparency answered 19/8, 2013 at 11:53 Comment(4)
in 2012 if you make some changes, hit undo save the file then redo they reappear.Treadmill
@srinivas Are you 100% sure of that?Annabell
@Annabell : Yes visual studio in general does not offer a 'code change tracker or history'(if i can call it that).It is one of the features of the editor and as far as I know there is NO WAY of accessing or modifying its behaviour.Transparency
@Transparency Of course I can't change the programmed behaviour but I thought there might be a feature "Clear Redo history after saving" somewhere in settings to check/uncheck.Annabell
S
0

Use Source control (or local source control on your desktop if that's not feasible), and you can roll backwards or forwards tons of changes, check in more often.

With Git for example I can check in every few minutes and be able to roll back or forward individual lines or commits.

They are using VSS here, so I'm using git for local undo/redo extensions. Source control is the best way to handle more lengthy change histories like you are referring to.

Spunk answered 16/8, 2013 at 14:30 Comment(3)
I'm sorry but that's completely not what I'm looking for. I need exactly what Ctrl+Z/Ctrl+Y provide - very convenient/fast way to undo/redo changes without closing/reopening the IDE.Annabell
you can do those things without closing and reopening the IDE.Spunk
yeah but he wants undo and redo functionality ... he probably has source control and all its benefits. Its like saying my wheelbarrows wheel keeps falling off how can you help? answer: use a bulldozerTreadmill
E
0

Maybe this extension will help. http://visualstudiogallery.msdn.microsoft.com/226c2108-9da9-407d-b90d-9783040d27b8

Eldridge answered 10/2, 2014 at 15:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.