Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Moving blocks along with content

    Help wanted · · · – – – · · ·
    4
    15
    2535
    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.
    • TheMARK2580
      TheMARK2580 last edited by

      Greetings.
      I have not been able to find the answer to my task for a long time. I have an ini file containing many blocks in which a huge number of different parameters.
      The task is this: I want to banally move the blocks in places, ie, up or down, so that everything inside the block moves with it.
      Highlighting all existing text is not convenient.
      https://i.imgur.com/aUmncLQ.png
      https://i.imgur.com/Xv40ZLQ.png

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

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

        1 Reply Last reply Reply Quote 0
        • rddim
          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 Kilborn 1 Reply Last reply Reply Quote 4
          • Alan Kilborn
            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-68 rddim 2 Replies Last reply Reply Quote 0
            • andrecool-68
              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-68
                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 Kilborn
                  Alan Kilborn last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • andrecool-68
                    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 Kilborn
                      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-68
                        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-68
                          andrecool-68 last edited by

                          Final Series:

                          Imgur

                          1 Reply Last reply Reply Quote 0
                          • andrecool-68
                            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-68
                              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
                              • rddim
                                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-68 1 Reply Last reply Reply Quote 2
                                • andrecool-68
                                  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
                                  Copyright © 2014 NodeBB Forums | Contributors