Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Keyboard shortcut to toggle symbol highlighting

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
BozicaAyda Posted - Nov 06 2023 : 7:05:17 PM
I see that there is already a keyboard shortcut named `VAssistX.RefResultsToggleHighlight`, which I get a lot of use out of! However, I find the highlighting of the symbol under the cursor (https://docs.wholetomato.com/default.asp?W186) to be kind of distracting when I'm not specifically looking for other references to the symbol under my cursor. My current solution is to disable the feature, and to do a Find All References on the symbol I'm interested in, wait for the operation to complete, then use the existing keyboard shortcut to toggle highlighting of that symbol that I deliberately searched for. It would be much more convenient for me if there were a similar keyboard shortcut that could enable and disable the highlighting of the symbol under the cursor. Let me know if any of the above is unclear, thanks!
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Nov 28 2023 : 07:53:23 AM
If you simply go into VA options dialog and turn On:

VA Options -> Highlighting -> Highlight write references using

and set the two colours you want, then Find References Results will be highlighted by default every time you run Find References. This should help.
BozicaAyda Posted - Nov 27 2023 : 3:10:43 PM
That might be a nicer solution. I find that whenever I trigger "VAssistX.FindReferencesinFile", the "highlight all" checkbox in the top right of the "VA Find References Results" window is always unchecked, even if the box was checked in the previous "instance" of that window, which was replaced by the new Find References Results that was created by triggering the "VAssistX.FindReferencesinFile" command. Is there a setting that will prevent me from having to manually check that box every time I create a new references results window?
feline Posted - Nov 13 2023 : 10:04:30 AM
I am seeing the same behaviour for highlighting part of a symbol, I had not noticed that before.

For highlighting, have you tried Find References in File? Since it is only checking the current file it should be very fast. You can map a keyboard shortcut to this command by mapping:

VAssistX.FindReferencesinFile

since this is a code aware find and highlight, it will only highlight full matches. Again, Escape removes the Find Refences highlighting from the editor for me.

As for what Escape is mapped to, the VS2022 settings dialog reports that it is mapped to:

Edit.SelectionCancel

4 times, with 4 different scopes, but one of the scopes is "Text Editor".
BozicaAyda Posted - Nov 10 2023 : 5:01:44 PM
I see. When I trigger the VAssistX.FindSelected command, I see substrings of other symbols being highlighted as well. For example: if I press Alt+K when my cursor is on a symbol named "Source", the word "Source" is highlighted on each line of this enum, even though the symbol that my cursor is on clearly doesn't appear in this code block:


enum ImGuiInputSource
{
    ImGuiInputSource_None = 0,
    ImGuiInputSource_Mouse,
    ImGuiInputSource_Keyboard,
    ImGuiInputSource_Gamepad,
    ImGuiInputSource_Clipboard,     // Currently only used by InputText()
    ImGuiInputSource_Nav,           // Stored in g.ActiveIdSource only
    ImGuiInputSource_COUNT
};


Are you seeing this behavior as well?

Also, ESC doesn't appear to clear the editor of any highlighted text. Every occurrence of "Source" remains highlighted. What command do you have bound to ESC in Visual Studio?
feline Posted - Nov 07 2023 : 07:54:54 AM
What I do to achieve a very similar, if not identical result, is I have mapped the keyboard shortcut Alt-K to the command:

VAssistX.FindSelected

now when I place the caret into a symbol and press Alt-K all instances are highlighted by VA as if I had done an IDE Find, but without having to actually trigger a Find, or wait for the Find to run.

Then I press Escape to clear this highlighting when I am finished with that symbol.

The highlighting does get updated / moved when you do an IDE find, but I don't tend to find that to be a problem. If anything, the hardest thing is finding a nice keyboard shortcut that isn't already in use.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000