Code Editing - returning to previous edits
I've seen references to the ability (in VS08) to jump back and forth between the various places that i've been editing. E.G. I use 'Go to Definition' to inspect a method - what开发者_StackOverflow中文版's the keyboard shortcut to return to where I was?
thx
Ctrl-- (Ctrl and the minus key) goes back to the place from where the latest navigation command (e.g. Go-to-definition) was launched.
Ctrl-Shift-Tab takes you to the previous document. You can Go To Definition and then hit Ctrl-Shift-Tab to go back. (Also, Ctrl-Tab takes you to the next document.)
I think the functionality you are wanting can be achieved with bookmarking.
So, before you go to a definition, you could bookmark your spot.
The keyboard shortcuts for bookmarks are as follows:
Set/Unset Bookmark (Ctrl +K, K) Next Bookmark (Ctrl +K, N)
A few other shortcuts can be found at this blog
To go back to the previous place I edited, I usually hit Ctrl-Z then Ctrl-Y (Undo, Redo).
精彩评论