Selecting text by region
-
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 -
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.
-
@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>.
-
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 -
This post is deleted!