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
 highlight reference to selected symbol
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pdmig
New Member

2 Posts

Posted - Oct 08 2013 :  09:44:51 AM  Show Profile  Reply with Quote
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!

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 08 2013 :  9:39:32 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Oct 09 2013 :  12:06:53 PM  Show Profile  Reply with Quote
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.

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

pdmig
New Member

2 Posts

Posted - Oct 10 2013 :  08:00:28 AM  Show Profile  Reply with Quote
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 :)

Edited by - pdmig on Oct 10 2013 08:00:45 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Oct 10 2013 :  3:51:53 PM  Show Profile  Reply with Quote
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.

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

hpfx
New Member

3 Posts

Posted - Dec 17 2013 :  03:43:39 AM  Show Profile  Reply with Quote
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,
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Dec 31 2013 :  9:09:37 PM  Show Profile  Reply with Quote
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.

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

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Jan 01 2014 :  12:32:06 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

jay.carlton
Ketchup Master

USA
65 Posts

Posted - Jan 02 2014 :  3:13:11 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Jan 02 2014 :  4:09:03 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

jay.carlton
Ketchup Master

USA
65 Posts

Posted - Jan 02 2014 :  4:19:16 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 03 2014 :  12:02:18 PM  Show Profile  Reply with Quote
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.
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