Community
    • Login

    Is there a shortcut for starting search in different search modes, e.g. normal and regex search mode?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    searchregexshortcutshortcut mapper
    7 Posts 3 Posters 373 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sebastian FreehS
      Sebastian Freeh
      last edited by

      Hi,
      When I press CTRL-F the search opens and I can use the radio buttons to select a search mode (using the mouse or navigating using the tab and arrow keys)
      However, I am switching between different search modes fairly often and therefore I’d like to know:

      1. is there any way to switch from normal search mode to regex search mode using a shortcut after opening the serach with ctrl-F?

      2. Or even better: is there a shortcut for starting a search in normal mode and another shortcut for starting search in regex mode?

      3. If not, can I somehow define such shortcuts on my own?

      Since I am switching between them very often that would be really a time saver.
      Thanks

      Michael VincentM 1 Reply Last reply Reply Quote 0
      • Michael VincentM
        Michael Vincent @Sebastian Freeh
        last edited by

        @Sebastian-Freeh said in Is there a shortcut for starting search in different search modes, e.g. normal and regex search mode?:

        1. is there any way to switch from normal search mode to regex search mode using a shortcut after opening the serach with ctrl-F?

        Yes.

        • Alt-N = Normal search
        • Alt-X = Extended
        • Alt-G = Regular expression.

        In fact, Alt+ any underlined letter on text items in the Find dialog will activate that component.

        f135a548-81f5-4bfa-9569-466444e2f472-image.png

        Cheers.

        Sebastian FreehS 1 Reply Last reply Reply Quote 3
        • Sebastian FreehS
          Sebastian Freeh @Michael Vincent
          last edited by

          @Michael-Vincent Thanks!
          When I use English as localization that works perfectly!
          When I swith to german however, my native language, the unterlined characters are a bit different:

          ALT-l for normal
          ALT-i for extended
          ALT-R for regex (but ambiguoesly also used for backwards search (Rückwärts suchen))

          2020-11-20 16_42_31.jpg

          When I press ALT-i it works perfectly fine and activates the radio button.
          When pressing ALT-l or ALT-R however, the marker jumps to normal (in german Normal) but the radio button is not activated. Pressing ENTER does not activate the radio button. Is there any way to to toggle the radio button when the marker is on it?
          Switching to english localization is not an option in the long-term…
          Thanks for any ideas

          Alan KilbornA 1 Reply Last reply Reply Quote 3
          • Alan KilbornA
            Alan Kilborn
            last edited by Alan Kilborn

            @Sebastian-Freeh said in Is there a shortcut for starting search in different search modes, e.g. normal and regex search mode?:

            If not, can I somehow define such shortcuts on my own?

            Make them anything you like.
            Presume you are using the English translation of Notepad++ (but similar for other languages if you use something else).
            Edit the English_customizable.xml file.
            Find the relevant area.
            Change, for N++'s “Count” function as an example:

            • <Item id="1614" name="Coun&amp;t"/>
              to
            • <Item id="1614" name="&amp;Count"/>

            with the &amp; part being the important part, to change the accelerator from Alt+t to Alt+c.
            Make sure you don’t define two things with the same combo!
            Save.
            Set your Localization to English (customizable).
            Profit.

            So a bit light on the details here, but if more is wanted, can certainly supply.

            Sebastian FreehS 1 Reply Last reply Reply Quote 4
            • Alan KilbornA
              Alan Kilborn @Sebastian Freeh
              last edited by Alan Kilborn

              @Sebastian-Freeh said in Is there a shortcut for starting search in different search modes, e.g. normal and regex search mode?:

              Is there any way to to toggle the radio button when the marker is on it?

              Space bar press+release?

              By “marker” I presume you mean the indication that shows you you have input focus on a certain control?

              Sebastian FreehS 1 Reply Last reply Reply Quote 3
              • Sebastian FreehS
                Sebastian Freeh @Alan Kilborn
                last edited by

                @Alan-Kilborn
                Space bar press+release?

                Thanks! That worked like a charme!

                By “marker” I presume you mean the indication that shows you you have input focus on a certain control?

                Yes, that’s exactly what I meant

                1 Reply Last reply Reply Quote 3
                • Sebastian FreehS
                  Sebastian Freeh @Alan Kilborn
                  last edited by Sebastian Freeh

                  @Alan-Kilborn said in Is there a shortcut for starting search in different search modes, e.g. normal and regex search mode?:

                  Make them anything you like.

                  Thank you, for the explanation I will definitly try it out and let you know how it worked for me!

                  1 Reply Last reply Reply Quote 4
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors