Search code examples
visual-studio-codelineselection

Visual Studio Code select same position above and below not the whole line before and after (see image)


I'm using visual studio code and run into a weird problem. I'm not sure how I got here - I could have accidently pressed a shortcut unknowingly.

I'm trying to select a phrase, link or anything that crosses multiple lines (whether the lines are true lines or due to word wrap). When I select multiple lines, it doesn't automatically select the text at the start and end between the two points. Rather, it just selects the length of text for that line and repeats it in the subsequent lines. See the image below to understand.

Image of issue

As you can see, I am trying to select the words from "the" to the end of "sub". Instead of selecting all the words between the two, it selects the text "the instru" and selects every line with the same amount of characters/length.

In order to show what I am expecting, I have pasted the text into Notepad and done the same thing.

What I am expecting

As you can see, all the words between "the" and "sub" are selected.

If anyone has any idea about how to fix this, I would be greatly appreciative.

Below is a copy of the text if the images don't display.

Follow the instructions below for a click guide to retire and/or add 'School'.

Best practice if there is a change in 'School' structure would be to 'retire' any existing school setup that is no longer required and add the new sub school information. The reason why we don't just edit existing school names (typically) is due to leaving historical data intact.

Solution

  • Try using ctrl+shift+P and typing "Toggle Column Selection Mode"

    Toggle Column Selection Mode