Community
    • Login

    Moving blocks along with content

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    15 Posts 4 Posters 4.2k 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.
    • andrecool-68A
      andrecool-68 @TheMARK2580
      last edited by

      @TheMARK2580 Cut and paste, I see no other options.

      1 Reply Last reply Reply Quote 0
      • rddimR
        rddim
        last edited by rddim

        @TheMARK2580

        method 1

        • Click on the folded line number (eg. 322 in your screen)
        • Press Shift + End
        • Drag and drop the selected item or move it by pressing Ctrl + Shift + Up/Down arrow

        method 2

        • Place the cursor at the begining of the folded line
        • Press Shift + Down arrow
        • Drag and drop the selected item or move it by pressing Ctrl + Shift + Up/Down arrow

        Based on the https://notepad-plus-plus.org/community/topic/16670/code-folding-copy-paste-bug

        Alan KilbornA 1 Reply Last reply Reply Quote 4
        • Alan KilbornA
          Alan Kilborn @rddim
          last edited by

          @rddim

          Neither method 1 nor method 2 worked for me with Notepad++ 7.7. All that resulted was “messed up” text. Is your advice coming from use in Notepad++ 7.7 or some other version?

          andrecool-68A rddimR 2 Replies Last reply Reply Quote 0
          • andrecool-68A
            andrecool-68 @Alan Kilborn
            last edited by

            @Alan-Kilborn
            The second method works for me with xml files.(Notepad ++ 7.7)

            1 Reply Last reply Reply Quote 1
            • andrecool-68A
              andrecool-68
              last edited by

              In the ini files it is better to use …Shift + Down arrow …cut and paste)

              1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • andrecool-68A
                  andrecool-68
                  last edited by

                  Easier to make a macro “Cut minimized block”

                  		<Macro name="Cut minimized block" Ctrl="no" Alt="no" Shift="no" Key="0">
                  			<Action type="0" message="2301" wParam="0" lParam="0" sParam="" />
                  			<Action type="0" message="2177" wParam="0" lParam="0" sParam="" />
                  			<Action type="2" message="0" wParam="42001" lParam="0" sParam="" />
                  		</Macro>
                  
                  1 Reply Last reply Reply Quote 0
                  • Alan KilbornA
                    Alan Kilborn
                    last edited by

                    Hmmm, tried to purge a posting, not sure if it worked. Anyway if you see a post from me above that looks like it has INI file examples, pls ignore…

                    Here’s the new thing I wanted to say:

                    I did some more in-depth testing. What first appeared to be “messed up text” in some cases was really just some unexpected unfolding of certain blocks; the text itself was actually consistent.

                    Drag and drop seemed to work okay. However, using the line up or line down command didn’t seem to respect the folding of the destination block (truly this is what I would expect anyway, though).

                    1 Reply Last reply Reply Quote 1
                    • andrecool-68A
                      andrecool-68
                      last edited by

                      As I said for the first time:
                      “cut / paste to the right place”
                      and moving large blocks is generally not convenient
                      (you can simply make a mistake, because when moving the blocks are all deployed!)

                      Imgur

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

                        Final Series:

                        Imgur

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

                          Remix)))

                          		<Macro name="Cut minimized block" Ctrl="yes" Alt="no" Shift="yes" Key="67">
                          			<Action type="0" message="2301" wParam="0" lParam="0" sParam="" />
                          			<Action type="0" message="2177" wParam="0" lParam="0" sParam="" />
                          			<Action type="2" message="0" wParam="42001" lParam="0" sParam="" />
                          		</Macro>
                          		<Macro name="Paste minimized block" Ctrl="yes" Alt="no" Shift="yes" Key="86">
                          			<Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x000D;" />
                          			<Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x000A;" />
                          			<Action type="0" message="2302" wParam="0" lParam="0" sParam="" />
                          			<Action type="0" message="2179" wParam="0" lParam="0" sParam="" />
                          		</Macro>
                          

                          Imgur

                          1 Reply Last reply Reply Quote 3
                          • andrecool-68A
                            andrecool-68
                            last edited by

                            When you need to insert beyond the last block in the file, you need to expand the last block before inserting!

                            1 Reply Last reply Reply Quote 0
                            • rddimR
                              rddim @Alan Kilborn
                              last edited by

                              @Alan-Kilborn said:

                              @rddim

                              Neither method 1 nor method 2 worked for me with Notepad++ 7.7. All that resulted was “messed up” text. Is your advice coming from use in Notepad++ 7.7 or some other version?

                              Yes, it is Notepad++ 7.7

                              andrecool-68A 1 Reply Last reply Reply Quote 2
                              • andrecool-68A
                                andrecool-68 @rddim
                                last edited by

                                @rddim It works, but when a block consists of a very large number of lines … it is not very convenient to do (visually you can lose the beginning and end of the block)

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