Highlighting the currently selected string

Highlighting the currently selected string

3
NewbieNewbie
3

    Aug 29, 2008#1

    Hi,

    is it possible (via syntax highlighting ?) to highlight the currently selected string like this:

    2008-08-29_162115.png (5.25KiB)

    Seen that in Eclipse or as above in Notepad++

    Thanks from a 10+ year UltraEdit user.

    6,602548
    Grand MasterGrand Master
    6,602548

      Aug 29, 2008#2

      Run a find with the selected string and enable option Highlight All Items Found. The found strings will be highlighted as long as you do not move the cursor or continue editing. I for myself run in such situations always a Find In Files on all open files with result to the output window or use the option List Lines Containing String in the find dialog. But most of the time I simply select a text and press repeatedly F3 to find the other occurrences and edit them if necessary. Find a selected text with F3 or Ctrl+F3 requires enabled configuration setting:

      Find next/prev finds selected text (not last searched for text)

      If this option is selected the editor will find the selected text when a FIND NEXT/PREVIOUS command is performed instead of the previous search string UNLESS the Regular Expressions option is selected.


      A permanent highlighting until you want something different highlighted is not possible, except you open the wordfile currently in use, add the word (not strings!) you want highlighted to one of the color groups of the language currently used for syntax highlighting and save the wordfile. Now switch back to your file and you will see that word highlighted.

      The exact same feature as in Eclipse or in Notepad++ is currently not available in UltraEdit.
      Best regards from an UC/UE/UES for Windows user from Austria

      1
      NewbieNewbie
      1

        Oct 06, 2009#3

        I love UE. It is robust and lightweight. It is open all day everyday at work. I also use eclipse for Java development.

        I've gotten quite accustomed to highlighting the current word in eclipse and having all other occurrences of the word highlighted in the current file. It is a very useful tool.

        As of the last post (August 2008) this functionality wasn't in UE. Does it now exist (1 year + later)? It would be another great feature.

        If it is not:
        Ian, could we get this feature (as implemented in eclipse)?

        Thanks

        6,602548
        Grand MasterGrand Master
        6,602548

          Oct 06, 2009#4

          Hector wrote:Does it now exist (1 year + later)?
          No, also just released UE v15.20.0.1016 does not have such a feature. I guess most users use the existing capabilities and therefore have not sent a feature request email to IDM for such a feature.
          Best regards from an UC/UE/UES for Windows user from Austria

          1
          NewbieNewbie
          1

            Nov 13, 2009#5

            I just sent a feature Request to IDM concerning this feature, really would love to see it as an option in future versions.

            I've seen this feature in Notepad++ which I had to use for a while until I got my UEMobile and really fell in love with this feature.
            It really helps a lot if you have to typewrite code, especially helps to find and correct typos on text that you can't spell check.

            27
            Basic UserBasic User
            27

              Feb 18, 2011#6

              This feature is available in UltraEdit v17.00 and later. :)

              12
              Basic UserBasic User
              12

                Sep 09, 2011#7

                +1

                Please, add this feature soon. Notepad++ has this so long time. Will be nice and useful if clicking a word UE highlight all occurrence automatically (not using the Find command).

                Thank you in advance

                27
                Basic UserBasic User
                27

                  Sep 09, 2011#8

                  CFQueb wrote:Please, add this feature soon. Notepad++ has this so long time. Will be nice and useful if clicking a word UE highlight all occurrence automatically (not using the Find command).
                  It's available from the version 17.00.
                  IDM wrote:The persistent "highlight all" can be invoked on the word under the caret either via Shift + Double Click or via the hotkey Ctrl + . (period). There is also a new "Highlight All Selected" toolbar icon which can be used to enable/disable persistent highlighting - this also works with the "Highlight All Items Found" item in the Find dialog.

                  901
                  MasterMaster
                  901

                    Sep 10, 2011#9

                    CFQueb wrote:Will be nice and useful if clicking a word UE highlight all occurrence automatically (not using the Find command).
                    While single clicking in NP++ is convenient, it really isn't the best solution for an editor that handles huge files. A global highlight on a huge file could really bog down the editor. The Ctrl+Period solution works well enough for me.

                    12
                    Basic UserBasic User
                    12

                      Mar 17, 2012#10

                      Yes.. You're right. A single click is not the best approach to do this.

                      6,602548
                      Grand MasterGrand Master
                      6,602548

                        Jun 09, 2015#11

                        Feature Highlight All Selected with default hotkey assignment Ctrl+. was enhanced in UE v22.10.

                        It can be used since UE v22.10 also to highlight all occurrences of an existing selection in active file. Highlight All Selected selects the word at current position of caret and highlights all occurrences of this string if there is no selection and there is also no highlighting of found strings already active in which case the command toggles off the highlighting.
                        Best regards from an UC/UE/UES for Windows user from Austria

                        2
                        NewbieNewbie
                        2

                          Feb 04, 2016#12

                          I'm really happy to have a computer which lighten my workload and automatically executes functions like reformatting.

                          Isn't there a way to let UltraEdit automatically highlight all occurrences of the currently selected text?

                          It's annoying to always press Ctrl+. if one always would like to have selected text highlighted like other editors support it.

                          Is it possible to call a script on a event like "Text selected"?

                          Thanks a lot for any help.

                          Kind regards,
                          Tom

                          6,602548
                          Grand MasterGrand Master
                          6,602548

                            Feb 05, 2016#13

                            Scripts/macros can be run only on action of user (or from command line). A script/macro would not help here as command Highlight All Selected is not available as scripting or macro command.

                            There is no configuration option to highlight automatically all occurrences of a selected text. There is the Shift+double click feature configurable at Advanced - Configuration - Search - Advanced which can be used to get highlighted all occurrences of a word.

                            In case of mouse is used mainly to make a selection, a click on Highlight All Selected symbol in MAIN toolbar is the most efficient way to highlight all occurrences of the selection. The symbol is in group with all the find/replace symbols (binoculars).

                            In case of keyboard is used mainly to make a selection it may be better to assign a different, easier to press key to command ViewHighlightAllSelected at Advanced - Configuration - Key Mapping. You don't write assembler or HTML code and therefore nearly never need to enter character #, then assigning this command to key # might be a good idea.
                            Best regards from an UC/UE/UES for Windows user from Austria

                            2

                              Apr 05, 2018#14

                              Hi,

                              I have briefly skimmed through this thread and tried out the highlighting options, but I did not find the exact equivalent of Notepad++ feature. In UE the Ctrl+. highlights all occurrences of the selected text even if those are just substrings of a longer word. Is there a way to only highlight the other occurrences when they are exact equivalents? E.g. when cursor is positioned on the word come, it would not highlight the "come" part in the word welcome.

                              Thanks,
                              Tom

                              6,602548
                              Grand MasterGrand Master
                              6,602548

                                Apr 06, 2018#15

                                Well, highlight all selected is not highlight all occurrences of selected word as the user can have more than a single word selected too.

                                It is possible to run a regular Find, not a Quick Find, with options Match whole word only, Match case and Highlight all items found checked. The hotkeys to press for executing such a find for word at caret in English UltraEdit are:
                                1. Ctrl+F or twice Ctrl+F depending on configuration, see Quick Find versus Find and how to customize the usage of both (Ctrl+F behavior).
                                  The word at caret position (or the selected text if something is selected) is automatically preset as string to find.
                                2. Alt+W to check Match whole word only if not already checked from a previous Find.
                                3. Alt+M to check Match case if not already checked from a previous Find.
                                  It is also possible to press just M if Find what edit field has not the input focus.
                                4. Alt+I to check Highlight all items found if not already checked from a previous Find.
                                5. RETURN to execute the Find (best with option Close after find also checked).
                                Click on gearwheel button on not seeing the advanced Find options after opening the dialog.

                                See also the configuration settings at Advanced - Settings or Configuration - Search - Auto reset settings. You might uncheck Highlight all items found, Match case, Match whole word only to have these three advanced find options always set as last time used in Find dialog.

                                With Match whole word only and Match case checked and Regular expressions not checked in Find dialog and configuration setting Find next/prev finds selected text (not last searched for text) checked at Advanced - Settings or Configuration - Search - Miscellaneous, it is also possible to press Ctrl+J to execute Select word at caret position and run with F3 command Find next and with Ctrl+F3 the command Find previous for searching case-sensitive for the selected word which makes finding all occurrences much faster than running a Find to highlight all occurrences of a word and searching with human eyes and brain in displayed area. Searching by key is always more efficient than searching with eyes and brain.
                                Best regards from an UC/UE/UES for Windows user from Austria

                                Read more posts (9 remaining)