• Login
Community
  • Login

Selecting text by region

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 4 Posters 22.4k 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.
  • D
    David Gibbs
    last edited by David Gibbs Mar 23, 2017, 1:44 AM Mar 23, 2017, 1:44 AM

    Hi
    Is there a way in Notepad++ to select a region of text? By this I mean I frequently want to edit a file that contains text in two columns. There are no special characters for these columns other than spaces. It is a download of a report that is meant to be printed.
    I would like to be able to select the right hand column, cut it and then past it below the left hand column. This would put the data into a single column.
    Does such a function exist? If so, how would I access it?

    Thanks,
    David

    S 1 Reply Last reply Mar 23, 2017, 11:47 AM Reply Quote 0
    • S
      Scott Sumner @David Gibbs
      last edited by Scott Sumner Mar 23, 2017, 11:48 AM Mar 23, 2017, 11:47 AM

      @David-Gibbs

      It sounds to me like you want to make a “column selection”, sometimes called a “rectangular selection”. You can do it either with the mouse by holding down the Alt key before you left-click and drag to select text, or with the keyboard by holding Shift+Alt while you use the arrow keys to define your selection region. After that you can cut/copy/paste as usual.

      1 Reply Last reply Reply Quote 2
      • J
        Jim Dailey
        last edited by Mar 23, 2017, 11:51 AM

        @David-Gibbs Try holding down the Alt key while dragging over the right-hand column, then when you have it highlighted, Press Ctrl-X to cut it. Move to the line under the left-hand column. If there is no more text below in the file, then press Ctrl-V to paste in the column you just cut. If there is other text under the left-hand column, you’ll need to press Enter several times (as many times as there are lines of text in the right-hand column), then press Ctrl-V to paste.

        Using Alt+mouse drag does a rectangular selection, which will get pasted back the same way (any text to the right of where you paste will be pushed further to the right). Play around with this a little and you’ll figure it out–it is harder to describe than to actually use.

        Another way to do a rectangular select is with Alt+Shift+<arrow keys>.

        D 1 Reply Last reply Jan 26, 2024, 7:24 AM Reply Quote 2
        • D
          David Gibbs
          last edited by Mar 23, 2017, 3:53 PM

          Thank you very much Scott and Jim. I knew it had to be something pretty easy. It was holding down the alt key I was missing. That is exactly the function I wanted.

          Thanks again,
          David

          1 Reply Last reply Reply Quote 0
          • D
            David Tait @Jim Dailey
            last edited by Jan 26, 2024, 7:24 AM

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