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
 List Methods in file (Alt-M) shows VA Hashtags
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ShawnMcGrath
New Member

4 Posts

Posted - Apr 13 2020 :  12:15:49 PM  Show Profile  Reply with Quote
Nothing more to say really. Allow an option to show the hashtags, (and use the same text filter), as well as the methods in the alt-M list.

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 14 2020 :  04:33:06 AM  Show Profile  Reply with Quote
You have the feature already, although not in the Alt+M list (in my opinion it would clutter it even more than its already, the regions are something I wish I could turn off). Type Alt+Shift+H which opens the VA Hashtags window, has more features than the Alt+M list.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Apr 14 2020 :  05:00:20 AM  Show Profile  Reply with Quote
I agree. Can you explain why adding hashtags to the Alt-M list would help, or make sense?

Uniwares, right click in the opened Alt-M list, and toggle "Include regions", this should help.

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

ShawnMcGrath
New Member

4 Posts

Posted - Apr 14 2020 :  08:37:25 AM  Show Profile  Reply with Quote
The alt-m list is the only method I use to navigate a file. I don't like using a second method, (especially one that opens up a new panel). I have functions that are several thousand lines of code sometimes, and I break them up into sections like:
{ //#inline_function_name1

}

{ //#inline_function_name2

}

Being able to easily navigate to those with alt-M would be a huge deal for my workflow. I understand it'd clutter up the list for other people, but it can be a default-off option.

As of right now I don't use the hashtags at all, they don't fit within my workflow in any way, this would make them incredibly useful for me.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Apr 14 2020 :  09:03:46 AM  Show Profile  Reply with Quote
Do I want to ask why you have functions that are thousands of lines long? I know this tends to happen with parsing code, where you are switching on different elements, but outside of that, this sounds quite hard to manage.

Also, this is the sort of thing that Extract Method is designed to help with, splitting big blocks of code up into smaller, more manageable blocks.

https://docs.wholetomato.com/default.asp?W155

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

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Apr 14 2020 :  09:06:22 AM  Show Profile  Reply with Quote
You could also look into region markers, and collapsing a region inside a function, to hide part of the body, making the code easier to navigate through.

Thinking specifically about VA Hashtags, consider this example of tags marking points inside a function. You do have to navigate to the top of the function to get a tag as a "target" to jump from, but it's something you can do right now if it helps:

// Alt-g on the hashtag here jumps directly to the tag after the dummy function
// Alt-Shift-G on the hashtag here lists a single "reference" and a "cross-references" sub-menu of hashtags
// #ExampleCrossReference
void functionHoldingManySections()
{
	// Alt-g on the hashtag here (the part after the #) lists 2 destinations, neither inside the function
	// Alt-Shift-G on the hashtag here lists "references" and "cross-references" as sub-menus of hashtags
	// one:#ExampleCrossReference
	// first section here

	// two:#ExampleCrossReference
	// second section here

	// three:#ExampleCrossReference
	// third section here

	// four:#ExampleCrossReference
	// forth section here

	// five:#ExampleCrossReference
	// fifth section here
}


// #ExampleCrossReference after the function

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

ShawnMcGrath
New Member

4 Posts

Posted - Apr 14 2020 :  09:32:47 AM  Show Profile  Reply with Quote
I don't want to refactor the code, I want the code to be like this. I've been writing software for 25 years like this and I think it's better for many many reasons.

I don't use collapsing regions either. I literally just want to be able to jump to places that I mark up with comments in the same way that I jump to functions. Putting hashtags in the Alt-M thingy is the perfect solution for what I need. It doesn't make sense for me to change my code to fit the tool, when it's entirely possible for the tool to do what I need.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Apr 14 2020 :  10:55:20 AM  Show Profile  Reply with Quote
I have put in a feature request for this, to see what our developers make of the idea:

case=142122

For now though, I would suggest the VA Hashtags window, since it is already there, and already designed to help you work with the tags in the current file, if you set it to group by file rather than group by tag.

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

ShawnMcGrath
New Member

4 Posts

Posted - Apr 14 2020 :  12:53:34 PM  Show Profile  Reply with Quote
Thanks. Is there a way to use the hashtags window with a keyboard only? ie: open window with a single key, filter with whatever I type in, return to jump to hash tag, then auto-close the window (ie: the exact behavior that alt-M has [which btw, is more-or-less the only reason I've bought five versions of VA-X up to this point]). This would also only work if it doesn't cause the text to be reformatted (ie: the hashtag window resizing the code window)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Apr 15 2020 :  09:13:49 AM  Show Profile  Reply with Quote
The Hashtags window does work quite well with only the keyboard.

First the editor window, it sounds like you want to set the VA Hashtags window to docked and autohide. So show the window, position it where you want it, and press the Pin icon on the windows title bar so the pin is in its unpinned state. When you move keyboard focus out of the VA Hashtags window the window will now close, without effecting the editor window size.

You can change the keyboard shortcut for showing the VA Hashtags window, and moving keyboard focus into it, via:

IDE tools menu -> Options -> Environment -> Keyboard

and changing the shortcut for the command: VAssistX.VAHashtags if you don't want the default of Shift+Alt+H.

You can also map keyboard shortcuts to the commands:

VAssistX.HashtagsGroupByFile
VAssistX.HashtagsNext
VAssistX.HashtagsNextInGroup
VAssistX.HashtagsPrevious
VAssistX.HashtagsPreviousInGroup
VAssistX.HashtagsSearch

which are explained here: https://docs.wholetomato.com/default.asp?W375

When you open the Hashtags window keyboard focus should be in the search field. Just type in your filter, use Up and Down arrow keys to select the Hashtag instance you want, and press Enter to jump to it.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 15 2020 :  1:10:45 PM  Show Profile  Reply with Quote
If you don't like auto-hide, you can also try using the undocumented "CloseHashtagToolwindowOnGoto" registry value. It's off by default, exit VS, change it to 01, then after hitting enter on a particular hashtag instance, the toolwindow will close. case=115717
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