Community
    • Login

    Paste normal cut text in column mode

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 118 Views 1 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.
    • fahrrad13F Offline
      fahrrad13
      last edited by

      Hello,

      column mode is amazing, but is there a way to insert (multi-line) text using the column mode, which was cut (or copied) via the normal mode?

      For example to go from:

      ID = 
      ID = 
      1
      2
      END
      

      directly to:

      ID = 1
      ID = 2
      END
      

      without being left with the two blank lines above END, which would happen using normal column mode.

      thanks for any suggestions!

      CoisesC 1 Reply Last reply Reply Quote 0
      • CoisesC Offline
        Coises @fahrrad13
        last edited by

        @fahrrad13 said:

        Hello,

        column mode is amazing, but is there a way to insert (multi-line) text using the column mode, which was cut (or copied) via the normal mode?

        For example to go from:

        ID = 
        ID = 
        1
        2
        END
        

        directly to:

        ID = 1
        ID = 2
        END
        

        without being left with the two blank lines above END, which would happen using normal column mode.

        thanks for any suggestions!

        There is a way, at least for your specific example, but it’s typically more error-prone trouble than it’s worth.

        First, you must have these settings at Settings | Preferences | Editing2 both checked (which they are by default):

        Enable Multi-Editing (Ctrl+Mouse click/selection)
        Enable Column Selection to Multi-Editing

        After making sure of that:

        1. Make a column selection surrounding the 1 and 2.
        2. Hold down Shift and press the right arrow key once. (That changes the column selection to a multiple selection and includes the line endings in the selections.)
        3. Cut.
        4. Make an empty column selection following the blanks at the end of the first two lines.
        5. Hold down Shift and press the right arrow key once.
        6. Paste.
        1 Reply Last reply Reply Quote 2
        • D Offline
          DanielCollins
          last edited by

          Thanks for the detailed steps, Coises — that Shift+Right Arrow trick to turn the column selection into a multi-editing selection is the part I had been missing.

          One alternative that worked well for me in a similar case, when the values are already on separate lines, is to skip the cut step altogether: place a caret at the end of each target line with Ctrl+click (multi-editing), then paste the multi-line text. Notepad++ puts one pasted line at each caret, so the 1 goes after the first ID = and the 2 after the second, with no blank lines left behind. It is a bit fiddly if there are many lines, but for two or three lines it is quicker than converting the selection back and forth.

          Either way, checking that both multi-editing options are enabled in Settings > Preferences > Editing 2 first, as you said, seems to be the key.

          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