Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Jump to Function Signature / End
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dima
New Member

Israel
4 Posts

Posted - Feb 14 2018 :  08:55:41 AM  Show Profile  Reply with Quote
Sometimes when I'm deep within a function scope I need to jump to the function signature.

Due to writing low-level, I have a lot of C free functions that have very long code blocks (including, for instance, a very large switch statement) and it's often useful for me to jump up to the function start / function end (cleanup tag) to touch or view things there.

I believe some IDE's have this functionality by default, but VS does not. I remember ResharperC++ featuring it, and I'm finding myself missing it.


feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Feb 14 2018 :  10:11:34 AM  Show Profile  Reply with Quote
The easiest method is probably to show VA Outline - https://support.wholetomato.com/default.asp?W187

Assuming you have "Auto Update" in the context menu of VA Outline turned On, VA Outline will track which function you are currently in, and highlight the current function in Bold. If you make a bookmark on the current line (to easily return to it) you can use Double Click on the bold function in VA Outline to jump to the first line of the function, the function declaration.

To get to the end of the function from the start of the function, place the caret into the opening curly brace and press Ctrl+], which is mapped to the IDE command "Edit.GotoBrace" by default.

I also find VA's Move Scope commands very helpful in files like this - https://support.wholetomato.com/default.asp?W198

Since once you are at the level of the function declaration, the next and previous scope is the next and previous function in the file, which lets you move up and down the code file one function at a time, regardless of how long or short the functions are.

zen is the art of being at one with the two'ness
Go to Top of Page

dima
New Member

Israel
4 Posts

Posted - Feb 15 2018 :  04:29:40 AM  Show Profile  Reply with Quote
Thanks for the reply.

Using the mouse to operate the VA outline, or manually re-positioning the caret for Edit.GotoBrace to work, misses the point of using keyboard shortcuts.

However, the Move Scope command fits my need exactly! I wasn't aware of it, and for some reason the command wasn't bound to anything. I bound it to the suggested key combination and I'm a happy camper.

I really think it's under promoted, as I did some searching on the site before writing here.

Thank for the help!

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Feb 15 2018 :  11:14:40 AM  Show Profile  Reply with Quote
In the older IDE's the command is bound by default, but in VS2017, and maybe VS2015 (I would have to check) the keyboard shortcuts are already mapped to moving the current line up and down the file, so VA does not replace the existing IDE key mappings.

It is a very "small" feature, but I have always felt a very powerful one when paired with other ways of moving around in your code. To be fair, it does have buttons on the Context and Definition field, which is normally at the top of the editor, if you know to look for them. As soon as you have quite a few features, some are going to get less promotion than others, and this isn't a feature that grabs people's attention, not until they find themselves using it anyway

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000