4

I've been using Ubuntu/VS Code for a week and I've been struggling with text selection.

In my mac if I want to select text starting from a position until the end of the text I can easily do that with Command + Shift + arrow, but I just can't figure out how to do the same in Linux (Ubuntu), CTRL + Shift only works selecting word by word, and sometimes we just want to select an entire row or the entire text from the current position.

Appreciate the help

  • 4
    StackOverflow is dedicated to helping solve programming code problems. Your Q **may be** more appropriate for [su] , but read their help section regarding on-topic questions . AND please read [Help On-topic](https://stackoverflow.com/Help/On-topic) and [Help How-to-ask](https://stackoverflow.com/Help/How-to-ask) before posting more Qs here. Good luck. – shellter Jun 26 '20 at 23:39

3 Answers3

5

Put your courser on the point you want to start. Press Shift+End for the end of the line.

If you want to copy the whole line from first to last simply place the cursor somewhere in that line and hit CTRL+C.

Press Home key to get to the start of the line.

For Selecting multiple lines, use Up/Down key.

The best way is, Put your courser on the point you want to start. Press Shift then click the point you want to end using mouse/touchpad.

Shaiful Islam
  • 359
  • 2
  • 13
  • 1
    Thansk for the help. Quite handy your Shift + End tip. The Shift + click may not be very useful in case of having hundreds of lines, but I was playing around and found Shift + Page Down or Shift + Page Up, which solves the issue. – Richard Fogaca Nienkotter Jun 26 '20 at 22:20
1

I tried the CTRL-C suggestion above without any result. (Mint 19.3 Cinnamon) Accidentally, I found found that the left mouse button, triple-clicked, selects (highlights) the entire row the cursor is in. [Not seen that documented!] I suppose an expert on xdotools might write you a script for that. Or position the cursor at the starting point and enter Ctrl+Shift+End (or repeated right arrow) for a document, Shift+End (or repeated right arrow) for a single line.

0

Expanding on what Phil Headford, I did the following on Ubuntu 22.04 and works pretty well:

  1. Left double-click the first word
  2. Move your cursor to the desired position
  3. Shift+Left-Click - this will select up to that word. If you happen to click next to a single quote, the selection will include that quote, but not the word(s) it is enclosing.
George Smith
  • 438
  • 4
  • 8