Author |
Topic  |
|
ShawnMcGrath
New Member

4 Posts |
Posted - Apr 13 2020 : 12:15:49 PM
|
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
2322 Posts |
Posted - Apr 14 2020 : 04:33:06 AM
|
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. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19137 Posts |
Posted - Apr 14 2020 : 05:00:20 AM
|
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 |
 |
|
ShawnMcGrath
New Member

4 Posts |
Posted - Apr 14 2020 : 08:37:25 AM
|
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. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19137 Posts |
Posted - Apr 14 2020 : 09:03:46 AM
|
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 |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19137 Posts |
Posted - Apr 14 2020 : 09:06:22 AM
|
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 |
 |
|
ShawnMcGrath
New Member

4 Posts |
Posted - Apr 14 2020 : 09:32:47 AM
|
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. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19137 Posts |
Posted - Apr 14 2020 : 10:55:20 AM
|
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 |
 |
|
ShawnMcGrath
New Member

4 Posts |
Posted - Apr 14 2020 : 12:53:34 PM
|
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) |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19137 Posts |
Posted - Apr 15 2020 : 09:13:49 AM
|
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 |
 |
|
sean
Whole Tomato Software
    
USA
2817 Posts |
Posted - Apr 15 2020 : 1:10:45 PM
|
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 |
 |
|
|
Topic  |
|