As simple example, take this:
:'<,'>s/\vs([A|B])\.size\(\)/\={"A":"a","B":"b"}[submatch(1)]/g
This substitution will replace sA.size()
with a
and sB.size()
with b
.
I would like to use lua syntax after \=
command. So it will be something like
:'<,'>s/\vs([A|B])\.size\(\)/\={A="a",B="b"}["%1"]/g
Is it possible to do that in nvim? I could not find anything about this.