Announcement

Collapse
No announcement yet.

Feature request: Highlight instances of a selected word

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aaron
    replied
    Hello,

    It's something we want to tackle, but the current Find wasn't initially built with this behavior in mind, and isn't a small change to implement. Given this is how many modern Find solutions work, it's definitely on our radar when we're redesigning this area of the program.

    Leave a comment:


  • MichaelR
    replied
    This is something still on our wishlist as something we'd like to tackle;
    I'm really wondering why this is not yet available. Implementation of such a feature shouldn't be much effort and there are lots of requests for that starting a long time ago:
    https://www.scootersoftware.com/vbul...ht-all-matches
    https://www.scootersoftware.com/vbul...-selected-text
    https://www.scootersoftware.com/vbul...h-highlighting
    https://www.scootersoftware.com/vbul...-selected-word
    https://www.scootersoftware.com/vbul...ight-same-text

    The requests are starting in 2009!
    Currently I'm opening the files with Notepad++ when I need the highlighting to get a better overview of the file content. Maybe it's not yet clear why this is so useful. One example: You find a difference in the 10th line below, where suggestedItem is used, and want to see what exactly it is related to. By double clicking 'suggestedItem', all occurrences of that word are highlighted (better by background color but this is not possible to show here), so that you can immediately find the definition and assignment of that variable.

    Code:
    ICompletionData suggestedItem = listBox.SelectedIndex != -1 ? (ICompletionData)(listBox.Items[listBox.SelectedIndex]) : null;
    
    var listBoxItems = new ObservableCollection<ICompletionData>();
    int bestIndex = -1;
    int bestQuality = -1;
    double bestPriority = 0;
    int i = 0;
    foreach (var matchingItem in matchingItems) {
        double priority = matchingItem.Item == suggestedItem ? double.PositiveInfinity : matchingItem.Item.Priority;
        int quality = matchingItem.Quality;
        if (quality > bestQuality || (quality == bestQuality && (priority > bestPriority))) {
            bestIndex = i;
            bestPriority = priority;
            bestQuality = quality;
        }
        listBoxItems.Add(matchingItem.Item);
        i++;
    }
    This is just one example for something which happens quite often and is very helpful for me and other users as well.
    Please consider to increase priority for this request.

    Leave a comment:


  • PasTob
    replied
    Can you please pump this up to the top of the wishlist, because the OP is from 2009 (9 years ago).

    thx a lot

    Leave a comment:


  • Aaron
    replied
    Thanks for the feedback. This is something still on our wishlist as something we'd like to tackle; I'll add your notes to our entry on the subject.

    Leave a comment:


  • PasTob
    replied
    +99999 also from here.
    On reviewing code this would be very helpful.
    Also "Meld" from Tortoise can do this.

    Come on guys @ scooter software, please implement this feature.

    Thank you!

    Leave a comment:


  • cwilliamson
    replied
    Me too!!! I want all instances of the current selection highlighted. Or even a "find-all" that we could run that would highlight all instances of searching string. Highlighting has to be persistent though.

    Please please please!!

    Leave a comment:


  • epatton
    replied
    I'd really like this feature too. Understand for C++ and eclipse has it.

    Cheers
    Eddie

    Leave a comment:


  • rzegers
    replied
    It would be great if this gets implemented. It saves times and errors during code reviews, highlighting all uses of a specific variable for instance. Hope this will be added.

    Leave a comment:


  • Aaron
    replied
    Thanks. This isn't a feature we've been able to implement, but is still on our wishlist.

    Leave a comment:


  • HubertR
    replied
    I would also love to see this feature. Frequently I have to copy text from BC to N++ to see all the places where some (let's say) variable is used. This is very inconvenient. It's not hard to add, and lots of other text editors have it.

    Leave a comment:


  • sklibanov
    replied
    Originally posted by GreenMoose View Post
    Notepad++ has a feature which highlight other occurrences of a word when I select it.
    I think it would be nice feature in BC as well (makes it easy to spot where a variable is used for instance, I often use it when I'm editing .bat files to find usage of %Variable%).
    Although notepad++ restricts it to one word, i.e. no whitespace in selection is allowed. Don't know if this limitation is good or bad, IMHO it's bad =).
    Agreed, this would be sweet.

    Leave a comment:


  • Michael Bulgrien
    replied
    Originally posted by rgjordan View Post
    I'd prefer that the find option in bc just search in a loop instead of having to specify whether to search up/down.
    Choose the "Wrap search" option on the Find dialog.

    Leave a comment:


  • Aaron
    replied
    Hello,

    Thanks for the highlight suggestions. I've added them as an entry on our wishlist.

    Note: we have a Wrap Search option, so you do not have to specify Up or Down if you check that box.

    Leave a comment:


  • rgjordan
    replied
    Yes, highlight on the fly would be nice. Highlight with regular expression support would be even better(like EditPad Pro). I use the highlight feature all of the time in Firefox with the find function. Also, I'd prefer that the find option in bc just search in a loop instead of having to specify whether to search up/down.

    Rob

    Leave a comment:


  • Michael Bulgrien
    replied
    UltraEdit has a "Highlight All Items Found" checkbox on their find dialog as well. The search string can pretty much be anything (no whitespace restrictions). And, as I suspect is the case in Notepad++, it really is not a highlight, it is a selection. You can actually do a cut operation to remove all of the found strings.

    Edit: I was mistaken about being able to copy or cut the collective selection. I guess I'll have to put in an enhancement request with my friends at IDM Software...
    Last edited by Michael Bulgrien; 27-Apr-2009, 10:44 PM.

    Leave a comment:

Working...
X