• Login
Community
  • Login

Автоматический перенос строки

Scheduled Pinned Locked Moved General Discussion
29 Posts 5 Posters 9.5k 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.
  • G
    Gena M @PeterJones
    last edited by Mar 13, 2021, 8:37 AM

    @PeterJones Hello! I follow your instruction literaly … Step by step. But I can’t see PasteEnter in Macros menu! I try in 2 computers, but nothing… Please, help! !
    ![0_1615624589383_Screenshot_1.png](Uploading 100%)
    ![0_1615624617723_Screenshot_2.png](Uploading 100%)

    P 1 Reply Last reply Mar 13, 2021, 6:35 PM Reply Quote 0
    • P
      PeterJones @Gena M
      last edited by Mar 13, 2021, 6:35 PM

      @Gena-M said in Автоматический перенос строки:

      0_1615624589383_Screenshot_1.png

      Sorry, your screenshots did not embed properly, so I cannot see what you showed.

      The procedure I described reliably works for me. So maybe you did something wrong or you missed a step.

      Please respond to the following questions/requests to help us help you:

      1. Please share those screenshots again – make sure they show up in the “preview” window in the forum – that will help us understand what you have and what you don’t have
      2. Please go to the ? menu and Debug Info entry, and copy/paste that information into your reply. This will tell us what version you are using and what directories we should expect files to be in
      3. Did you create the macro as described in the 6 steps in my first message? Please show us a screenshot of the Macro menu to show that PasteEnter macro was created and saved
      4. Did you correctly edit the Context Menu (including restarting Notepad++)?

      Hopefully, we can help you figure out which step went wrong.

      1 Reply Last reply Reply Quote 0
      • V
        Vio Ru
        last edited by Sep 5, 2023, 5:54 PM

        In new versions this method does not work, because the developers changed the code in Shortcuts, could you help me set up line wrapping when inserting in a new version of Notepad?

        P 1 Reply Last reply Sep 5, 2023, 6:01 PM Reply Quote 0
        • P
          PeterJones @Vio Ru
          last edited by Sep 5, 2023, 6:01 PM

          @Vio-Ru said in Автоматический перенос строки:

          In new versions this method does not work, because the developers changed the code in Shortcuts,

          There’s an entire FAQ entry that explains exactly what you need to change to make a macro recorded in an old version to work with v8.5.3. and newer. Follow those instructions, and it will work for you.

          1 Reply Last reply Reply Quote 0
          • V
            Vio Ru
            last edited by Vio Ru Sep 5, 2023, 6:12 PM Sep 5, 2023, 6:07 PM

            It didn’t work out for me, that’s why I’m asking for help. I think it’s about, but, what to replace it with, I do not know

            05-09-2023 21-08-38.png

            P 1 Reply Last reply Sep 5, 2023, 6:24 PM Reply Quote 0
            • P
              PeterJones @Vio Ru
              last edited by PeterJones Sep 5, 2023, 6:51 PM Sep 5, 2023, 6:24 PM

              @Vio-Ru said in Автоматический перенос строки:

              It didn’t work out for me, that’s why I’m asking for help.

              You didn’t actually read and understand the FAQ, or follow its instructions, did you?

              I think it’s about, but, what to replace it with, I do not know

              That’s because you didn’t read the FAQ.

              05-09-2023 21-08-38.png

              Yep. The FAQ explains how to fix that underlined section that you showed from shortcuts.xml:

              67f4ab04-e6d7-4b23-8131-b3ae083825ca-image.png

              So if you have in your macro, you need to run the search-and-replacements listed in the screenshot of the FAQ that I just showed, and then save the shortcuts.xml file, then restart Notepad++. After that, it will work.

              1 Reply Last reply Reply Quote 2
              • V
                Vio Ru
                last edited by Sep 5, 2023, 7:02 PM

                It just replaces these values & #x0D; & #x0A; Shouldn’t it be the same?

                05-09-2023 21-57-31.png

                P 1 Reply Last reply Sep 5, 2023, 7:43 PM Reply Quote 0
                • P
                  PeterJones @Vio Ru
                  last edited by PeterJones Sep 5, 2023, 8:13 PM Sep 5, 2023, 7:43 PM

                  @Vio-Ru said in Автоматический перенос строки:

                  It just replaces these values & #x0D; & #x0A;

                  Yes, that’s what the instructions are supposed to do.

                  Shouldn’t it be the same?

                  The same as what? That makes no sense.

                  But since I cannot seem to teach you how to do this, I will spoon-feed you the answer.

                  Your macro in shortcuts.xml used to be

                  <Macro name="PasteEnter" Ctrl="no" Alt="no" Shift="no" Key="0">
                      <Action type="0" message="2179" wParam="0" lParam="0" sParam="" /><!-- paste -->
                      <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x000D;&#x000A;" /><!-- type CRLF -->
                  </Macro>
                  

                  Now that same section in shortcuts.xml needs to be

                  <Macro name="PasteEnter" Ctrl="no" Alt="no" Shift="no" Key="0">
                      <Action type="0" message="2179" wParam="0" lParam="0" sParam="" /><!-- paste -->
                      <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x0D;&#x0A;" /><!-- type CRLF -->
                  </Macro>
                  

                  Then save, exit Notepad++, and reload. Now your Macro > PasteEnter will work again.

                  ----
                  edit: fixed the forum’s corruption of my intended post

                  T V 2 Replies Last reply Sep 5, 2023, 8:05 PM Reply Quote 0
                  • T
                    TBugReporter @PeterJones
                    last edited by TBugReporter Sep 5, 2023, 8:09 PM Sep 5, 2023, 8:05 PM

                    @PeterJones said in Автоматический перенос строки:

                    Your macro in shortcuts.xml used to be […]

                    Now that same section in shortcuts.xml needs to be […]

                    I cut, pasted, and compared your two code snippets twice, and can find no difference between them other than the second one ends with four backquotes instead of three.

                    P 1 Reply Last reply Sep 5, 2023, 8:11 PM Reply Quote 1
                    • P
                      PeterJones @TBugReporter
                      last edited by PeterJones Sep 5, 2023, 8:14 PM Sep 5, 2023, 8:11 PM

                      I cut and pasted your two code snippets twice, and can find no difference between them other than the second one ends with four backquotes instead of three.

                      Sorry, I used the “edit” feature in the forum to add shortcuts.xml a couple times, but the stupid forum software converts &-encoded sequences into their raw results, even when they are in code blocks which are supposed to be protected against such edits.

                      I have fixed it in my post above.

                      T 1 Reply Last reply Sep 5, 2023, 8:18 PM Reply Quote 0
                      • T
                        TBugReporter @PeterJones
                        last edited by Sep 5, 2023, 8:18 PM

                        @PeterJones said in Автоматический перенос строки:

                        stupid forum software converts &-encoded sequences

                        So how does one go about preventing this? Is there a FAQ for this?

                        P 1 Reply Last reply Sep 5, 2023, 8:21 PM Reply Quote 0
                        • P
                          PeterJones @TBugReporter
                          last edited by Sep 5, 2023, 8:21 PM

                          @TBugReporter said in Автоматический перенос строки:

                          So how does one go about preventing this?

                          Don’t edit your post after initially posting. ;-)

                          If you do, always check that everything renders as expected in the PREVIEW window and after hitting SUBMIT

                          Is there a FAQ for this?

                          Yes. It’s in the Entities section of Formatting Forum Posts

                          1 Reply Last reply Reply Quote 1
                          • V
                            Vio Ru @PeterJones
                            last edited by Sep 5, 2023, 8:22 PM

                            @PeterJones said in Автоматический перенос строки:

                            Now your Macro > PasteEnter will work again

                            No it’s not. I saved, reloaded and it doesn’t work. N++ 8.5.6x32

                            05-09-2023 23-20-36.png

                            P 1 Reply Last reply Sep 5, 2023, 8:26 PM Reply Quote 0
                            • P
                              PeterJones @Vio Ru
                              last edited by PeterJones Sep 5, 2023, 8:28 PM Sep 5, 2023, 8:26 PM

                              @Vio-Ru said in Автоматический перенос строки:

                              No it’s not. I saved, reloaded and it doesn’t work. N++ 8.5.6x32

                              The macro I showed works. Your macro is not working because you messed up the XML file, so now no macros will work.

                              The syntax highlighting in your screenshot clearly indicates that the starting line of your macro – which is required for it to work – is commented out.

                              1064aacc-1d95-4973-94cf-57e514581098-image.png

                              (The green colored text means “comment”)

                              If you were showing the screenshot of the whole line, rather than cutting off the left side of the document, I could have probably even told you the exact location where you messed it up. As it is, I can tell you with confidence that somewhere between line 7 and line 11, you do not properly close the comment that line 7 is a part of. (Or maybe there are multiple comments between 7 and 11. Or maybe even 6-7 shouldn’t be commented; I’m not sure on that.)

                              1 Reply Last reply Reply Quote 1
                              • V
                                Vio Ru
                                last edited by Sep 5, 2023, 8:30 PM

                                05-09-2023 23-29-01.png

                                P 1 Reply Last reply Sep 5, 2023, 8:35 PM Reply Quote 0
                                • V
                                  Vio Ru
                                  last edited by Sep 5, 2023, 8:35 PM

                                  I found my mistake)) Thank you very much for your help, Peter!

                                  1 Reply Last reply Reply Quote 0
                                  • P
                                    PeterJones @Vio Ru
                                    last edited by PeterJones Sep 5, 2023, 8:36 PM Sep 5, 2023, 8:35 PM

                                    @Vio-Ru ,

                                    Yes, your wider screenshot shows that you started a comment before the <Macro name="aa" and never closed it. Close your comment, and save and restart, and things should work.

                                    edit: sorry, I was typing my reply when you posted your “I found my mistake” message

                                    1 Reply Last reply Reply Quote 0
                                    • Lash HaraL
                                      Lash Hara
                                      last edited by Sep 7, 2023, 3:21 PM

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote -1
                                      • First post
                                        Last post
                                      The Community of users of the Notepad++ text editor.
                                      Powered by NodeBB | Contributors