New answers tagged

0

A slightly different variation using :h gn motion: let @a='' | g/prop="\zs.*\ze"/normal! "Aygn


4

You're confusing the passing of the register to :yank (Ex command) vs. y (normal mode). For the latter, instead of appending the register, it must come before the y command, and with the " prefix: "Ayi" (with register A, yank the inner " double quoted text) :let @a = '' | g/prop/normal! "Ayi" Note that as the yank is characterwise, all matches will be ...


0

Somebody had a similar problem: vim yank all matches of regex group into register. In your case regex will be prop="\zs.*\ze". \zs denotes where the match will start in the "substitution" (yanking to register), and \ze where to end.


Top 50 recent answers are included