Community
    • Login

    How to write and execute a replace script by menu/hotkey?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 1.3k 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.
    • Claudia SvensonC
      Claudia Svenson
      last edited by

      In many files I have to execute some replacements, e.g. simplified

      replace (all occurrencies of) “aaa” by “bbb”
      replace (all occurrencies of) “2018” by “2019”

      Therefore I would like to

      1. Write a replace script in Notepad++ which contains all these replacement instructions
      2. Load a file
      3. Execute the previously created replace script by (sub)menu or hotkey in NP++

      How can I achieve this in detail?
      Does NP++ offer this feature or is there a Plugin for that?

      Claudia

      andrecool-68A Alan KilbornA 2 Replies Last reply Reply Quote 0
      • andrecool-68A
        andrecool-68 @Claudia Svenson
        last edited by

        @Claudia-Svenson Find and replace in the entire catalog … not suitable?

        Imgur

        1 Reply Last reply Reply Quote 0
        • Claudia SvensonC
          Claudia Svenson
          last edited by

          Yes, thats perfect for a one-time replacement.

          But I need this replacement with specific pattern frequently.

          Having to enter it manually in the mentioned dialog every time is uncomfortable.
          So I need a script handling for that.

          andrecool-68A 1 Reply Last reply Reply Quote 0
          • andrecool-68A
            andrecool-68 @Claudia Svenson
            last edited by

            @Claudia-Svenson You need a magic wand … I don’t have one)))

            1 Reply Last reply Reply Quote 0
            • Alan KilbornA
              Alan Kilborn @Claudia Svenson
              last edited by Alan Kilborn

              @Claudia-Svenson

              You can record a macro for the replacement operation. See the Macro menu – fairly self-explanatory. The macro snapshot happens when one of the buttons is pressed (e.g. Replace, Replace All, etc).

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