Skip to content

vim: Fix substitute command for /n and /c#23346

Closed
lsparrish wants to merge 1 commit intozed-industries:mainfrom
lsparrish:main
Closed

vim: Fix substitute command for /n and /c#23346
lsparrish wants to merge 1 commit intozed-industries:mainfrom
lsparrish:main

Conversation

@lsparrish
Copy link
Copy Markdown

@lsparrish lsparrish commented Jan 19, 2025

Closes #23345

Release Notes:

  • Fixed vim substitute command to enable override of global (replace all) default behavior using flags /n and /c

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Jan 19, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @lsparrish on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@lsparrish
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jan 19, 2025
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Jan 19, 2025

The cla-bot has been summoned, and re-checked this pull request!

@maxdeviant maxdeviant changed the title fixing vim substitute command for /n and /c vim: Fix substitute command for /n and /c Jan 19, 2025
@zed-industries-bot
Copy link
Copy Markdown
Contributor

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against c0c309d

@ConradIrwin
Copy link
Copy Markdown
Member

Thanks for taking a pass at this!

I think we need to:

  • Do no replacements with /n, it should be equivalent to just running a search
  • For c I think we should probably do no replacements by default, but put the focus into the replacement bar so that <enter> can be used to replace things one by one, and make it so that hitting enter there doesn't move focus back to the buffer.
    Happy to pair on this if you want https://cal.com/conradirwin/pairing

@ConradIrwin ConradIrwin added the state:needs info Issue needs more information from the user before we can do something with it label Jan 29, 2025
@ConradIrwin
Copy link
Copy Markdown
Member

Closing this for now, but still happy to pair on the implementation if you'd like

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

Labels

cla-signed The user has signed the Contributor License Agreement state:needs info Issue needs more information from the user before we can do something with it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vim substitution command should work if c or n flags are used

3 participants