Selecting Text in Terminal Without Using the Mouse

Double-click to select text in Windows Terminal selects only one word

Put the wordDelimiters setting in the global section of your settings.json file, not within the "profiles" array. I finally figured this out by looking at the documentation link at the top of the file, it is probably a good place to look when trying to add new settings.

// For documentation on these settings, see: https://aka.ms/terminal-documentation

Sample Image

How do I copy text from my xterm without a mouse?

You can use GNU screen's copy and paste commands.

Quick tutorial:

  1. Open screen: screen (or screen myprog my args here)
  2. Run your program, producing output you want copied
  3. Enter copy mode: Control+a+[
  4. Move your cursor to the start point
  5. Hit Enter
  6. Move your cursor to the end point
  7. Hit Enter
  8. Paste: Control+a+]

Screen is much more powerful than that (I use it to tab several virtual terminals without the need for a special terminal emulator, and also so that I don't loose my sessions when X crashes or something). To get out of screen, simply end your shell session, or type Ctrl+a, Ctrl+\.

How to select text in git bash console (OS windows) use keyboard?

If your "git bash console" runs inside cmd.exe (and in typical git installation in Windows it is), then you can use cmd.exe window context menu for selecting and pasting:

  1. Press alt+space — it will bring window context menu.
  2. Press e, k — it will select Edit -> Mark menu option.
  3. Now you can move your text cursor around cmd.exe window with arrow keys.
  4. Select block of text by holding shift key and selecting block with arrow keys.
  5. Press enter to copy selected block of text.

You can also paste text from clipboard into console using alt+space, e, p shortcut.

Note that keyboard shortcuts depend on Windows user interface language, described above commands are for English interface.

Select entire text from current line in Linux using a keyboard shortcut

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.

Text selection not works on Ubuntu terminal with SHIFT+ARROW (Left or right)

The standard Terminal does not use the same shortcuts (or even the same cursor behavior) as you might expect in a browser or text editor window. The shift key by itself does not select text that way. shift+home will scroll to the top, shift+end to the bottom, and using it with pg up/pg down will scroll up/down one screen. The arrow keys are mapped to A/B/C/D.

As you can see on this list, most of the commands are for moving around and managing processes. I usually just select text with the mouse, then copy with ctrl+shift+c and paste with ctrl+shift+v. As discussed on Ask Ubuntu, there appears to be no easy way to select arbitrary text without the mouse.

Alternative terminal programs may offer more options.

Update While this is not a standard shortcut, you can go into Terminal's Edit > Preferences > Shortcuts, find the Edit section, click the Select All row in the Shortcut Key column, then enter a new shortcut like ctrl+shift+a. This new shortcut will then let you then copy all of the terminal text.

How to Zoom in /out in emacs -nw (command line only) whithout having a numeric keypad (also without mouse wheel)?

Since emacs is running within a terminal, you can't directly control the font as you would running as a GUI app. To zoom in and out, you need to use the method that your terminal application provides for changing the font size. This is often <ctrl>+ and <ctrl>-, but your terminal keybindings may be different.



Related Topics



Leave a reply



Submit