Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 1.7k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors