Dear fellow Developers,
I would like to quote variables having @
inside like test@mail.org
, but not starting with @
like @var1
, @var2
.
Does Vi/Vim/Neovim have any option to inspect the matched pattern and create a pre- and postfix to test@mail.org
: "test@mail.org"
?
:%s/ [a-zA-Z0-9]+@[a-zA-Z0-9]* / \"*\" /
does not work due to \"*\"
.
If Vi/Vim/Neovim has no such feature, what tools would you recommend for portability? I know C++ has a feature to inspect the matched regex as a string for manipulation, but I would like to have a more pluggable solution for vim.