• Login
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.
  • T
    TheMARK2580
    last edited by May 24, 2019, 6:04 AM

    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

    A 1 Reply Last reply May 24, 2019, 8:00 AM Reply Quote 0
    • A
      andrecool-68 @TheMARK2580
      last edited by May 24, 2019, 8:00 AM

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

      1 Reply Last reply Reply Quote 0
      • R
        rddim
        last edited by rddim May 24, 2019, 8:45 AM May 24, 2019, 8:44 AM

        @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

        A 1 Reply Last reply May 24, 2019, 12:28 PM Reply Quote 4
        • A
          Alan Kilborn @rddim
          last edited by May 24, 2019, 12:28 PM

          @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?

          A R 2 Replies Last reply May 24, 2019, 12:35 PM Reply Quote 0
          • A
            andrecool-68 @Alan Kilborn
            last edited by May 24, 2019, 12:35 PM

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

            1 Reply Last reply Reply Quote 1
            • A
              andrecool-68
              last edited by May 24, 2019, 12:43 PM

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

              1 Reply Last reply Reply Quote 1
              • A
                Alan Kilborn
                last edited by May 24, 2019, 12:53 PM

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • A
                  andrecool-68
                  last edited by May 24, 2019, 1:00 PM

                  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
                  • A
                    Alan Kilborn
                    last edited by May 24, 2019, 1:00 PM

                    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
                    • A
                      andrecool-68
                      last edited by May 24, 2019, 1:46 PM

                      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
                      • A
                        andrecool-68
                        last edited by May 24, 2019, 2:07 PM

                        Final Series:

                        Imgur

                        1 Reply Last reply Reply Quote 0
                        • A
                          andrecool-68
                          last edited by May 24, 2019, 2:27 PM

                          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
                          • A
                            andrecool-68
                            last edited by May 24, 2019, 2:46 PM

                            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
                            • R
                              rddim @Alan Kilborn
                              last edited by May 26, 2019, 1:09 PM

                              @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

                              A 1 Reply Last reply May 26, 2019, 5:52 PM Reply Quote 2
                              • A
                                andrecool-68 @rddim
                                last edited by May 26, 2019, 5:52 PM

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