Substitute backslash inconsistency
See original GitHub issueIs this a BUG REPORT or FEATURE REQUEST? (choose one): Bug Report
What happened:
When using substitute, the backslash character is not handled correctly. Typing in \\
will print out “\” instead of only one ""
This wasn’t really a problem until I ran into a case where I have to separate in “\right”. If I use :s/[find pattern]/\right/gc
I end up with the return command being used. The output is therefore “ight” on the next line.
If I use :s/[find pattern]/\\right/gc
, it will simply output “\right” which isn’t what I wanted either.
What did you expect to happen:
:s/[find pattern]/\\right/gc
to replace “\right” into the corresponding matches.
Note: the :
is simply there for effect. I’m not entering :
into the command box that pops up.
Environment:
- Extension (VsCodeVim) version: 0.12.0
- VSCode version: 1.23.1
- OS version: Windows 10
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Can someone explain the strange behavior of backslash in ...
The documented behaviour of backslashes in backtick-style command substitution is: When the old-style backquote form of substitution is used ...
Read more >Search & replace back slashes to forward slashes in windows
find a backslash, followed by at least 1 character that is not a backslash, and replace with a forward slash followed by the...
Read more >I try to replace the backward slash with forward slash using ...
I try to replace the backward slash with forward slash using gsub but it's not working · 1 · Yes, that was acting...
Read more >Substitution (sed & awk, Second Edition)
The first substitute command replaces ".Ah" with two newlines and "@A HEAD =". A backslash at the end of the line is necessary...
Read more >Dodekalogue - the Tcler's Wiki!
If a backslash (“\”) appears within a word then backslash substitution occurs. In all cases but those described below the backslash is dropped...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is still an issue for me.
I’ll give it a try and report back