How to yank text inside or around one character?
In vim, you can use yi{char} or ya{char} to yank text inside or around char from left and right side in the same line.
Is this possible in vimium-c, and if not where can I find more information on how to achieve this using custom key mappings?
Sorry I don't know yi{char}. I can not press y i { c h a r } on my VIM for MSYS2, so I'm not sure what you want.
If you mean to copy text between { and }, then you may try the trick in https://github.com/gdh1995/vimium-c/discussions/600 .
If you mean to find text, extend the selection range and then copy, I'm afraid you have to:
- enter VisualMode
- press
/to enter a sub-find mode, type your query text - use
Ctrl+J/Kto iter over matches, and pressEnterto exit from the sub-find mode - use keys like
h/j/k/l/w/b/oto modify the selection range - press
Enteroryyto copy.
This motion is what I am refering to. I am mostly interested in selecting text between a pair of quotes when cursor is anywhere inside the two quotes.
Updated: in v1.99.0 as and aw should work well on Firefox.
Um, there was aw to select a current word, but v1.98.0 breaks this feature. I need time to fix it. When it's fixed, you may use as to select a "sentence" (will al for a line help?), and then y to copy it with a substitution rule to extract a "..." part in the line.
Currently there's no such feature to set selection boundaries to a given character. I know little about other VIM-like web-extensions so I'm sorry I can't help here.
It's more difficult to detect "whether words are in a same line" in a browser than doing in VIM. So I'm not sure whether I'll add this feature into Vimium C.
Hello, now in v1.99.96 aw and as in caret mode should also select a word, to make copying easier.
However it's too difficult to implement "yanking text in a character" in JS code effectively, so I want to give up this feature request.