Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 highlight reference to selected symbol

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
pdmig Posted - Oct 08 2013 : 09:44:51 AM
Improvement-suggestion to the current functionality of highlighting references.

Having to search for a symbol to highlight refs is slow.
Automatically highlighting everything under the cursor is too much clutter.

Highlighting symbols under the cursor, but only if it is selected is perfect. See Notepad++ implementation.


Thanks!
11   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jan 03 2014 : 12:02:18 PM
Regarding the sticky highlighting and bookmarks: you can hit ctrl+shift+F, select "Current Document" to look in and hit "Find All". It will list the results in "Find results 1", you can navigate the next by hitting F8, and VA can highlight find results for you.

Regarding the opt in highlighting: the easiest way is to move to first character of a word (ctrl+left) and press ctrl+F3: this will trigger find and highlights the word for you without moving the caret.
jay.carlton Posted - Jan 02 2014 : 4:19:16 PM
quote:
Originally posted by foxmuldr

If I could change one feature about the highlighting, it would be to add a keystroke to make it sticky so that once it highlights something it doesn't unhighlight until the sticky keystroke is hit again.


Hmm. I suppose if it could spawn a bunch of bookmarks from each line in the highlight set, that might do what you want. Then you'd just cycle through those with F2 and hit ctrl-F2 to clear them.
foxmuldr Posted - Jan 02 2014 : 4:09:03 PM
If I could change one feature about the highlighting, it would be to add a keystroke to make it sticky so that once it highlights something it doesn't unhighlight until the sticky keystroke is hit again. I find myself often using the feature to go to a token and begin changing it, or using that cue to know what lines to go to in order to change something else. My biggest issue is that as I'm changing it to the new thing it unhighlights, so I lose the cues for the 2nd, and 3rd, and Nth items I would've been fixing next.
jay.carlton Posted - Jan 02 2014 : 3:13:11 PM
FWIW, I believe the Eclipse IDE highlights matching occurrences the same way as Notepad++. That is, you have to highlight an entire word to get all matches to highlight.

I'm used to doing whole-token highlighting as I type & edit anyway, so I'd tend to prefer the Notepad++ way (opt in) when editing and maybe the "lazy" way (opt out) when viewing. Is there a way to support separate annotation strategies for editing versus viewing read only source? Probably overkill for this, but there might be other applications.
foxmuldr Posted - Jan 01 2014 : 12:32:06 AM
I find VA's highlighting very nice. It is occasionally too much clutter, but pressing Escape makes all of the clutter disappear. I've gotten used to hitting Escape periodically when needed.
feline Posted - Dec 31 2013 : 9:09:37 PM
Apologies for the slow reply.

I have had a look at notepad++, and this highlighting seems slower than the current VA option:

VA Options -> Advanced -> Refactoring -> Automatically highlight references to symbol under cursor

since you have to highlight the entire symbol to trigger it. I realise this is a widely used editor, and you are used to it, but I don't see why making the highlighting a little harder to trigger helps. In my experience I spend vastly more time reading code than I do writing code, so this helps me to quickly identify what I am looking at, and how often it is used.

It also works independently of VA's Find References command, and its highlighting.
hpfx Posted - Dec 17 2013 : 03:43:39 AM
Hi,
no, you won't have random block highlighted every time,
It highlight on following case only : when a full word is selected. (it does not occurs when you just move cursor, or when you copy/past blocks or lines).

Implementation made in notepad++ is very easy and does not disturb user. Many people use this text editor (like me) and like how it works. just give it a try few minutes to see.


I second pdmig feature request, a simple highlight is fast and light. And you probably don't want to alter your existing find reference (accord proposal)

Regards,
feline Posted - Oct 10 2013 : 3:51:53 PM
Isn't this going to highlight odd things every time you select code to edit or delete it? I have never used this particular method myself, but I know I am always highlighting "random" blocks of code as part of my editing process.
pdmig Posted - Oct 10 2013 : 08:00:28 AM
Thanks for the replies!

feline - this is pretty close to what I want. I would still consider it an improvement to not have to press a shortcut to get the highlights.

I am entirely aware that this is a matter of preference, and that this suggestion falls square in between currently available options in vax - but I think the notepad++ way (highlight whatever is selected) is quite optimal - hence the suggestion :)
feline Posted - Oct 09 2013 : 12:06:53 PM
Another option is to map a keyboard shortcut to the command:

VAssistX.FindSelected

I use Alt+k for this personally. This will highlight all references to the symbol the caret is currently in. This is a shortcut to using:

VA Options -> Advanced -> Display -> Highlight find results

which will highlight all instances of the string you just did a Find for. Not as selective as Find References, but it is fast, and uses a different colour to Find References, so you can tell it apart.
accord Posted - Oct 08 2013 : 9:39:32 PM
I think I have a solution for you. Are you aware of VAssistX -> Find References in File? You can assign a shortcut to it:

Tools -> Options -> Environment -> Keyboard

Here, type vassistx.findreferencesinfile to filter, select "Text Editor" under "Use new shortcut in:" and now you can assign a keyboard shortcut.

Hope this helps a little bit.

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