+ Reply to Thread
Results 1 to 5 of 5

Thread: how to show all matched search results?

  1. #1

    how to show all matched search results?

    Hello,

    I just started using vedit today and here is my first question. Let's say I am editing following 4 lines of code:

    abc 123 abcd abc
    ABC dAbc
    abcABC aBC
    ABcd abcD ABC AbCd


    I am trying to search for word "abc" ignoring case, and I want vedit can highlight all matched results (5 matches in this example) no matter it is from bottom or from above.

    How can I do that? Thanks.

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Location
    British Columbia, Canada
    Posts
    383
    Hi Lxl65,

    Welcome to Vedit & the Forum!

    To do that from the menu system:

    1. Select Search from the main menu
    2. Select Search from the Search Menu
    3. Enter abc as your search term
    4. click on box labelled Word, so it is checked.
    5. make sure the case sensitive box is unchecked
    6. to ensure search starts at top of file, check begin-of-file/block, else search starts at current file position.
    7. click Next
    8. To goto the second and beyond found match, from the menu, use Search > Next

    It won't highlight the word, just the first letter, to highlight the word would require a macro.

    Does that help?

    Scott
    Using Vedit 6.21.3, (32 bit), dated 9/12/11 running on Windows 7 (64 bit).

  3. #3
    thanks. I think I can live with this.

  4. #4
    Quote Originally Posted by Scott Lambert View Post
    Hi Lxl65,
    It won't highlight the word, just the first letter, to highlight the word would require a macro.
    Scott
    Scott, what do you mean Search only highlights the first letter? It does highlight the word or string you were searching, but the highlighting is removed when you move the cursor.
    But it does not highlight all the words on screen that match the search, as many other programs (such as web browsers) do.

    Some years ago I wrote this macro (attached) that highlights all the searched words using syntax highlighting.
    After you have performed the search, call this macro to highlight all words. (However, it does not work if you use pattern matching codes or regular expressions.)

    Another way is to use "Search" -> "Wildfile" (or click the Wildfile button on Toolbar).
    It displays all matching lines on a window.
    Normally, it searches multiple files on disk, but if you only want to search the current file, leave the "Files" field empty.
    Attached Files Attached Files
    Pauli -- Using Vedit 6.24.2 on Windows 7 Enterprise (64 bit) and on Windows 10 (64 bit)

  5. #5
    Senior Member
    Join Date
    Aug 2011
    Location
    British Columbia, Canada
    Posts
    383
    Hi Peter,

    You are correct. Vedit does highlight the whole word. What was I thinking when I posted that???? Thank you for catching that... my bad.

    Interesting use of syntax highlighting. Well done Peter!

    Scott
    Using Vedit 6.21.3, (32 bit), dated 9/12/11 running on Windows 7 (64 bit).

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts