• Login
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.
  • C
    Claudia Svenson
    last edited by Jun 25, 2019, 11:26 PM

    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

    A A 2 Replies Last reply Jun 26, 2019, 4:41 AM Reply Quote 0
    • A
      andrecool-68 @Claudia Svenson
      last edited by Jun 26, 2019, 4:41 AM

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

      Imgur

      1 Reply Last reply Reply Quote 0
      • C
        Claudia Svenson
        last edited by Jun 26, 2019, 6:22 AM

        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.

        A 1 Reply Last reply Jun 26, 2019, 6:28 AM Reply Quote 0
        • A
          andrecool-68 @Claudia Svenson
          last edited by Jun 26, 2019, 6:28 AM

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

          1 Reply Last reply Reply Quote 0
          • A
            Alan Kilborn @Claudia Svenson
            last edited by Alan Kilborn Jun 26, 2019, 1:11 PM Jun 26, 2019, 1:10 PM

            @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
            4 out of 5
            • First post
              4/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors