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

Search/replace causes double replacement with capture group #1525

Closed
casey-speer opened this issue Apr 18, 2017 · 3 comments · Fixed by #1725
Closed

Search/replace causes double replacement with capture group #1525

casey-speer opened this issue Apr 18, 2017 · 3 comments · Fixed by #1725

Comments

@casey-speer
Copy link

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


What did you do?

With a list of words, one per line:

div
span
input
script

Press : to enter command mode, type %s/(.*)/'$1',/g, hit enter.

What did you expect to happen?

The list of words is transformed to:

'div',
'span',
'input',
'script'

What happened instead?

The list is transformed to:

'div','',
'span','',
'input','',
'script''',

Technical details:

  • VSCode Version: 1.11.2
  • VsCodeVim Version: 0.6.16
  • OS: MacOS 10.11.6
@xconverge
Copy link
Member

related

#991

@Chillee
Copy link
Member

Chillee commented May 21, 2017

With the new PR #1725, this issue is fixed as long as you use
%s/.*/'$1',/g

@Chillee
Copy link
Member

Chillee commented May 24, 2017

This is added with the new "enableNeovim" option (on master).

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

Successfully merging a pull request may close this issue.

4 participants