-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Replace with newline works only when regex mode is on #11237
Comments
When the regex flag is on, then we parse the replace string:
So you would expect that we should always parse the replace string... That would make sense, my only concern is that it might cause some grief to folks that got used to it being "literal" when not in regex mode. |
If they want the literal, I think |
I would like to chime in with how some other editors handle this. The most elegant method is used by vim. They have a special prefix which tells the search to treat special characters as special. But by default they treat all characters as literals. Atom also treats as literal unless you turn on regex mode and emacs behaves the same way. So I think that the current way is more common to the users and should be left as it is. Just my 2 cents. |
So now I'm in a pickle :) ... I don't have a preference either way and it looks like editors have done it before both ways. |
I think it's weird to only support literals in regex mode when the user does not want to define a regex. Maybe make it an option and keep the existing behavior as the default? |
I agree with what @bootstraponline is saying. Ensuring that the new behaviour doesn't differ much from current behaviour is important from a user's perspective. Not everybody reads release notes. |
Is there any idea of when/if this may be added or altered in Visual Studio Code? looks like it's going on 2 years now so my hope is low. |
I think it'll be up to someone from the community to send a pull request. 🙂 |
There's a similar issue in the Backlog Candidates. Please upvote it (and share it) so this gets fixed! #31449 |
Steps to Reproduce:
Input
Actual
Expected
Regex mode works as expected however I'd rather not have to define a regex.
The text was updated successfully, but these errors were encountered: