Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sub-replace-expression (:s/.../\=...) #8910

Open
dhnam opened this issue Feb 29, 2024 · 1 comment
Open

sub-replace-expression (:s/.../\=...) #8910

dhnam opened this issue Feb 29, 2024 · 1 comment

Comments

@dhnam
Copy link

dhnam commented Feb 29, 2024

Is your feature request related to a problem? Please describe.
I was looking for easy way to multiply number, and found out there's a way - using expression in substitute (:s).

For example, :s/\d\+/\=submatch(0)*5/ is valid command in vim - it multiplies number by five.

But it doesn't work in vsvim.

Describe the solution you'd like
It is feature supported in normal Vim, as written in vimhelp.

So implementing this could be solution.

Additional context
There was an issue about expression (#4383). It was not about expression in replace, but it was about expression register.

@J-Fields
Copy link
Member

Most of what's needed for this is in #7920. I'll try to revive that PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants