Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

In writing VBA code in Access or Excel I can right-click on my code and drop-down a list that includes options to: "Go To Definition", or go to: "Last Position". I find "Last Position" to be as helpful/necessary as the "Go To Definition" option.

 

However, when developing VB.Net code in the Studio.Net IDE, "Last Position" is not in the similar list (It's annoying and time consuming to the extreme to have to go to solution explorer, try to remember where I was, and navigate back, after I've gone to definition for a quick reference).

 

Am I missing something? Is there some item I can change in my .Net configuration to put "Last Position" option in the .Net drop-down list?

 

If so, how do I set it up? :)

 

If not, why did MS pull out such a valuable option when implimenting studio.net? :(

 

Thanks,

Mark

  • *Experts*
Posted

These keystrokes are the defaults for C#, probably VS. If so, they should work with VB.NET:

F12: on a line of code, this will "go to definition"

Shift F12: on a function name, will "go to first reference".

Ctrl - : (that's hold control and press minus) Go back to previous cursor position

Ctrl Shift - : Go forward to last cursor position.

 

VS keeps track of all cursor movement, more or less, since you open VS. Pressing Ctrl - multiple times will keep cycling backwards to where you were before.

 

With the 4.x drivers for MS mice, you could assign a keystroke to any button, even per application. I used to have my left thumb button mapped to Ctrl - for Visual Studio so navigating back was as easy as pressing the side button on my mouse. They took out this lovely feature in 5.x and I'm too lazy to look for a freebee driver. :(

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

way cool! :)

 

Way cool ner :)

 

This is the deal...

 

the key combinations didn't work for me at first. Then, thinking it may be my keyboard mapping, which I'd set to VB6, I changed back to "default mapping". And, voila! The keys now perform as you specified in your note.

 

I should have sent this thread out when I started w/ .net 2 yrs ago (actually I think I did, but got no response). Oh well, better late than never.

 

 

I'm thrilled :) (where do they write this stuff down? :)) )

 

Thanks again.

Mark

Posted
F12: on a line of code, this will "go to definition"

Shift F12: on a function name, will "go to first reference".

Ctrl - : (that's hold control and press minus) Go back to previous cursor position

Ctrl Shift - : Go forward to last cursor position.

GREAT! I was looking for it for a long time.

 

Thanks ner. :)

There is no spoon. <<The Matrix>>
  • Leaders
Posted
Another way to do it: via the toolbar. Right-click to toolbar, click customize, and pick "View" for the list of view related commands. Scroll down. Scroll down some more. And then some. Eventually you'll find it. It's "Navigate Forwards" and "Navigate Backwards". Two toolbar buttons that provide the same functionality. Woo hoo.
[sIGPIC]e[/sIGPIC]
  • *Experts*
Posted

Even if you choose the VB6 keyboard mapping, it's just a default. All commands can be remapped to any keystroke through the Tools, Options menu.

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...