Community
    • Login

    Replace "intro" for "space" in a selected text

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 3.4k Views 2 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.
    • alcx112A Offline
      alcx112
      last edited by

      Hello!
      I’m copying some text from a PDF and when you do that you get the text something like this:
      “Notepad++ was developed by Don Ho in September 2003.[7] The
      developer used JEXT (a Java-based text editor) at his company but,
      dissatisfied with its poor performance, he began to develop a text editor written in C++ with
      Scintilla.[7] He developed it in his spare time since the idea was rejected by his
      company”

      And I’d like it to look like this:
      “Notepad++ was developed by Don Ho in September 2003.[7] The developer used JEXT (a Java-based text editor) at his company but, dissatisfied with its poor performance, he began to develop a text editor written in C++ with Scintilla.[7] He developed it in his spare time since the idea was rejected by his company”

      So, I’d like to replace that change of line for a space. I was using the tool called “Remove unnecesary Balnk and EOL”. It does what I need but to the whole text in the file. I’d like to do it just to a selection (to keep the paragraphs the way they are in the PDF".

      So, today I found out I can search for “intros” as “\r\n” and I could deleted that “intro” and replace it for a “space”.
      I would like to do this with a shortcut. The only way I know I can do this is by recording a Macro. The problem is that I don’t know how to tell that macro to recognize a text selection.
      I recorded the Macro selecting a text and doing the replace operation, but then I tried the Macro and nothing happened :(

      What can I do to make it work?
      Thank you!

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS Offline
        Scott Sumner @alcx112
        last edited by

        @alcx112

        It is hard from your description to tell where things go wrong. Find/Replace is a bit tricky to do in a macro; have you followed the methodology outlined here?: http://docs.notepad-plus-plus.org/index.php/Editing_Configuration_Files#Search_.2F_Replace_encoding

        1 Reply Last reply Reply Quote 0
        • alcx112A Offline
          alcx112
          last edited by

          Thanks! but I really don’t know what to do with that info :(

          Scott SumnerS 1 Reply Last reply Reply Quote 0
          • Scott SumnerS Offline
            Scott Sumner @alcx112
            last edited by

            @alcx112

            Rereading your posting and my answer I realized that you shouldn’t need the information I provided via that link–your situation is simpler.

            I tried what I think is your situation and recording it as a macro worked for me. The key part of what I did that you may be missing is ticking the checkbox for “In selection” in the Replace tab of the Find/Replace dialog (and then pressing the “Replace All” button).

            1 Reply Last reply Reply Quote 0
            • alcx112A Offline
              alcx112
              last edited by

              You are right!
              I forgot something like that. I did itagain paying attention to those details and the Macro works!
              Thank you very much! :D

              1 Reply Last reply Reply Quote 0

              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