você poderia usar uma pesquisa e substituir em cada linha?
:% s/"\([a-z]*\)"/""\,\&/g
Aqui está um exemplo mínimo do que estou tentando fazer. Comece com:
"this")
"that")
[hundreds of lines like this]
Termine com:
"this",&this)
"that",&that)
[hundreds of lines like this]
Eu cheguei até aqui:
g/"\p*"/s/)/[what to put here?]
Por isso, identifica corretamente a string que desejo copiar. O que eu não tenho certeza é como dizer que eu quero colar essa string no final. Eu tentei usar & , mas isso corresponde ao ) , não ao "\p*" .
Tags vim search text-processing