42

Background

I'm a religious fanatical devoted believer of vimium. It speeds up my internet usage like nothing else. I'm also (naturally) a heavy user of vim itself.

Question

How can I actually select a certain text in a screen using vimium without using a mouse? For example let's say I got this email on the page mail@mail.com. Is there a way i can for example search for that term first of all, then using vimium highlight the rest of the term as if I'm using a cursor?

so a more practical example mailto@verycomplicatedandlonganduglydomainthatiwontsearachfor.com so i simply search for mailto, then as that gets highlighted, i can move the cursor to the end of the term or at least highlight one word at a time. Idas?

abbood
  • 1,354

4 Answers4

41

If you specifically want to search for mailto but then select verycomplicatedandlong... i.e. search one string in order to find the second (unknown) string, which you then want to select.

/ mailto Enter / veryl Enter v ww y

Shortcut explanation.
/ - Enter search mode.
mailto - Literal search string.
Enter - Normal mode.
/ - Now that you know your second search string, enter search mode again.
veryl - Literal search string.
Enter - Enter normal mode (optionally you can use nN to find other instances of the same search string).
v - Enter visual mode.
ww - Select two words (domain and TLD) or use hl to select one character at a time.
y - yank (copy).

6

You might find the directions for Vimium Visual Mode helpful:

https://github.com/philc/vimium/wiki/Visual-Mode

They also include Caret Mode. They are the same as vim in general, though perhaps not as full featured or customizable, as you would expect.

4

As a slight improvement on Filip's answer, I would suggest searching for mailto like he suggested, but then going into visual mode right away, then using w or e to select text to the end of the address and then using ow to switch to the marker at the beginning of the word and moving it forward. So the full command would be: / mailto Enter v ee ow

haddi
  • 5
potatop
  • 41
0

You don't need vimium. use Caret mode. I'll explain based on windows 11

  1. press F7 to enter Caret Browsing Mode. "Caret browsing" is a feature in Google Chrome that allows users to navigate a webpage using their keyboard arrow keys.

  2. Ctrl + F for searching text. then cursor points what you want to select.

  3. press Space + Arrow Key, then Ctrl + C (copy).

that's all.

LKB
  • 101