Ubuntu – How to select text for copy and paste in Chrome by keyboard not using the mouse

google-chromekeyboardshortcut-keysusability

I have some online tutorial open in my Google chrome. It tells me to run some commands in a terminal.

My current workflow is to select the necessary parts via mouse, and insert the copied text via middle mouse click in a terminal.

I want to to avoid using the mouse at most instances, so I want to highlight text on a web page by only using the keyboard instead. I want for the text to be automatically saved into the buffer similar to mouse selection, yet even then being able to ctr+c without selecting text with the mouse would be fine.

Is there a mode in Chrome for that purpose?

Best Answer

As I am a user of vimium, it turns out I had the capabilities already shipped with it even though I wasn't aware that it existed.

  • Search the starting point by: /yourSeach
  • Press enter.
  • Enable visual mode via: v, and visual mode on a line basis via Shift + V
  • Select text by vim navigation keys, aka: h, j, k, l, b, e, w, $ (I especially like shift + w, as it goes to the end of the next word)
  • Yank via y

You now can switch the context and paste the text via Ctrl+V

There also seems to be a caret mode, yet as of yet I somtimes don't see the current place of the cursor, which is why I prefer the search-first approach as of now.