T O P I C R E V I E W |
Dans |
Posted - Nov 27 2007 : 07:54:22 AM Hi,
When i develop in VS C++ i'm missing for this useful thing. I changed some method, then jump to another file to examine sources and then i need to return to "Last Editing position" in one short-cut click. It would be nice if this feature will be included in VAssist too (introduced in Eclipse, ReSharper, VS MMX).
Also will be appreciated if after jumping back, top editor line will be restored too.
Thanks, Dans |
27 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Mar 17 2014 : 12:56:23 PM One further thought, in VA 2007, the following keyboard commands were added:
VAssistX.VAViewHCB - Place focus in HCB VAssistX.VAViewMRU - Place focus in MRU VAssistX.VAViewHCBToggleLock - Toggle pin in HCB VAssistX.ListIncludeFiles - Open Header Browser
so you can now map a keyboard shortcut to VAssistX.VAViewMRU, giving you keyboard access to the most recently used list, no more need to use the mouse. |
sean |
Posted - Mar 14 2014 : 11:27:58 AM Yes, it would be nice to be able to go through the navigation stack skipping non-edit waypoints. case=80951 |
VincentZalzal |
Posted - Mar 13 2014 : 5:32:49 PM I will resurrect this old thread, because this is a feature I know many people would find useful, and I've been waiting for it for some time. Both Visual Studio and Visual Assist allow you to navigate between "viewed" locations, but it would also be very useful to navigate between "edited" locations. I have the exact same use-case as Dans: I follow some code, using Alt-G repeatedly to follow functions calls. When I've found the information I needed, I want to get back to where I was CODING, easily. I have to do this many times, every day. - Using Ctrl+- of Alt-Left is not satisfactory, you have to press it repeatedly - Using VA view is not satisfactory, because you need to use the mouse - Using bookmarks is not satisfactory, because it assumes you knew in advance you would need to come back here after a long Alt-G trek - The only viable solution for now is to do some Ctrl+Z, then Ctrl+Y, but this is error-prone, and sometimes, Ctrl+Z will undo without moving the view.
The solution is to implement a stack of edits locations (global to the solution, I would say, like Ctrl+-, not per file). By the way, I don't use ReSharper, but I know it has this (it is called "Go to Previous Edit"). I thought a few times to code something myself to do this, but settled until now on using the "undo" method. |
feline |
Posted - Dec 13 2007 : 2:36:25 PM Does the list of recently edited files in VA View help?
As soon as we store exactly one editing position what happens if you press a non movement key by mistake while navigating through the code? This is an edit, and instantly "destroys" the piece of information you want, which is the last editing position. |
Dans |
Posted - Dec 11 2007 : 5:00:39 PM quote: Originally posted by feline
sl@sh I half remember the discussion on bookmarks. I suspect you are right, some form of bookmarks might be what Dans is looking for here.
Dans you might find this plugin useful:
http://www.usysware.com/dpack/Default.aspx
I have never used it myself, so am not recommending it. Plus this is a manual system, not an automated system.
After first look at this plugin i can say: this not my expert :) I never use bookmarks and in this suggestion i proposed: how without using bookmarks (manual setting) navigate back to edited code. Just return to last, exctly last, editing position i think it is easy because you do not need to support stack.
Thanks, Dans |
feline |
Posted - Dec 11 2007 : 09:25:04 AM One small ray of hope, we are considering a form of Find References that searches comments for tag's:
case=9563
Still an idea at the moment, but if this is done it should help. |
sl@sh |
Posted - Dec 11 2007 : 03:47:02 AM Yes I've seen the discussion, but what I've ended up doing is constantly entering manual comments containing certain tags that I can later look up using the built-in find. This is the most flexible and useful way I could come up with yet, and it always works as expected, although it's sometimes tedious to maintain those tags.
Unfortunately there's not a lot a tool (be it VA or otherwise) could possibly do to make this task easier, since I always need various different tags. So the least I really need to do is (a) define each tag somewhere at some point and (b) select the tag(s) for each location in the code that I want. At best any tool could cut down on my typing - but even that would be minimal savings as long as I stick to reasonably short tags. |
feline |
Posted - Dec 07 2007 : 3:40:18 PM sl@sh I half remember the discussion on bookmarks. I suspect you are right, some form of bookmarks might be what Dans is looking for here.
Dans you might find this plugin useful:
http://www.usysware.com/dpack/Default.aspx
I have never used it myself, so am not recommending it. Plus this is a manual system, not an automated system.
How useful is VA View's list of modified methods for you? In theory this is the information you are asking VA to track.
sl@sh that is *nasty*. I don't know if you saw the discussion about Find References and todo lists, but the thinking behind it, mentioned in this FAQ, combined with snippets to easily enter the markers *may* help you:
http://docs.wholetomato.com?W189
Not quite bookmarks, and you need to find or enter a marker to trigger the find, but this is something you can start doing today, and the ability to clone Find References Results lists in VA 1619 should help quite a bit. |
sl@sh |
Posted - Dec 07 2007 : 04:21:38 AM quote: Originally posted by Dans
It will be nice if VA View will remember last changed line in method, sometimes methods is big and it useful to remember which place of this method was changed.
And at all other times methods are not big, but huge! Or at least that is the situation that I am currently facing. Methods (or rather C functions that had been moved to arbitrary namespaces that happen to be C structs retyped to class) tend to be 1000 lines or more as a rule rather than an exception . I normally rather like moving through code I created using VA SIWS, but when all I remember is a function's name, this isn't helpful at all!
I do use the IDE's navigate buttons quite frequently, but the code is badly structured and as a result I often need to check a dozen files or more just to understand what structures I am looking at and how they are being used (created, initialized, read, assigned, whatever). Navigating back to my starting point thus often takes considerable time and concentration (as to not move *past* that point!)
I am under the impression what Dans (and I) really need is not a function that remembers last edits, but a functionality that resembles bookmarking and jumping back to bookmarks. In VS 2003 bookmarks are completely useless since they don't work across files. In VS 2005+ they apparently do, but unless MS completely reworked the mechanisms, they are still awkward to use. We already had a discussion on that topic somewhere though, so I don't think there's anything new to add. |
Dans |
Posted - Dec 07 2007 : 02:31:20 AM quote: Originally posted by feline
If you show VA View with "Include modified methods" turned on does it list the things you want to know, and does this help?
I am still trying to really understand what is going on here. Here you have said you:
>> press Alt+Left for returning to analysis
which suggests that this command is doing something useful while you are editing.
Jumping to the last "edit" position sounds good, but how well defined is this? In a 10 line function if you have 14 small edits, rename a couple of variables by hand for example, is this 14 slots in the history or 1 slot in the history? This is a situation where just listing "modified methods" works well.
I see what you mean...
1 slot for last modification is enough, just remember file and line. But for extending functionality after first invokation you can use VA View's edit history for jumping backward in edit history.
Offtopic: It will be nice if VA View will remember last changed line in method, sometimes methods is big and it useful to remember which place of this method was changed.
Thanks! Dans |
feline |
Posted - Dec 06 2007 : 2:52:58 PM If you show VA View with "Include modified methods" turned on does it list the things you want to know, and does this help?
I am still trying to really understand what is going on here. Here you have said you:
>> press Alt+Left for returning to analysis
which suggests that this command is doing something useful while you are editing.
Jumping to the last "edit" position sounds good, but how well defined is this? In a 10 line function if you have 14 small edits, rename a couple of variables by hand for example, is this 14 slots in the history or 1 slot in the history? This is a situation where just listing "modified methods" works well. |
Dans |
Posted - Dec 06 2007 : 08:29:15 AM quote:
--skip-- Are you currently using any form of "navigate backwards" command? If so how, exactly, are you triggering it? Since VA provides a navigate backwards command, and so does the IDE, you might be using the IDE or the VA command.
I'm trying everything in VA X and VS IDE's commands but without expected results. And this is why i created this suggestion. There are exception that will broke your algorithm: I am analysing class, use Alt+G jumps for looking at code in methods. Oops i found bug, fixing method, press Alt+Left for returning to analysis, Alt+G to other method, then i found that my fix can broke something else, but i can not return because jump stack do not have method that i fixed. Back to Last Editing position is something else than plain navigation stack. This is the way to continue editing in SINGLE shortuct. When i found Back to Last Editing Position in one expert i became used to it in one day.
Offtopic Strange. I propose to improve VA, gives many cases, but i have answers how it can be done with current realisation - slowly and not always work. I know all of these solutions, because i anlyse and uses VA every day. I have big experience in working with other IDE's and many other experts and can compare what VA CAN and what NOT and what CAN be improved. It seems to me that new suggestions that not belongs to Alt+G is too hardly adopted |
feline |
Posted - Dec 05 2007 : 3:29:40 PM What you are asking for is starting to make sense, and I am also starting to understand why I don't understand. The feature you are asking for already just about exists on my machine.
quote: Originally posted by Dans
Also there are exceptions when you can not return back: 1. Open one file, change some line, open another file, and try to return to editing postion - never because we not used Alt-G. 2. Open file, change something, close file - we can not return
using VS2005 and VA 1619 I did the following:
* use OFIW to open the file "test_general.cpp" * use next scope to jump several functions down the file * at the top of a function half way down the file add a line of code:
int nNewVariableHere = 0;
* use CTRL-S to save the file and CTRL-F4 to close the file * jump through a couple of other files, somewhat at random * use the keyboard shortcut Alt+Left Arrow twice, I am back in the file I closed, at the new variable I added.
This "just works" for me.
Are you currently using any form of "navigate backwards" command? If so how, exactly, are you triggering it? Since VA provides a navigate backwards command, and so does the IDE, you might be using the IDE or the VA command. |
Dans |
Posted - Dec 03 2007 : 6:07:19 PM quote: Originally posted by feline
Dans a performance problem with VA View sounds like a bug, and is a separate issue.
I'll prepare sample in other thread
quote:
I agree moving the mouse over an into VA View takes a little bit of fuss / effort, but if you need to jump back through the last 20 positions in the code, checking each time if this is where you want to be, then VA View sounds like less work to me. I use next and previous with a few jumps quite often, for 3 or 4 jumps it makes a lot of sense to me, and works very well. I am just not sure how having a much longer list of jumps helps.
Forget about 20 jumps. It was sample number. Usually it 3-4. When using navigate back you need to Carefully examine every back jump and stop back navigation in needful place. C++ is not too readable language. Also there are exceptions when you can not return back: 1. Open one file, change some line, open another file, and try to return to editing postion - never because we not used Alt-G. 2. Open file, change something, close file - we can not return
Feline, i'm using Back To Last Editing position very often, like you uses Alt+G :) (not in C++). I develop very quickly and superfluous movements is annoying. Instead of immediate coding i need to:
- examine every my jump, and stop navigating back. It's not work if tehre too many many jumps. Better to find place itself
- or invoke Open File Dialog, search for file, Alt+M, search for method
- or type method name in Find Symbold dialog, analyse that selected needful namespace
- or select apropriate method in VA View
- or try to persuade Feline that this is useful feature
Does it makes sence to add single! short-cut Ctrl+Alt+Left to navigate back exacltly to previously edited place? You can see implementation in ReSharper. I disabled ReSharper because two code analysers is too much for my computer. For me it speeds up development and this is often used feature for developers that previously developed in Eclipse |
feline |
Posted - Dec 03 2007 : 1:34:36 PM Dans a performance problem with VA View sounds like a bug, and is a separate issue.
I agree moving the mouse over an into VA View takes a little bit of fuss / effort, but if you need to jump back through the last 20 positions in the code, checking each time if this is where you want to be, then VA View sounds like less work to me.
I use next and previous with a few jumps quite often, for 3 or 4 jumps it makes a lot of sense to me, and works very well. I am just not sure how having a much longer list of jumps helps.
Can we start over? I have the sense everyone is talking about something quite different to what I am talking about. Can someone explain to me what feature it is that they are looking for? |
znakeeye |
Posted - Dec 03 2007 : 10:35:24 AM I agree with Dans. This feature makes sense! |
Dans |
Posted - Dec 01 2007 : 3:36:12 PM quote: Originally posted by feline
If this is the case then VA View might be the solution.
Show VA View and right click in the top half. There is an option to "Include modified methods" which should do this.
I saw that i can move back to editing position in VA View, but this is not quick solution - i need to activate VA View, get mouse in hand, aim to file and click. Usually VA View hidden for sawing working space and i have few performance issues when VA View activated (i'll prepare sample). |
feline |
Posted - Nov 30 2007 : 10:12:06 AM If this is the case then VA View might be the solution.
Show VA View and right click in the top half. There is an option to "Include modified methods" which should do this. |
AdrianS |
Posted - Nov 30 2007 : 09:44:28 AM I think that Dans is making a distinction between "last edited" and "last viewed". He wants to go back to the last file and location that was actually edited, not just viewed. I missed that distinction in my first reply.
He wants to go back to the code that he is working on, without having to step back through code that he was only viewing. |
feline |
Posted - Nov 30 2007 : 09:21:03 AM Dans this seems to be exactly what this feature in VA is designed to do. Are you saying that it is not working?
I am confused. |
Dans |
Posted - Nov 29 2007 : 8:01:25 PM quote: Originally posted by feline
Dans which IDE are you using? In VS2005 jumping to bookmarks is "global" rather than "local" by default.
If you are going to need to use navigate backwards 30 or 40 times in a row then I suspect that you actually want to use a more direct method to return to where you started from.
Number 20 is exaggeration Let me explain my uses case: I refactor method, type some changes. In method body i found call of suspicious method - i jump to this method and analyse code, then i can jump to another symbol etc... I checked suspected method and need to return to my previous editing position for continuing refactoring. Back to last editing position is the best solution for this. I returned to uncompleted code in single shortcut without dropping bookmarks (i never uses them) For sure i can install addin that supports this function (ReSharper or MMX), but this really slowdown VS.
Thanks, Dans |
feline |
Posted - Nov 29 2007 : 5:05:13 PM Dans which IDE are you using? In VS2005 jumping to bookmarks is "global" rather than "local" by default.
If you are going to need to use navigate backwards 30 or 40 times in a row then I suspect that you actually want to use a more direct method to return to where you started from. |
Dans |
Posted - Nov 27 2007 : 10:45:08 AM quote: Originally posted by mwb1100
I don't know if (or how) it's different from View.NavigateBackward (mapped to Ctrl+Minus) but View.Backward (mapped to Alt+LeftArrow) seems to work well for me.
Change some line, then select some identifier, Press Alt+G (jump), select some identifier, Press Alt+G (jump), do it 20 times. And you will found that navigate backward can not help quickly return to previously edited position because it uses jump stack. |
mwb1100 |
Posted - Nov 27 2007 : 10:33:21 AM I don't know if (or how) it's different from View.NavigateBackward (mapped to Ctrl+Minus) but View.Backward (mapped to Alt+LeftArrow) seems to work well for me. |
Dans |
Posted - Nov 27 2007 : 09:39:31 AM quote: Originally posted by AdrianS You could try View/Navigate Backward. That might do what you want.
It's not a solution. Sometimes i need to press about twenty Navigate Backward for returning to this posistion, and sometimes without success . |
AdrianS |
Posted - Nov 27 2007 : 09:24:00 AM quote: return to "Last Editing position"
You could try View/Navigate Backward. That might do what you want. |
graham.reeds |
Posted - Nov 27 2007 : 08:42:05 AM That would be useful. I'm quite used to doing Ctrl+Z, Ctrl+Y just to do that one thing. |
|
|